Refactor OccAnal; and improve dead-code elimination
authorsimonpj@microsoft.com <unknown>
Wed, 5 Mar 2008 15:57:08 +0000 (15:57 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 5 Mar 2008 15:57:08 +0000 (15:57 +0000)
commit6dc702e8e8b744196b5841729d16d03f83218834
tree1114ed283943dce3be8fd57295c7617148199c2e
parent0843c0bdc66008008d38eff07c90437ed56d9ca1
Refactor OccAnal; and improve dead-code elimination

The occurrence analyer is now really rather subtle when dealing
with recursive groups; see Note [Loop breaking and RULES] especially.

This patch refactors this code a bit, notably
  * Introduces a new data type Details instead of a tuple

  * More clearly breaks up a recursive group into its SCCs
before processing it in a separate function occAnalRec

  * As a result, does better dead-code elimination, becuause it's
    done per SCC rather than for the whole Rec
compiler/simplCore/OccurAnal.lhs