[llvm] 481709e - [NewPM][opt] Share -disable-loop-unrolling between pass managers
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 08:54:19 PDT 2020
Author: Arthur Eubanks
Date: 2020-07-08T08:50:56-07:00
New Revision: 481709e831b9e14793dea0a825ecc9cd5f1950ca
URL: https://github.com/llvm/llvm-project/commit/481709e831b9e14793dea0a825ecc9cd5f1950ca
DIFF: https://github.com/llvm/llvm-project/commit/481709e831b9e14793dea0a825ecc9cd5f1950ca.diff
LOG: [NewPM][opt] Share -disable-loop-unrolling between pass managers
There's no reason to introduce a new option for the NPM.
The various PGO options are shared in this manner.
Reviewed By: echristo
Differential Revision: https://reviews.llvm.org/D83368
Added:
Modified:
llvm/test/Transforms/LoopUnroll/FullUnroll.ll
llvm/tools/opt/NewPMDriver.cpp
llvm/tools/opt/opt.cpp
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LoopUnroll/FullUnroll.ll b/llvm/test/Transforms/LoopUnroll/FullUnroll.ll
index 01936e487682..5dee20be3325 100644
--- a/llvm/test/Transforms/LoopUnroll/FullUnroll.ll
+++ b/llvm/test/Transforms/LoopUnroll/FullUnroll.ll
@@ -1,4 +1,4 @@
-; RUN: opt -passes='default<O1>' -disable-verify --mtriple x86_64-pc-linux-gnu -new-pm-disable-loop-unrolling=true \
+; RUN: opt -passes='default<O1>' -disable-verify --mtriple x86_64-pc-linux-gnu -disable-loop-unrolling=true \
; RUN: -S -o - %s | FileCheck %s
; This checks that the loop full unroller will fire in the new pass manager
diff --git a/llvm/tools/opt/NewPMDriver.cpp b/llvm/tools/opt/NewPMDriver.cpp
index 0b572efc9010..8f8ca352dcff 100644
--- a/llvm/tools/opt/NewPMDriver.cpp
+++ b/llvm/tools/opt/NewPMDriver.cpp
@@ -102,9 +102,7 @@ static cl::opt<std::string> OptimizerLastEPPipeline(
cl::Hidden);
// Individual pipeline tuning options.
-static cl::opt<bool> DisableLoopUnrolling(
- "new-pm-disable-loop-unrolling",
- cl::desc("Disable loop unrolling in all relevant passes"), cl::init(false));
+extern cl::opt<bool> DisableLoopUnrolling;
extern cl::opt<PGOKind> PGOKindFlag;
extern cl::opt<std::string> ProfileFile;
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index d31b985dbdde..936cf1081f99 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -183,10 +183,9 @@ CodeGenOptLevel("codegen-opt-level",
static cl::opt<std::string>
TargetTriple("mtriple", cl::desc("Override target triple for module"));
-static cl::opt<bool>
-DisableLoopUnrolling("disable-loop-unrolling",
- cl::desc("Disable loop unrolling in all relevant passes"),
- cl::init(false));
+cl::opt<bool> DisableLoopUnrolling(
+ "disable-loop-unrolling",
+ cl::desc("Disable loop unrolling in all relevant passes"), cl::init(false));
static cl::opt<bool> EmitSummaryIndex("module-summary",
cl::desc("Emit module summary index"),
More information about the llvm-commits
mailing list