[llvm] 721a914 - [Pipelines] Remove redundant O0 check (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 11 04:13:45 PDT 2023
Author: Nikita Popov
Date: 2023-04-11T13:13:36+02:00
New Revision: 721a914fae275100fca450abccdcea6c28c09c4f
URL: https://github.com/llvm/llvm-project/commit/721a914fae275100fca450abccdcea6c28c09c4f
DIFF: https://github.com/llvm/llvm-project/commit/721a914fae275100fca450abccdcea6c28c09c4f.diff
LOG: [Pipelines] Remove redundant O0 check (NFC)
buildModuleSimplificationPipeline() is not used for O0.
Added:
Modified:
llvm/lib/Passes/PassBuilderPipelines.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Passes/PassBuilderPipelines.cpp b/llvm/lib/Passes/PassBuilderPipelines.cpp
index 17003479742b9..925bb4b7295ce 100644
--- a/llvm/lib/Passes/PassBuilderPipelines.cpp
+++ b/llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -924,6 +924,8 @@ PassBuilder::buildModuleInlinerPipeline(OptimizationLevel Level,
ModulePassManager
PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
ThinOrFullLTOPhase Phase) {
+ assert(Level != OptimizationLevel::O0 &&
+ "Should not be used for O0 pipeline");
ModulePassManager MPM;
// Place pseudo probe instrumentation as the first pass of the pipeline to
@@ -1000,8 +1002,7 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
// Try to perform OpenMP specific optimizations on the module. This is a
// (quick!) no-op if there are no OpenMP runtime calls present in the module.
- if (Level != OptimizationLevel::O0)
- MPM.addPass(OpenMPOptPass());
+ MPM.addPass(OpenMPOptPass());
if (AttributorRun & AttributorRunOption::MODULE)
MPM.addPass(AttributorPass());
More information about the llvm-commits
mailing list