Allow users to ignore optimization changes

Authored by dfeuer on Oct 24 2017, 3:30 PM.


  • Add a new flag, -fignore-optim-changes, allowing them to avoid recompilation if the only changes are to the -O level or to flags controlling optimizations.
  • When -fignore-optim-changes is *off*, recompile when optimization flags (e.g., -fno-full-laziness) change. Previously, we ignored these unconditionally when deciding whether to recompile a module.

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
dfeuer created this revision.Oct 24 2017, 3:30 PM

Can we finish this up today, @dfeuer? Keep in mind that we are holding 8.2.2 for this.


This should likely have a reference to the Note which will document this change.

dfeuer updated this revision to Diff 14474.Oct 26 2017, 1:07 AM
  • Add hpc; add tests; add docs
dfeuer updated this revision to Diff 14476.Oct 26 2017, 1:28 AM
  • Follow Joachim's past advice
dfeuer updated this revision to Diff 14477.Oct 26 2017, 3:11 AM
  • Accept new test results.
  • Rebase.
dfeuer added inline comments.Oct 26 2017, 8:42 AM

Make spelling consistent.

simonmar requested changes to this revision.Nov 2 2017, 5:15 AM
simonmar added a subscriber: simonmar.

Can -fignore-optim-changes be the default in GHCi? I don't see any reason why it shoudn't be - you'll be happy to get an optimised object file if one exists, but surprised if it didn't load, and most people won't know about the special flag.

This revision now requires changes to proceed.Nov 2 2017, 5:15 AM
austin resigned from this revision.Nov 9 2017, 5:45 PM
dfeuer updated this revision to Diff 14836.Nov 27 2017, 4:35 PM
  • Make -fignore-...-changes the default for GHCi
simonmar added inline comments.Nov 28 2017, 2:58 PM
254–257 ↗(On Diff #14836)

Is it necessary to say this? I feel like it's more likely to cause confusion than not. If you have gone to the trouble to add -fno-ignore-optim-changes then you probably know what you're doing.


Suggest changing imp_qual_enabled now, maybe default_interactive_flags?

duog added a subscriber: duog.EditedNov 28 2017, 3:16 PM

s/optimization/optimisation :)

EDIT: Oh, I see you've already got a note to do this.

dfeuer updated this revision to Diff 14849.Nov 29 2017, 3:46 PM

Address comments; adjust test results; rebase

dfeuer updated this revision to Diff 14872.Dec 1 2017, 5:36 PM

Update changelog; add note

simonmar accepted this revision.Dec 4 2017, 10:21 AM
This revision is now accepted and ready to land.Dec 4 2017, 10:21 AM
This revision was automatically updated to reflect the committed changes.