Skip to content

Commit 77db84a

Browse files
bgamariMarge Bot
authored and
Marge Bot
committed
llvmGen: Adapt to allow use of new pass manager.
We now must use `-passes` in place of `-O<n>` due to #21936. Closes #21936.
1 parent d309f4e commit 77db84a

File tree

5 files changed

+4
-9
lines changed

5 files changed

+4
-9
lines changed

compiler/GHC/Driver/DynFlags.hs

-1
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,6 @@ optLevelFlags -- see Note [Documenting optimisation flags]
12501250
= [ ([0,1,2], Opt_DoLambdaEtaExpansion)
12511251
, ([1,2], Opt_DoCleverArgEtaExpansion) -- See Note [Eta expansion of arguments in CorePrep]
12521252
, ([0,1,2], Opt_DoEtaReduction) -- See Note [Eta-reduction in -O0]
1253-
, ([0,1,2], Opt_LlvmTBAA)
12541253
, ([0,1,2], Opt_ProfManualCcs )
12551254
, ([2], Opt_DictsStrict)
12561255

compiler/GHC/Driver/Flags.hs

-2
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ data GeneralFlag
286286
| Opt_RegsGraph -- do graph coloring register allocation
287287
| Opt_RegsIterative -- do iterative coalescing graph coloring register allocation
288288
| Opt_PedanticBottoms -- Be picky about how we treat bottom
289-
| Opt_LlvmTBAA -- Use LLVM TBAA infrastructure for improving AA (hidden flag)
290289
| Opt_LlvmFillUndefWithGarbage -- Testing for undef bugs (hidden flag)
291290
| Opt_IrrefutableTuples
292291
| Opt_CmmSink
@@ -529,7 +528,6 @@ optimisationFlags = EnumSet.fromList
529528
, Opt_EnableRewriteRules
530529
, Opt_RegsGraph
531530
, Opt_RegsIterative
532-
, Opt_LlvmTBAA
533531
, Opt_IrrefutableTuples
534532
, Opt_CmmSink
535533
, Opt_CmmElimCommonBlocks

compiler/GHC/Driver/Pipeline/Execute.hs

+1-2
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,7 @@ llvmOptions :: LlvmConfig
930930
-> DynFlags
931931
-> [(String, String)] -- ^ pairs of (opt, llc) arguments
932932
llvmOptions llvm_config dflags =
933-
[("-enable-tbaa -tbaa", "-enable-tbaa") | gopt Opt_LlvmTBAA dflags ]
934-
++ [("-relocation-model=" ++ rmodel
933+
[("-relocation-model=" ++ rmodel
935934
,"-relocation-model=" ++ rmodel) | not (null rmodel)]
936935

937936
-- Additional llc flags

compiler/GHC/Driver/Session.hs

-1
Original file line numberDiff line numberDiff line change
@@ -2411,7 +2411,6 @@ fFlagsDeps = [
24112411
flagSpec "late-dmd-anal" Opt_LateDmdAnal,
24122412
flagSpec "late-specialise" Opt_LateSpecialise,
24132413
flagSpec "liberate-case" Opt_LiberateCase,
2414-
flagHiddenSpec "llvm-tbaa" Opt_LlvmTBAA,
24152414
flagHiddenSpec "llvm-fill-undef-with-garbage" Opt_LlvmFillUndefWithGarbage,
24162415
flagSpec "loopification" Opt_Loopification,
24172416
flagSpec "block-layout-cfg" Opt_CfgBlocklayout,

llvm-passes

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[
2-
(0, "-enable-new-pm=0 -mem2reg -globalopt -lower-expect"),
3-
(1, "-enable-new-pm=0 -O1 -globalopt"),
4-
(2, "-enable-new-pm=0 -O2")
2+
(0, "-passes=function(require<tbaa>),function(mem2reg),globalopt,function(lower-expect)"),
3+
(1, "-passes=default<O1>"),
4+
(2, "-passes=default<O2>")
55
]

0 commit comments

Comments
 (0)