Optimise common cases of GHC.setProgramDynFlags
authorSimon Marlow <marlowsd@gmail.com>
Sat, 1 Apr 2017 15:51:43 +0000 (11:51 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sat, 1 Apr 2017 16:31:59 +0000 (12:31 -0400)
commit3b5f786c7257298657fd34b3840d8cf6da968ef6
tree1ee1e930874dd4fa9a61e0287fc64afe3b5e543d
parent83ac462449d9365ebd8b51f252f9cf81b35f119d
Optimise common cases of GHC.setProgramDynFlags

* If the package flags haven't changed, don't do initPackages (which
  might take multiple seconds in extreme cases)

* Provide a way to change the log_action without invalidating the
  summary cache.

Test Plan: validate

Reviewers: niteria, bgamari, austin, erikd, ezyang

Reviewed By: bgamari

Subscribers: mpickering, rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3392
compiler/main/DriverPipeline.hs
compiler/main/DynFlags.hs
compiler/main/GHC.hs
compiler/main/Packages.hs
ghc/GHCi/UI.hs