[project @ 2005-08-03 13:53:35 by simonmar]
authorsimonmar <unknown>
Wed, 3 Aug 2005 13:53:36 +0000 (13:53 +0000)
committersimonmar <unknown>
Wed, 3 Aug 2005 13:53:36 +0000 (13:53 +0000)
commitcfd9e9b38df7c86b6addc335e2ecb9f8c92a6b55
tree068eaef15963b942196353317a418a1bf7cd2ad7
parent34495a28b82706890b0d3bf730f3cc79ae4c2a0c
[project @ 2005-08-03 13:53:35 by simonmar]
Patch from SimonPJ (slightly tweaked by me after checking performance
results):

Fix occasional O(n^2) behaviour in the simplifier.  There was a
possibility that by inlining a binding, we could re-simplify an
arbitrary sized expression.  This patch fixes it by moving the
inlining of arbitrary-sized expressiong to the binding site
(preInlineUnconditionally), so the decision to inline happens before
simplifying the RHS.  To do this, we have to collect more information
during the occurrence analysis phase.

We still make inlining decisions at the call site, but they are always
size-limited, so we can't get quadratic blowup.
ghc/compiler/basicTypes/BasicTypes.lhs
ghc/compiler/basicTypes/IdInfo.lhs
ghc/compiler/coreSyn/CoreUnfold.lhs
ghc/compiler/coreSyn/CoreUtils.lhs
ghc/compiler/simplCore/OccurAnal.lhs
ghc/compiler/simplCore/SimplUtils.lhs
ghc/compiler/simplCore/Simplify.lhs