From 8250180238575ad81aed2104ca69b8fdc98d60df Mon Sep 17 00:00:00 2001 From: Sjoerd Meijer Date: Mon, 5 Dec 2022 14:52:40 +0000 Subject: [PATCH] Revert "Recommit "[LoopFlatten] Enable it by default"" This reverts commit 3ea6a9a469fde168c527b1c34c09f6d684ec86af because of the reported miscompilation in: https://github.com/llvm/llvm-project/issues/59339 --- llvm/docs/ReleaseNotes.rst | 2 -- llvm/lib/Passes/PassBuilderPipelines.cpp | 2 +- llvm/test/Other/new-pm-defaults.ll | 1 - llvm/test/Other/new-pm-lto-defaults.ll | 1 - llvm/test/Other/new-pm-thinlto-defaults.ll | 1 - llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll | 1 - llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll | 1 - llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll | 1 - llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll | 1 - 9 files changed, 1 insertion(+), 10 deletions(-) diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst index 1412b2f..ce46d43 100644 --- a/llvm/docs/ReleaseNotes.rst +++ b/llvm/docs/ReleaseNotes.rst @@ -47,8 +47,6 @@ Non-comprehensive list of changes in this release is not a constant in coroutines. This decision may cause unnecessary performance regressions and we plan to fix it in later versions. -* The LoopFlatten pass is now enabled by default. - * ... Update on required toolchains to build LLVM diff --git a/llvm/lib/Passes/PassBuilderPipelines.cpp b/llvm/lib/Passes/PassBuilderPipelines.cpp index df46119..0228613 100644 --- a/llvm/lib/Passes/PassBuilderPipelines.cpp +++ b/llvm/lib/Passes/PassBuilderPipelines.cpp @@ -209,7 +209,7 @@ static cl::opt EnableUnrollAndJam("enable-unroll-and-jam", cl::init(false), cl::Hidden, cl::desc("Enable Unroll And Jam Pass")); -static cl::opt EnableLoopFlatten("enable-loop-flatten", cl::init(true), +static cl::opt EnableLoopFlatten("enable-loop-flatten", cl::init(false), cl::Hidden, cl::desc("Enable the LoopFlatten Pass")); diff --git a/llvm/test/Other/new-pm-defaults.ll b/llvm/test/Other/new-pm-defaults.ll index abf4d91..ddb84d0 100644 --- a/llvm/test/Other/new-pm-defaults.ll +++ b/llvm/test/Other/new-pm-defaults.ll @@ -174,7 +174,6 @@ ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy -; CHECK-O-NEXT: Running pass: LoopFlattenPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running pass: LoopSimplifyPass diff --git a/llvm/test/Other/new-pm-lto-defaults.ll b/llvm/test/Other/new-pm-lto-defaults.ll index 18754d5..bbed7fb 100644 --- a/llvm/test/Other/new-pm-lto-defaults.ll +++ b/llvm/test/Other/new-pm-lto-defaults.ll @@ -116,7 +116,6 @@ ; CHECK-O23SZ-NEXT: Running pass: MergedLoadStoreMotionPass on foo ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass on foo ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass on foo -; CHECK-O23SZ-NEXT: Running pass: LoopFlattenPass on loop ; CHECK-O23SZ-NEXT: Running pass: IndVarSimplifyPass on loop ; CHECK-O23SZ-NEXT: Running pass: LoopDeletionPass on loop ; CHECK-O23SZ-NEXT: Running pass: LoopFullUnrollPass on loop diff --git a/llvm/test/Other/new-pm-thinlto-defaults.ll b/llvm/test/Other/new-pm-thinlto-defaults.ll index c23bbea..d4f9d56 100644 --- a/llvm/test/Other/new-pm-thinlto-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-defaults.ll @@ -149,7 +149,6 @@ ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy -; CHECK-O-NEXT: Running pass: LoopFlattenPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running pass: LoopSimplifyPass diff --git a/llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll b/llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll index eecae50..a292267 100644 --- a/llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll @@ -110,7 +110,6 @@ ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy -; CHECK-O-NEXT: Running pass: LoopFlattenPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running pass: LoopSimplifyPass diff --git a/llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll b/llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll index 8c3cedc..b8e3f16 100644 --- a/llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll @@ -119,7 +119,6 @@ ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy -; CHECK-O-NEXT: Running pass: LoopFlattenPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running pass: LoopSimplifyPass diff --git a/llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll b/llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll index 2e0773d..72ef377 100644 --- a/llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll @@ -148,7 +148,6 @@ ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy -; CHECK-O-NEXT: Running pass: LoopFlattenPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running pass: LoopSimplifyPass diff --git a/llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll b/llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll index 0eff163..cb9fe6e 100644 --- a/llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll +++ b/llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll @@ -114,7 +114,6 @@ ; CHECK-O-NEXT: Running pass: LICM ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy -; CHECK-O-NEXT: Running pass: LoopFlattenPass ; CHECK-O-NEXT: Running pass: SimplifyCFGPass ; CHECK-O-NEXT: Running pass: InstCombinePass ; CHECK-O-NEXT: Running pass: LoopSimplifyPass -- 2.7.4