[Pipeline] Remove -enable-npm-O3-nontrivial-unswitch flag
authorArthur Eubanks <aeubanks@google.com>
Thu, 16 Feb 2023 19:35:18 +0000 (11:35 -0800)
committerArthur Eubanks <aeubanks@google.com>
Thu, 16 Feb 2023 19:36:03 +0000 (11:36 -0800)
This was added to help debugging performance issues, no longer needed.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D98675

llvm/lib/Passes/PassBuilderPipelines.cpp
llvm/test/Transforms/SimpleLoopUnswitch/pipeline.ll

index c6288b4..738b021 100644 (file)
@@ -165,10 +165,6 @@ static cl::opt<bool> PerformMandatoryInliningsFirst(
     cl::desc("Perform mandatory inlinings module-wide, before performing "
              "inlining"));
 
-static cl::opt<bool> EnableO3NonTrivialUnswitching(
-    "enable-npm-O3-nontrivial-unswitch", cl::init(true), cl::Hidden,
-    cl::desc("Enable non-trivial loop unswitching for -O3"));
-
 static cl::opt<bool> EnableEagerlyInvalidateAnalyses(
     "eagerly-invalidate-analyses", cl::init(true), cl::Hidden,
     cl::desc("Eagerly invalidate more analyses in default pipelines"));
@@ -567,8 +563,7 @@ PassBuilder::buildFunctionSimplificationPipeline(OptimizationLevel Level,
   LPM1.addPass(LICMPass(PTO.LicmMssaOptCap, PTO.LicmMssaNoAccForPromotionCap,
                         /*AllowSpeculation=*/true));
   LPM1.addPass(
-      SimpleLoopUnswitchPass(/* NonTrivial */ Level == OptimizationLevel::O3 &&
-                             EnableO3NonTrivialUnswitching));
+      SimpleLoopUnswitchPass(/* NonTrivial */ Level == OptimizationLevel::O3));
   if (EnableLoopFlatten)
     LPM1.addPass(LoopFlattenPass());
 
index 3aab25f..0c65e49 100644 (file)
@@ -1,7 +1,6 @@
 ; RUN: opt < %s -S -passes="default<O1>" | FileCheck %s -check-prefixes=TRIVIAL,CHECK
 ; RUN: opt < %s -S -passes="default<O2>" | FileCheck %s -check-prefixes=TRIVIAL,CHECK
 ; RUN: opt < %s -S -passes="default<O3>" | FileCheck %s -check-prefixes=NONTRIVIAL,CHECK
-; RUN: opt < %s -S -passes="default<O3>" -enable-npm-O3-nontrivial-unswitch=0 | FileCheck %s -check-prefixes=TRIVIAL,CHECK
 ; RUN: opt < %s -S -passes="default<Os>" | FileCheck %s -check-prefixes=TRIVIAL,CHECK
 ; RUN: opt < %s -S -passes="default<Oz>" | FileCheck %s -check-prefixes=TRIVIAL,CHECK