[commit: ghc] master: Fix Trac #5658: strict bindings not floated in (3beb1a8)
Simon Peyton Jones
simonpj at microsoft.com
Thu Jan 12 18:26:15 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/3beb1a831b37f616b5e8092def2e51cd9825735f
>---------------------------------------------------------------
commit 3beb1a831b37f616b5e8092def2e51cd9825735f
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Thu Jan 12 17:17:22 2012 +0000
Fix Trac #5658: strict bindings not floated in
Two changes here
* The main change here is to enhance the FloatIn pass so that it can
float case-bindings inwards. In particular the case bindings for
array indexing.
* Also change the code in Simplify, to allow a case on array
indexing (ie can_fail is true) to be discarded altogether if its
results are unused.
Lots of new comments in PrimOp about can_fail and has_side_effects
Some refactoring to share the FloatBind data structure between
FloatIn and FloatOut
compiler/coreSyn/CorePrep.lhs | 2 +-
compiler/coreSyn/CoreUtils.lhs | 55 +++++++------
compiler/coreSyn/MkCore.lhs | 22 +++++
compiler/prelude/PrimOp.lhs | 163 ++++++++++++++++++++++-----------------
compiler/simplCore/FloatIn.lhs | 121 ++++++++++++++++++-----------
compiler/simplCore/FloatOut.lhs | 20 +----
compiler/simplCore/SimplEnv.lhs | 1 +
compiler/simplCore/Simplify.lhs | 10 ++-
8 files changed, 236 insertions(+), 158 deletions(-)
Diff suppressed because of size. To see it, use:
git show 3beb1a831b37f616b5e8092def2e51cd9825735f
More information about the Cvs-ghc
mailing list