patch applied (ghc): Improve the loop-breaking heuristics
Simon Peyton Jones
simonpj at microsoft.com
Wed Nov 29 21:17:18 EST 2006
Wed Nov 29 13:24:40 PST 2006 simonpj at microsoft.com
* Improve the loop-breaking heuristics
The loop-breaking heuristics were making it a high priority to
avoid choosing a variable as a loop breaker if its *type* was a
data type. The reason is that it's very good to be able to "see"
constructor applications.
But it's only good if the constructor application is *visible*,
so that is what I test for now. I found a case (when testing
SpecConstr) where I had a Rec like this:
rec { lvl = foo Nothing
foo = ...
RULE foo Nothing = ...
}
Even if lvl has a data type, it's much better to make lvl the loop
breaker, not foo, so that foo's RULE is visible in lvl's RHS.
M ./compiler/simplCore/OccurAnal.lhs -4 +7
More information about the Cvs-ghc
mailing list