Commit c3693c2d authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Fix Trac #2321: bug in SAT

  This is a fairly substantial rewrite of the Static Argument Transformatoin,
  done by Max Bolingbroke and reviewed and modified by Simon PJ.
  
  * Fix a subtle scoping problem; see Note [Binder type capture]
  * Redo the analysis to use environments
  * Run gentle simlification just before the transformation
parent d9a3a2f8
...@@ -849,7 +849,7 @@ getCoreToDo dflags ...@@ -849,7 +849,7 @@ getCoreToDo dflags
liberate_case = dopt Opt_LiberateCase dflags liberate_case = dopt Opt_LiberateCase dflags
rule_check = ruleCheck dflags rule_check = ruleCheck dflags
vectorisation = dopt Opt_Vectorise dflags vectorisation = dopt Opt_Vectorise dflags
-- static_args = dopt Opt_StaticArgumentTransformation dflags static_args = dopt Opt_StaticArgumentTransformation dflags
maybe_rule_check phase = runMaybe rule_check (CoreDoRuleCheck phase) maybe_rule_check phase = runMaybe rule_check (CoreDoRuleCheck phase)
...@@ -903,8 +903,7 @@ getCoreToDo dflags ...@@ -903,8 +903,7 @@ getCoreToDo dflags
-- may expose extra opportunities to float things outwards. However, to fix -- may expose extra opportunities to float things outwards. However, to fix
-- up the output of the transformation we need at do at least one simplify -- up the output of the transformation we need at do at least one simplify
-- after this before anything else -- after this before anything else
-- runWhen static_args CoreDoStaticArgs, runWhen static_args (CoreDoPasses [ simpl_gently, CoreDoStaticArgs ]),
-- XXX disabled, see #2321
-- initial simplify: mk specialiser happy: minimum effort please -- initial simplify: mk specialiser happy: minimum effort please
simpl_gently, simpl_gently,
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment