diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-07-29 19:34:57 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-10-07 12:01:46 -0400 |
commit | b2577081528fe36facf5153bed256fe838a74ae6 (patch) | |
tree | c0ce42d462656bc3dae6543c5239a8e56a5e2217 /compiler/main/GHC.hs | |
parent | 825c108bd26f20accf1eaef2ba652a2ee12924bb (diff) | |
download | haskell-b2577081528fe36facf5153bed256fe838a74ae6.tar.gz |
Refactor, document, and optimize LLVM configuration loading
As described in the new Note [LLVM Configuration] in SysTools, we now
load llvm-targets and llvm-passes lazily to avoid the overhead of doing
so when -fllvm isn't used (also known as "the common case").
Noticed in #17003.
Metric Decrease:
T12234
T12150
Diffstat (limited to 'compiler/main/GHC.hs')
-rw-r--r-- | compiler/main/GHC.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index f948f454a7..dc336e3914 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -505,7 +505,7 @@ initGhcMonad mb_top_dir = do { env <- liftIO $ do { top_dir <- findTopDir mb_top_dir ; mySettings <- initSysTools top_dir - ; myLlvmConfig <- initLlvmConfig top_dir + ; myLlvmConfig <- lazyInitLlvmConfig top_dir ; dflags <- initDynFlags (defaultDynFlags mySettings myLlvmConfig) ; checkBrokenTablesNextToCode dflags ; setUnsafeGlobalDynFlags dflags |