Inline in a call argument if the caller has RULES
authorsimonpj@microsoft.com <unknown>
Mon, 22 May 2006 16:32:55 +0000 (16:32 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 22 May 2006 16:32:55 +0000 (16:32 +0000)
commita2c92cccbdfdf295901e6c367c35bd4b2b0288e0
tree27d0aa3c3e9afe1fbe9a139abfcfa13914934121
parentb7d8dffaf1fefdf2f6b52fcf039a06843a28d586
Inline in a call argument if the caller has RULES

This is an experimental change suggested by Roman.  Consider

{-# INLINE f #-}
f x y = ...

....(g (f a b))...

where g has RULES.  Then we'd like to inline f, even though the context of
the call is otherwise 100% boring -- g is lazy and we know nothing about
x and y.

This patch just records in the continuation that f has rules.  And does so
somewhat recursively...e.g.

...(g (h (f a b)))...

where g has rules.
compiler/simplCore/SimplUtils.lhs
compiler/simplCore/Simplify.lhs