Optimise common cases of GHC.setProgramDynFlags

Authored by simonmar on Apr 1 2017, 10:51 AM.

Description

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