Skip to content

Commit a007cea

Browse files
committed
fixup! move enable-fusion to NewPMDriver
1 parent 551813b commit a007cea

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

llvm/lib/Passes/PassBuilderPipelines.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,6 @@ static cl::opt<bool>
205205
EnableLoopInterchange("enable-loopinterchange", cl::init(false), cl::Hidden,
206206
cl::desc("Enable the LoopInterchange Pass"));
207207

208-
static cl::opt<bool> EnableLoopFusion("enable-loopfusion", cl::init(false),
209-
cl::Hidden,
210-
cl::desc("Enable the LoopFuse Pass"));
211-
212208
static cl::opt<bool> EnableUnrollAndJam("enable-unroll-and-jam",
213209
cl::init(false), cl::Hidden,
214210
cl::desc("Enable Unroll And Jam Pass"));
@@ -318,7 +314,6 @@ PipelineTuningOptions::PipelineTuningOptions() {
318314
SLPVectorization = false;
319315
LoopUnrolling = true;
320316
LoopInterchange = EnableLoopInterchange;
321-
LoopFusion = EnableLoopFusion;
322317
ForgetAllSCEVInLoopUnroll = ForgetSCEVInLoopUnroll;
323318
LicmMssaOptCap = SetLicmMssaOptCap;
324319
LicmMssaNoAccForPromotionCap = SetLicmMssaNoAccForPromotionCap;
@@ -1559,7 +1554,7 @@ PassBuilder::buildModuleOptimizationPipeline(OptimizationLevel Level,
15591554

15601555
// FIXME: This may not be the right place in the pipeline.
15611556
// We need to have the data to support the right place.
1562-
if (PTO.LoopFusion || EnableLoopFusion)
1557+
if (PTO.LoopFusion)
15631558
OptimizePM.addPass(LoopFusePass());
15641559

15651560
// Distribute loops to allow partial vectorization. I.e. isolate dependences

llvm/tools/opt/NewPMDriver.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ cl::opt<bool> VerifyEachDebugInfoPreserve(
6060
cl::desc("Start each pass with collecting and end it with checking of "
6161
"debug info preservation."));
6262

63+
static cl::opt<bool> EnableLoopFusion("enable-loopfusion", cl::init(false),
64+
cl::Hidden,
65+
cl::desc("Enable the LoopFuse Pass"));
6366
cl::opt<std::string>
6467
VerifyDIPreserveExport("verify-di-preserve-export",
6568
cl::desc("Export debug info preservation failures into "
@@ -446,6 +449,7 @@ bool llvm::runPassPipeline(
446449
// option has been enabled.
447450
PTO.LoopUnrolling = !DisableLoopUnrolling;
448451
PTO.UnifiedLTO = UnifiedLTO;
452+
PTO.LoopFusion = EnableLoopFusion;
449453
PassBuilder PB(TM, PTO, P, &PIC);
450454
registerEPCallbacks(PB);
451455

0 commit comments

Comments
 (0)