diff options
author | Zubin Duggal <zubin.duggal@gmail.com> | 2022-02-09 17:01:38 +0530 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-02-17 10:35:43 +0000 |
commit | 0afa19da629c6f2852e77e134902304b82a91e84 (patch) | |
tree | 418f657b01ccac353815a94172c840d3c27fef4d /compiler/GHC/Driver/Plugins.hs | |
parent | 4127e86dfdfcfce60e5029c716c98c244851779a (diff) | |
download | haskell-wip/th-recomp.tar.gz |
Track object file dependencies for TH accurately (#20604)wip/th-recomp
`hscCompileCoreExprHook` is changed to return a list of `Module`s required
by a splice. These modules are accumulated in the TcGblEnv (tcg_th_needed_mods).
Dependencies on the object files of these modules are recording in the
interface.
The data structures in `LoaderState` are replaced with more efficient versions
to keep track of all the information required. The
MultiLayerModulesTH_Make allocations increase slightly but runtime is
faster.
Fixes #20604
-------------------------
Metric Increase:
MultiLayerModulesTH_Make
-------------------------
Diffstat (limited to 'compiler/GHC/Driver/Plugins.hs')
-rw-r--r-- | compiler/GHC/Driver/Plugins.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Plugins.hs b/compiler/GHC/Driver/Plugins.hs index 4fbbd5ce32..9afb556311 100644 --- a/compiler/GHC/Driver/Plugins.hs +++ b/compiler/GHC/Driver/Plugins.hs @@ -79,6 +79,8 @@ import Data.List (sort) import qualified Data.Semigroup import Control.Monad +import GHC.Linker.Types +import GHC.Types.Unique.DFM -- | Command line options gathered from the -PModule.Name:stuff syntax -- are given to you as this type @@ -269,10 +271,13 @@ data Plugins = Plugins -- The purpose of this field is to cache the plugins so they -- don't have to be loaded each time they are needed. See -- 'GHC.Runtime.Loader.initializePlugins'. + , loadedPluginDeps :: !([Linkable], PkgsLoaded) + -- ^ The object files required by the loaded plugins + -- See Note [Plugin dependencies] } emptyPlugins :: Plugins -emptyPlugins = Plugins [] [] +emptyPlugins = Plugins [] [] ([], emptyUDFM) pluginsWithArgs :: Plugins -> [PluginWithArgs] |