Turning off case liberation when using the hpc option, for now
authorandy@galois.com <unknown>
Wed, 20 Jun 2007 06:49:43 +0000 (06:49 +0000)
committerandy@galois.com <unknown>
Wed, 20 Jun 2007 06:49:43 +0000 (06:49 +0000)
commitd363c1fc28d8227b27b4506ebeb089845c5b0af6
tree2bd8398c50c05fbf21fcd2df5865c8d8b11cbe0b
parentf4ab409231b5b904b9a25c07ac4e849c4a9be887
Turning off case liberation when using the hpc option, for now

Consider the following code

     f = g (case v of
              V a b -> a : t f)

where g is expensive. Liberate case will turn this into

     f = g (case v of
             V a b -> a : t (letrec f = g (case v of
                                           V a b -> a : f t)
                              in f)
           )

Yikes! We evaluate g twice. This leads to a O(2^n) explosion
if g calls back to the same code recursively.

This happen sometimes in HPC, because every tick is a liberate-able case,
but is a general problem to case liberation (I think).
compiler/main/DynFlags.hs