Allow users to ignore optimization changes
authorDavid Feuer <david.feuer@gmail.com>
Mon, 11 Dec 2017 18:03:52 +0000 (13:03 -0500)
committerBen Gamari <ben@smart-cactus.org>
Mon, 11 Dec 2017 18:03:53 +0000 (13:03 -0500)
commit708ed9ca4dbf372817fe84a2fe486940123bddfb
tree30d67b789552b9f017674d4e9f2b6341cc75eede
parentcafe98345cb5d4b11f2059d60d2f20e976ef4f2a
Allow users to ignore optimization changes

* 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.

Reviewers: austin, bgamari, simonmar

Reviewed By: simonmar

Subscribers: duog, carter, simonmar, rwbarton, thomie

GHC Trac Issues: #13604

Differential Revision: https://phabricator.haskell.org/D4123
19 files changed:
compiler/iface/FlagChecker.hs
compiler/iface/LoadIface.hs
compiler/iface/MkIface.hs
compiler/main/DynFlags.hs
compiler/main/HscTypes.hs
docs/users_guide/8.4.1-notes.rst
docs/users_guide/separate_compilation.rst
ghc/Main.hs
testsuite/tests/driver/Makefile
testsuite/tests/driver/T13604.hs [new file with mode: 0644]
testsuite/tests/driver/T13604.stdout [new file with mode: 0644]
testsuite/tests/driver/T13604a.hs [new file with mode: 0644]
testsuite/tests/driver/T13604a.stdout [new file with mode: 0644]
testsuite/tests/driver/T13914/T13914.stdout
testsuite/tests/driver/all.T
testsuite/tests/ghci/scripts/T9293.stdout
testsuite/tests/ghci/scripts/ghci024.stdout
testsuite/tests/ghci/scripts/ghci057.stdout
testsuite/tests/hpc/T11798.stdout