Skip to content
  • Sergei Trofimovich's avatar
    extend '-fmax-worker-args' limit to specialiser (Trac #11565) · f93c363f
    Sergei Trofimovich authored
    It's a complementary change to
        a48de37d
    
    
        restore -fmax-worker-args handling (Trac #11565)
    
    I don't have a small example but I've noticed another
    discrepancy when was profiling GHC for performance
    
        cmmExprNative :: ReferenceKind -> CmmExpr -> CmmOptM CmmExpr
    
    was specialised by 'spec_one' down to a function with arity 159.
    As a result 'perf record' pointed at it as at slowest
    function in whole ghc library.
    
    I've extended -fmax-worker-args effect to 'spec_one'
    as it does the same worker/wrapper split to push
    arguments to the heap.
    
    The change decreases heap usage on a synth.bash benchmark
    (Trac #9221) from 67G down to 64G (-4%). Benchmark runtime
    decreased from 14.5 s down to 14.s (-7%).
    
    Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
    
    Reviewers: ezyang, simonpj, austin, goldfire, bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2507
    
    GHC Trac Issues: #11565
    f93c363f