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
Showing
- compiler/coreSyn/CorePrep.lhs 1 addition, 1 deletioncompiler/coreSyn/CorePrep.lhs
- compiler/coreSyn/CoreUtils.lhs 30 additions, 25 deletionscompiler/coreSyn/CoreUtils.lhs
- compiler/coreSyn/MkCore.lhs 22 additions, 0 deletionscompiler/coreSyn/MkCore.lhs
- compiler/prelude/PrimOp.lhs 92 additions, 71 deletionscompiler/prelude/PrimOp.lhs
- compiler/simplCore/FloatIn.lhs 78 additions, 45 deletionscompiler/simplCore/FloatIn.lhs
- compiler/simplCore/FloatOut.lhs 4 additions, 16 deletionscompiler/simplCore/FloatOut.lhs
- compiler/simplCore/SimplEnv.lhs 1 addition, 0 deletionscompiler/simplCore/SimplEnv.lhs
- compiler/simplCore/Simplify.lhs 9 additions, 1 deletioncompiler/simplCore/Simplify.lhs
Loading
Please register or sign in to comment