Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : ghc-7.2
http://hackage.haskell.org/trac/ghc/changeset/391690c97fa34cd218463e751a4eb2f0e9500297 >--------------------------------------------------------------- commit 391690c97fa34cd218463e751a4eb2f0e9500297 Author: Simon Peyton Jones <[email protected]> Date: Mon Jun 27 08:54:29 2011 +0100 Add case-floating to the float-out pass There are two things in this patch. First, a new feature. Given (case x of I# y -> ...) where 'x' is known to be evaluated, the float-out pass will float the case outwards towards x's binding. Of course this doesn't happen if 'x' is evaluated because of an enclosing case (becuase then the inner case would be eliminated) but it *does* happen when x is bound by a constructor with a strict field. This happens in DPH. Trac #4081. The second change is a significant refactoring of the way the let-floater works. Now SetLevels makes a decision about whether the let (or case) will move, and records that decision in the FloatSpec flag. This change makes the whole caboodle much easier to think about. compiler/simplCore/FloatOut.lhs | 297 +++++++++++++++++++++---------------- compiler/simplCore/SetLevels.lhs | 302 ++++++++++++++++++++++---------------- 2 files changed, 343 insertions(+), 256 deletions(-) Diff suppressed because of size. To see it, use: git show 391690c97fa34cd218463e751a4eb2f0e9500297 _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
