Redo inlining patch, plus some tidying up
authorsimonpj@microsoft.com <unknown>
Thu, 7 Feb 2008 15:51:02 +0000 (15:51 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 7 Feb 2008 15:51:02 +0000 (15:51 +0000)
commitfa1c8a7e7013b1e9a37326b80abadec737c9347e
tree943f6f3d0fd83abaf36651582d4810f372fc36bc
parent73140a534a87c6b0504fd8f2877052a6bb6c4267
Redo inlining patch, plus some tidying up

This adds back in the patch
  * UNDO: Be a little keener to inline

It originally broke the compiler because it tickled a Cmm optimisation bug,
now fixed.

In revisiting this I have also make inlining a bit cleverer, in response to
more examples from Roman. In particular

  * CoreUnfold.CallCtxt is a data type that tells something about
    the context of a call.  The new feature is that if the context is
    the argument position of a function call, we record both
- whether the function (or some higher up function) has rules
- what the argument discount in that position is
    Either of these make functions keener to inline, even if it's
    in a lazy position

  * There was conseqential tidying up on the data type of CallCont.
    In particular I got rid of the now-unused LetRhsFlag
compiler/coreSyn/CoreUnfold.lhs
compiler/simplCore/SimplUtils.lhs
compiler/simplCore/Simplify.lhs