Optimisation flags at -O0
Edward Z. Yang
ezyang at mit.edu
Mon Jan 6 19:22:48 UTC 2014
All -f flags have a 'no' form, as in '-fno-spec-constr', so you can
manually toggle a single optimization on/off. Some optimizations apply
even at -O0, see optLevelFlags in compiler/main/DynFlags.hs
Edward
Excerpts from Chris Heller's message of 2014-01-05 18:43:46 -0800:
> I wanted to understand better what `-fspec-constr` does.
>
> So I compiled the User Guide example with `-O0 -fspec-constr` to isolate
> the effects of call-pattern specialization, and nothing else (I used
> ghc-core to pretty-print the resulting Core syntax).
>
> It appears I get the same output wether I use `-fspec-constr` or not.
>
> Does this mean that compiling with `-O0` even explicitly enabled
> optimizations are turned off?
>
> If that is the case, how does one test an isolated optimization?
>
> -Chris
More information about the ghc-devs
mailing list