Extract hard-coded LLVM opt flags into a file
To resolve ticket #11295, I think it makes sense to stop hard-coding the pass sequences used by GHC when compiling with LLVM into the compiler itself. This patchset introduces a companion to the existing `llvm-targets` file called `llvm-passes`. The passes file is a simple association list that holds the default LLVM `opt` pass sequence used by GHC. This allows end users to easily save their favorite optimization flags when compiling with LLVM. The main benefit for ticket #11295 is that when adding a custom pass sequence, it tends to be an extremely long string that would be unsightly in the code. This is essentially part 1 of 2 for ticket #11295. Test Plan: ./validate Reviewers: bgamari, angerman Reviewed By: angerman Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4695
Showing
- compiler/main/DriverPipeline.hs 6 additions, 4 deletionscompiler/main/DriverPipeline.hs
- compiler/main/DynFlags.hs 9 additions, 4 deletionscompiler/main/DynFlags.hs
- compiler/main/GHC.hs 2 additions, 2 deletionscompiler/main/GHC.hs
- compiler/main/SysTools.hs 16 additions, 10 deletionscompiler/main/SysTools.hs
- ghc.mk 4 additions, 3 deletionsghc.mk
- ghc/GHCi/UI.hs 6 additions, 2 deletionsghc/GHCi/UI.hs
- ghc/ghc.mk 6 additions, 2 deletionsghc/ghc.mk
- llvm-passes 5 additions, 0 deletionsllvm-passes
Loading
Please register or sign in to comment