#5658: Strict bindings are wrongly floated out of case alternatives.
---------------------------------+------------------------------------------
Reporter: benl | Owner: benl
Type: bug | Status: new
Priority: high | Milestone: 7.4.1
Component: Compiler | Version: 7.2.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Runtime crash
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by simonpj@…):
commit 3beb1a831b37f616b5e8092def2e51cd9825735f
{{{
Author: Simon Peyton Jones <[email protected]>
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 | 123 +++++++++++++++++++-----------
compiler/simplCore/FloatOut.lhs | 20 +----
compiler/simplCore/SimplEnv.lhs | 1 +
compiler/simplCore/Simplify.lhs | 10 ++-
8 files changed, 237 insertions(+), 159 deletions(-)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5658#comment:18>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs