• simonpj@microsoft.com's avatar
    Adjust inlining heursitics · b71760aa
    simonpj@microsoft.com authored
    This patch is the result of a long series of nofib-based experiments
    to improve GHC's inlining heuristics.
    
    In the end, I'm not sure how worthwhile it all was: I only got a 
       1% decrease in code size
       1% decrease in allocation
    and I don't trust the runtime statistics enough to quote.
    
    Still, in doing all this I tidied up the code quite a bit, and 
    I understand it much better now, so I'm going to commit it.
    
    The main changes are in CoreUnfold, which has lots of new comments.
    Other changes:
    
      - litSize moves from Literal to CoreUnfold
      - interestingArg moves from SimplUtils to CoreUnfold
      - the default unfolding threshold (in StaticFlags) 
          reduces from 8 to 6 (since the size calculation 
          has changed a bit)
    
    b71760aa
CoreUnfold.lhs 35.4 KB