Skip to content

Commit 7d244b9

Browse files
authored
[Downstream Change] Update pass for OptimizationLevel changes (#925) (#930)
The upstream commit 5d5dd83 replaced OptimizationLevel with a simple enum class, removing the getSpeedupLevel() function. The downstream use of the function can be replaced with a cast. Downstream issue: #409 (cherry picked from commit 56cf554)
1 parent 709c835 commit 7d244b9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

llvm/lib/Passes/PassBuilderPipelines.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2245,7 +2245,7 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level,
22452245
// #409
22462246
if (LTOExtraLoopUnroll) {
22472247
LoopPassManager OmaxLPM;
2248-
OmaxLPM.addPass(LoopFullUnrollPass(Level.getSpeedupLevel(),
2248+
OmaxLPM.addPass(LoopFullUnrollPass(static_cast<int>(Level),
22492249
/*OnlyWhenForced=*/!PTO.LoopUnrolling,
22502250
PTO.ForgetAllSCEVInLoopUnroll));
22512251
FPM.addPass(

0 commit comments

Comments
 (0)