Be more conservative about duplicating continuations
authorsimonpj@microsoft.com <unknown>
Mon, 14 Aug 2006 16:54:24 +0000 (16:54 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 14 Aug 2006 16:54:24 +0000 (16:54 +0000)
commitda10704518081f55e848095d6b49bc8e11a2a3bb
tree0896494cacae8d3ea5b773ee8e1265a5fa8f5fd6
parent098d99aa2967cd35bdfe2a8c48ea8eee8ffd4f11
Be more conservative about duplicating continuations

Roman found that GHC was duplicating continuations that arose (essentially)
from uses of 'seq', or strict constructors.  This fixes the problem;
see the comments mkDupableCont (the Select case with a single alternative).

I'm a little concerned that this may also miss useful case-of-case
tranformations, so I'd like to know if anyone finds that this patch
makes performance worse.

To make it a bit more gung-ho, one could check for all the binders
being dead, before choosing this new, conservative alternative.
compiler/simplCore/Simplify.lhs