Thu Nov 19 04:37:04 PST 2009 [email protected]
* Refactor case-merging and identical-alternative optimisations
Ignore-this: db12d31395ed99c2341cc4d7d5dca1e
These two optimisations were originally done by SimplUtils.mkCase
*after* all the pieces have been simplified. Some while ago I
moved them *before*, so they were done by SimplUtils.prepareAlts.
It think the reason was that I couldn't rely on the dead-binder
information on OutIds, and that info is useful in these optimisations.
However,
(a) Other changes (notably moving case-binder-swap to OccurAnal)
have meant that dead-binder information is accurate in
OutIds
(b) When there is a cascade of case-merges, they happen in
one sweep if you do it after, but in many sweeps if you
do it before. Reason: doing it after means you are looking
at nice simplified Core.
M ./compiler/simplCore/SimplUtils.lhs -138 +232
M ./compiler/simplCore/Simplify.lhs -66 +30
View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20091119123704-1287e-aa5e453aeabc754afe2eaf12c94b4f4bae1a966f.gz
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc