diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-09-14 16:59:18 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2022-12-21 16:18:59 -0500 |
commit | 30694951430f25f8b02deadc557e689f3e93cc07 (patch) | |
tree | dcb2297828604725d365d89159e22b6eadaf15f0 /compiler | |
parent | 3d55d8ab51ece43c51055c43c9e7aba77cce46c0 (diff) | |
download | haskell-wip/bump-llvm.tar.gz |
llvmGen: Adapt to allow LLVM 15wip/bump-llvm
We now must use `-passes` in place of `-O<n>` due to #21936.
Closes #21936.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Driver/Flags.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Driver/Pipeline/Execute.hs | 3 | ||||
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 2 |
3 files changed, 1 insertions, 6 deletions
diff --git a/compiler/GHC/Driver/Flags.hs b/compiler/GHC/Driver/Flags.hs index f45397d887..0559b2f64f 100644 --- a/compiler/GHC/Driver/Flags.hs +++ b/compiler/GHC/Driver/Flags.hs @@ -264,7 +264,6 @@ data GeneralFlag | Opt_RegsGraph -- do graph coloring register allocation | Opt_RegsIterative -- do iterative coalescing graph coloring register allocation | Opt_PedanticBottoms -- Be picky about how we treat bottom - | Opt_LlvmTBAA -- Use LLVM TBAA infrastructure for improving AA (hidden flag) | Opt_LlvmFillUndefWithGarbage -- Testing for undef bugs (hidden flag) | Opt_IrrefutableTuples | Opt_CmmSink @@ -504,7 +503,6 @@ optimisationFlags = EnumSet.fromList , Opt_RegsGraph , Opt_RegsIterative , Opt_PedanticBottoms - , Opt_LlvmTBAA , Opt_LlvmFillUndefWithGarbage , Opt_IrrefutableTuples , Opt_CmmSink diff --git a/compiler/GHC/Driver/Pipeline/Execute.hs b/compiler/GHC/Driver/Pipeline/Execute.hs index 30bd0531a0..1c21648210 100644 --- a/compiler/GHC/Driver/Pipeline/Execute.hs +++ b/compiler/GHC/Driver/Pipeline/Execute.hs @@ -977,8 +977,7 @@ llvmOptions :: LlvmConfig -> DynFlags -> [(String, String)] -- ^ pairs of (opt, llc) arguments llvmOptions llvm_config dflags = - [("-enable-tbaa -tbaa", "-enable-tbaa") | gopt Opt_LlvmTBAA dflags ] - ++ [("-relocation-model=" ++ rmodel + [("-relocation-model=" ++ rmodel ,"-relocation-model=" ++ rmodel) | not (null rmodel)] ++ [("-stack-alignment=" ++ (show align) ,"-stack-alignment=" ++ (show align)) | align > 0 ] diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index 831267e2bf..41045b7936 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -3437,7 +3437,6 @@ fFlagsDeps = [ flagSpec "late-dmd-anal" Opt_LateDmdAnal, flagSpec "late-specialise" Opt_LateSpecialise, flagSpec "liberate-case" Opt_LiberateCase, - flagHiddenSpec "llvm-tbaa" Opt_LlvmTBAA, flagHiddenSpec "llvm-fill-undef-with-garbage" Opt_LlvmFillUndefWithGarbage, flagSpec "loopification" Opt_Loopification, flagSpec "block-layout-cfg" Opt_CfgBlocklayout, @@ -3988,7 +3987,6 @@ optLevelFlags :: [([Int], GeneralFlag)] optLevelFlags -- see Note [Documenting optimisation flags] = [ ([0,1,2], Opt_DoLambdaEtaExpansion) , ([0,1,2], Opt_DoEtaReduction) -- See Note [Eta-reduction in -O0] - , ([0,1,2], Opt_LlvmTBAA) , ([0,1,2], Opt_ProfManualCcs ) , ([2], Opt_DictsStrict) |