diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2013-12-18 00:11:25 +0100 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2013-12-18 00:11:25 +0100 |
commit | e009b4f1676c3ae080b59cb1e0914409e0c4660c (patch) | |
tree | cd5441a9f21efda4c136dcc44e4b1c4dcecabfea /compiler/simplCore/SimplCore.lhs | |
parent | 043af4d88ecfa2857519f035dea6f8dd7d0133ef (diff) | |
download | haskell-wip/common-context.tar.gz |
Move Common Context after CSEwip/common-context
We had something like
let $j = ...
in case foo of ... -> case $j a b c of ... -> case foo of
and moving the inner "case foo" into $j prevented CSE from happening
here.
(Although presumably the "let $j" could be moved inside the outer case
before CSE, to give CSE a greater scope here.)
Diffstat (limited to 'compiler/simplCore/SimplCore.lhs')
-rw-r--r-- | compiler/simplCore/SimplCore.lhs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/simplCore/SimplCore.lhs b/compiler/simplCore/SimplCore.lhs index 92784d33b3..110c461d39 100644 --- a/compiler/simplCore/SimplCore.lhs +++ b/compiler/simplCore/SimplCore.lhs @@ -190,8 +190,6 @@ getCoreToDo dflags demand_analyser = (CoreDoPasses ([ CoreDoStrictness, CoreDoWorkerWrapper, - simpl_phase 0 ["post-worker-wrapper"] max_iter, - CoreCommonContext, simpl_phase 0 ["post-worker-wrapper"] max_iter ])) @@ -293,6 +291,9 @@ getCoreToDo dflags -- reduce the possiblility of shadowing -- Reason: see Note [Shadowing] in SpecConstr.lhs + CoreCommonContext, + simpl_phase 0 ["post-common-context"] max_iter, + runWhen spec_constr CoreDoSpecConstr, maybe_rule_check (Phase 0), |