diff options
author | Arthur Eubanks <aeubanks@google.com> | 2023-04-13 13:25:08 -0700 |
---|---|---|
committer | Arthur Eubanks <aeubanks@google.com> | 2023-05-03 13:17:30 -0700 |
commit | 6f29d1adf29820daae9ea7a01ae2588b67735b9e (patch) | |
tree | 97090cfd7a6c71635ee68929030e6e5ef70ff792 /llvm/lib/Passes/PassBuilderPipelines.cpp | |
parent | 24f36a215b4eabd1d0e4abcce0c9277085d88a96 (diff) | |
download | llvm-6f29d1adf29820daae9ea7a01ae2588b67735b9e.zip llvm-6f29d1adf29820daae9ea7a01ae2588b67735b9e.tar.gz llvm-6f29d1adf29820daae9ea7a01ae2588b67735b9e.tar.bz2 |
Reland [Pipeline] Don't limit ArgumentPromotion to -O3
This is a cheap pass so there's no need to limit to -O3.
This removes some differences between various pipelines.
Code size regressions should be addressed with
https://reviews.llvm.org/D149768.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D148269
Diffstat (limited to 'llvm/lib/Passes/PassBuilderPipelines.cpp')
-rw-r--r-- | llvm/lib/Passes/PassBuilderPipelines.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Passes/PassBuilderPipelines.cpp b/llvm/lib/Passes/PassBuilderPipelines.cpp index 3f929906..2b392f1 100644 --- a/llvm/lib/Passes/PassBuilderPipelines.cpp +++ b/llvm/lib/Passes/PassBuilderPipelines.cpp @@ -884,10 +884,8 @@ PassBuilder::buildInlinerPipeline(OptimizationLevel Level, // functions. MainCGPipeline.addPass(PostOrderFunctionAttrsPass(/*SkipNonRecursive*/ true)); - // When at O3 add argument promotion to the pass pipeline. - // FIXME: It isn't at all clear why this should be limited to O3. - if (Level == OptimizationLevel::O3) - MainCGPipeline.addPass(ArgumentPromotionPass()); + // Try to promote pointer arguments for internal functions. + MainCGPipeline.addPass(ArgumentPromotionPass()); // Try to perform OpenMP specific optimizations. This is a (quick!) no-op if // there are no OpenMP runtime calls present in the module. |