diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2022-03-21 14:57:43 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-05-17 20:22:02 -0400 |
commit | ef3c8d9e077a1d4ede0724075489fb1f12afa3f9 (patch) | |
tree | 9bd61626c036af10e0866aa6a5541d33cac60e4c /utils/llvm-targets | |
parent | 0e2d16eb76037152c96226f0f65a5ebdee64f7b6 (diff) | |
download | haskell-ef3c8d9e077a1d4ede0724075489fb1f12afa3f9.tar.gz |
Don't store LlvmConfig into DynFlags
LlvmConfig contains information read from llvm-passes and llvm-targets
files in GHC's top directory. Reading these files is done only when
needed (i.e. when the LLVM backend is used) and cached for the whole
compiler session. This patch changes the way this is done:
- Split LlvmConfig into LlvmConfig and LlvmConfigCache
- Store LlvmConfigCache in HscEnv instead of DynFlags: there is no
good reason to store it in DynFlags. As it is fixed per session, we
store it in the session state instead (HscEnv).
- Initializing LlvmConfigCache required some changes to driver functions
such as newHscEnv. I've used the opportunity to untangle initHscEnv
from initGhcMonad (in top-level GHC module) and to move it to
GHC.Driver.Main, close to newHscEnv.
- I've also made `cmmPipeline` independent of HscEnv in order to remove
the call to newHscEnv in regalloc_unit_tests.
Diffstat (limited to 'utils/llvm-targets')
-rwxr-xr-x | utils/llvm-targets/gen-data-layout.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/llvm-targets/gen-data-layout.sh b/utils/llvm-targets/gen-data-layout.sh index ed33e6c4f4..fd488d2f8b 100755 --- a/utils/llvm-targets/gen-data-layout.sh +++ b/utils/llvm-targets/gen-data-layout.sh @@ -16,7 +16,7 @@ # Add missing targets to the list below to have them included in # llvm-targets file. # -# See Note [LLVM configuration] in GHC.SysTools for the whole story regarding LLVM +# See Note [LLVM configuration] in GHC.CmmToLlvm.Config for the whole story regarding LLVM # configuration data. # Target sets for which to generate the llvm-targets file |