-- Similarly, don't apply any rules until after full
-- laziness. Notably, list fusion can prevent floating.
- NoCaseOfCase,
- -- Don't do case-of-case transformations.
- -- This makes full laziness work better
+ NoCaseOfCase, -- Don't do case-of-case transformations.
+ -- This makes full laziness work better
MaxSimplifierIterations max_iter
],
-- Case-liberation for -O2. This should be after
-- strictness analysis and the simplification which follows it.
- case rule_check of { Just pat -> CoreDoRuleCheck 0 pat; Nothing -> CoreDoNothing },
+ case rule_check of { Just pat -> CoreDoRuleCheck 0 pat; Nothing -> CoreDoNothing }
+ ]
+
+ ++
- if opt_level >= 2 then
- CoreLiberateCase
- else
- CoreDoNothing,
- if opt_level >= 2 then
- CoreDoSpecConstr
- else
- CoreDoNothing,
+ (if opt_level >= 2 then
+ [ CoreLiberateCase,
+ CoreDoSimplify (SimplPhase 0) [
+ MaxSimplifierIterations max_iter
+ ], -- Run the simplifier after LiberateCase to vastly
+ -- reduce the possiblility of shadowing
+ -- Reason: see Note [Shadowing] in SpecConstr.lhs
+ CoreDoSpecConstr
+ ]
+ else
+ [])
+
+ ++
-- Final clean-up simplification:
- CoreDoSimplify (SimplPhase 0) [
+ [ CoreDoSimplify (SimplPhase 0) [
MaxSimplifierIterations max_iter
]
]
-- and get in the way of -split-objs. Another option
-- would be to throw them away in the mangler, but this
-- is easier.
+#ifdef HAVE_GCC_HAS_NO_UNIT_AT_A_TIME
"-fno-unit-at-a-time",
-- unit-at-a-time doesn't do us any good, and screws
-- up -split-objs by moving the split markers around.
-- It's only turned on with -O2, but put it here just
-- in case someone uses -optc-O2.
+#endif
"-fno-builtin"
-- calling builtins like strlen() using the FFI can
-- cause gcc to run out of regs, so use the external