Skip to content

Commit 721a914

Browse files
committed
[Pipelines] Remove redundant O0 check (NFC)
buildModuleSimplificationPipeline() is not used for O0.
1 parent 0f59720 commit 721a914

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Passes/PassBuilderPipelines.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,8 @@ PassBuilder::buildModuleInlinerPipeline(OptimizationLevel Level,
924924
ModulePassManager
925925
PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
926926
ThinOrFullLTOPhase Phase) {
927+
assert(Level != OptimizationLevel::O0 &&
928+
"Should not be used for O0 pipeline");
927929
ModulePassManager MPM;
928930

929931
// Place pseudo probe instrumentation as the first pass of the pipeline to
@@ -1000,8 +1002,7 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
10001002

10011003
// Try to perform OpenMP specific optimizations on the module. This is a
10021004
// (quick!) no-op if there are no OpenMP runtime calls present in the module.
1003-
if (Level != OptimizationLevel::O0)
1004-
MPM.addPass(OpenMPOptPass());
1005+
MPM.addPass(OpenMPOptPass());
10051006

10061007
if (AttributorRun & AttributorRunOption::MODULE)
10071008
MPM.addPass(AttributorPass());

0 commit comments

Comments
 (0)