diff options
Diffstat (limited to 'llvm/lib/Passes/PassBuilderPipelines.cpp')
| -rw-r--r-- | llvm/lib/Passes/PassBuilderPipelines.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Passes/PassBuilderPipelines.cpp b/llvm/lib/Passes/PassBuilderPipelines.cpp index eed29c25714b..0d074951cffc 100644 --- a/llvm/lib/Passes/PassBuilderPipelines.cpp +++ b/llvm/lib/Passes/PassBuilderPipelines.cpp @@ -1685,6 +1685,9 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level, // keep one copy of each constant. MPM.addPass(ConstantMergePass()); + // Remove unused arguments from functions. + MPM.addPass(DeadArgumentEliminationPass()); + // Reduce the code after globalopt and ipsccp. Both can open up significant // simplification opportunities, and both can propagate functions through // function pointers. When this happens, we often have to resolve varargs @@ -1722,9 +1725,6 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level, // transform it to pass arguments by value instead of by reference. MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(ArgumentPromotionPass())); - // Remove unused arguments from functions. - MPM.addPass(DeadArgumentEliminationPass()); - FunctionPassManager FPM; // The IPO Passes may leave cruft around. Clean up after them. FPM.addPass(InstCombinePass()); |
