Skip to content

Commit 3ea6a9a

Browse files
committed
Recommit "[LoopFlatten] Enable it by default"
The problem in 58441 that was reported after enabling this last time was fixed in 8e9e22f.
1 parent 3faf1f1 commit 3ea6a9a

9 files changed

+10
-1
lines changed

llvm/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Non-comprehensive list of changes in this release
4747
is not a constant in coroutines. This decision may cause unnecessary
4848
performance regressions and we plan to fix it in later versions.
4949

50+
* The LoopFlatten pass is now enabled by default.
51+
5052
* ...
5153

5254
Update on required toolchains to build LLVM

llvm/lib/Passes/PassBuilderPipelines.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static cl::opt<bool> EnableUnrollAndJam("enable-unroll-and-jam",
209209
cl::init(false), cl::Hidden,
210210
cl::desc("Enable Unroll And Jam Pass"));
211211

212-
static cl::opt<bool> EnableLoopFlatten("enable-loop-flatten", cl::init(false),
212+
static cl::opt<bool> EnableLoopFlatten("enable-loop-flatten", cl::init(true),
213213
cl::Hidden,
214214
cl::desc("Enable the LoopFlatten Pass"));
215215

llvm/test/Other/new-pm-defaults.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
; CHECK-O-NEXT: Running pass: LICM
175175
; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
176176
; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
177+
; CHECK-O-NEXT: Running pass: LoopFlattenPass
177178
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
178179
; CHECK-O-NEXT: Running pass: InstCombinePass
179180
; CHECK-O-NEXT: Running pass: LoopSimplifyPass

llvm/test/Other/new-pm-lto-defaults.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
; CHECK-O23SZ-NEXT: Running pass: MergedLoadStoreMotionPass on foo
117117
; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass on foo
118118
; CHECK-O23SZ-NEXT: Running pass: LCSSAPass on foo
119+
; CHECK-O23SZ-NEXT: Running pass: LoopFlattenPass on loop
119120
; CHECK-O23SZ-NEXT: Running pass: IndVarSimplifyPass on loop
120121
; CHECK-O23SZ-NEXT: Running pass: LoopDeletionPass on loop
121122
; CHECK-O23SZ-NEXT: Running pass: LoopFullUnrollPass on loop

llvm/test/Other/new-pm-thinlto-defaults.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
; CHECK-O-NEXT: Running pass: LICM
150150
; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
151151
; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
152+
; CHECK-O-NEXT: Running pass: LoopFlattenPass
152153
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
153154
; CHECK-O-NEXT: Running pass: InstCombinePass
154155
; CHECK-O-NEXT: Running pass: LoopSimplifyPass

llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
; CHECK-O-NEXT: Running pass: LICM
111111
; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
112112
; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
113+
; CHECK-O-NEXT: Running pass: LoopFlattenPass
113114
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
114115
; CHECK-O-NEXT: Running pass: InstCombinePass
115116
; CHECK-O-NEXT: Running pass: LoopSimplifyPass

llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
; CHECK-O-NEXT: Running pass: LICM
120120
; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
121121
; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
122+
; CHECK-O-NEXT: Running pass: LoopFlattenPass
122123
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
123124
; CHECK-O-NEXT: Running pass: InstCombinePass
124125
; CHECK-O-NEXT: Running pass: LoopSimplifyPass

llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@
148148
; CHECK-O-NEXT: Running pass: LICM
149149
; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
150150
; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
151+
; CHECK-O-NEXT: Running pass: LoopFlattenPass
151152
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
152153
; CHECK-O-NEXT: Running pass: InstCombinePass
153154
; CHECK-O-NEXT: Running pass: LoopSimplifyPass

llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
; CHECK-O-NEXT: Running pass: LICM
115115
; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
116116
; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
117+
; CHECK-O-NEXT: Running pass: LoopFlattenPass
117118
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
118119
; CHECK-O-NEXT: Running pass: InstCombinePass
119120
; CHECK-O-NEXT: Running pass: LoopSimplifyPass

0 commit comments

Comments
 (0)