Skip to content

Commit 5f5cf60

Browse files
committed
[Pipeline] Remove -enable-npm-O3-nontrivial-unswitch flag
This was added to help debugging performance issues, no longer needed. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D98675
1 parent 4d16ebd commit 5f5cf60

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

llvm/lib/Passes/PassBuilderPipelines.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,6 @@ static cl::opt<bool> PerformMandatoryInliningsFirst(
165165
cl::desc("Perform mandatory inlinings module-wide, before performing "
166166
"inlining"));
167167

168-
static cl::opt<bool> EnableO3NonTrivialUnswitching(
169-
"enable-npm-O3-nontrivial-unswitch", cl::init(true), cl::Hidden,
170-
cl::desc("Enable non-trivial loop unswitching for -O3"));
171-
172168
static cl::opt<bool> EnableEagerlyInvalidateAnalyses(
173169
"eagerly-invalidate-analyses", cl::init(true), cl::Hidden,
174170
cl::desc("Eagerly invalidate more analyses in default pipelines"));
@@ -567,8 +563,7 @@ PassBuilder::buildFunctionSimplificationPipeline(OptimizationLevel Level,
567563
LPM1.addPass(LICMPass(PTO.LicmMssaOptCap, PTO.LicmMssaNoAccForPromotionCap,
568564
/*AllowSpeculation=*/true));
569565
LPM1.addPass(
570-
SimpleLoopUnswitchPass(/* NonTrivial */ Level == OptimizationLevel::O3 &&
571-
EnableO3NonTrivialUnswitching));
566+
SimpleLoopUnswitchPass(/* NonTrivial */ Level == OptimizationLevel::O3));
572567
if (EnableLoopFlatten)
573568
LPM1.addPass(LoopFlattenPass());
574569

llvm/test/Transforms/SimpleLoopUnswitch/pipeline.ll

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
; RUN: opt < %s -S -passes="default<O1>" | FileCheck %s -check-prefixes=TRIVIAL,CHECK
22
; RUN: opt < %s -S -passes="default<O2>" | FileCheck %s -check-prefixes=TRIVIAL,CHECK
33
; RUN: opt < %s -S -passes="default<O3>" | FileCheck %s -check-prefixes=NONTRIVIAL,CHECK
4-
; RUN: opt < %s -S -passes="default<O3>" -enable-npm-O3-nontrivial-unswitch=0 | FileCheck %s -check-prefixes=TRIVIAL,CHECK
54
; RUN: opt < %s -S -passes="default<Os>" | FileCheck %s -check-prefixes=TRIVIAL,CHECK
65
; RUN: opt < %s -S -passes="default<Oz>" | FileCheck %s -check-prefixes=TRIVIAL,CHECK
76

0 commit comments

Comments
 (0)