Two small improvements to LiberateCase
authorsimonpj@microsoft.com <unknown>
Wed, 4 Feb 2009 08:19:19 +0000 (08:19 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 4 Feb 2009 08:19:19 +0000 (08:19 +0000)
commita77cfb5c39b816d5bf56075ed4d9085c0b658f9e
treee84f4e6d18d8603897d3237fd2cef8ccc76d0094
parent027e6be20af2e59e2ec720042d23ef06d9a7d4c1
Two small improvements to LiberateCase

Max Bolingbroke suggested these two small improvements to LiberateCase
(most of the size increase is comments :-)):

a) Do LiberateCase on small functions even if they are mutually recursive
   See Note [Small enough]

b) Don't do LiberateCase on functions for which it'd be fruitless,
   namely when a free varible is scrutinised *outside* the function
   See Note [Avoiding fruitless liberate-case]

There is virtually no effect on nofib, but Max tripped over cases
where it mattered slightly.
compiler/simplCore/LiberateCase.lhs