cvs commit: fptools/ghc/compiler/basicTypes Id.lhs IdInfo.lhs
fptools/ghc/compiler/coreSyn Subst.lhs fptools/ghc/compiler/simplCore
SetLevels.lhs SimplUtils.lhs Simplify.lhs
fptools/ghc/compiler/specialise Specialise.lhs
Simon Peyton Jones
simonpj@glass.cse.ogi.edu
Thu, 1 Mar 2001 09:10:07 -0800
simonpj 2001/03/01 09:10:07 PST
Modified files:
ghc/compiler/basicTypes Id.lhs IdInfo.lhs
ghc/compiler/coreSyn Subst.lhs
ghc/compiler/simplCore SetLevels.lhs SimplUtils.lhs
Simplify.lhs
ghc/compiler/specialise Specialise.lhs
Log:
Improve IdInfo substitution
To get rules to work nicely, we need to make rules for recursive functions
active in the RHS of the very recursive function itself. This can be
done nicely: the change is to move the calls to simplIdInfo in Simplify
to an earlier place.
The second thing is that when doing simple expression substitution
in a rule (which we do during simplification for rules attached to an Id)
we were zapping the occurrence info carefully pinned on the rule binders
when the rule was put into the Id's rules. This in turn meant that
the simplifer ran more iterations than necessary when rules were fired.
(Andrew Tolmach discovered this.)
So I tidied up the interface to Subst a little. The relevant functions
that have changed are
simplBndr, simplBndrs, simplLetId, simplIdInfo,
substAndCloneId, substAndCloneIds, substAndCloneRecIds,
There are consequential changes in other modules, but it compiles
at least the whole standard libraries happily, and the codegen tests,
so I'm reasonably confident in it. But watch out for new strange
happenings.
Revision Changes Path
1.83 +3 -5 fptools/ghc/compiler/basicTypes/Id.lhs
1.68 +13 -54 fptools/ghc/compiler/basicTypes/IdInfo.lhs
1.21 +190 -89 fptools/ghc/compiler/coreSyn/Subst.lhs
1.44 +740 -743 fptools/ghc/compiler/simplCore/SetLevels.lhs
1.60 +21 -14 fptools/ghc/compiler/simplCore/SimplUtils.lhs
1.103 +41 -24 fptools/ghc/compiler/simplCore/Simplify.lhs
1.73 +17 -18 fptools/ghc/compiler/specialise/Specialise.lhs