Recover proper sharing for Integer literals
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 21 Oct 2011 16:53:30 +0000 (17:53 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 21 Oct 2011 16:53:30 +0000 (17:53 +0100)
commitca380cd19530fad4860e42844e42a473188e0013
treec652e6bd6b6b43a43d383a95bc98f2abff95cb2b
parent2ad79aaa1b87164a0191e8f980f57a9fa0b80e0a
Recover proper sharing for Integer literals

Trac #5549 showed a loss of performance for GHC 7.4.
What was happening was that an integer literal was being
allocated each time around a loop, rather than being
floated to top level and shared.

Two fixes
 * Make the float-out pass float literals that are non-trivial
 * Make the inliner *not* treat Integer literals as size-zero
compiler/basicTypes/Literal.lhs
compiler/coreSyn/CoreUnfold.lhs
compiler/coreSyn/PprCore.lhs
compiler/simplCore/SetLevels.lhs