[llvm] bd6eb14 - [NFC][Pipeline] Move PromotePass into GlobalCleanupPM
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 1 13:22:52 PST 2023
Author: Arthur Eubanks
Date: 2023-03-01T13:22:24-08:00
New Revision: bd6eb1423c38ef14014b8ddacb42326bd9f38af4
URL: https://github.com/llvm/llvm-project/commit/bd6eb1423c38ef14014b8ddacb42326bd9f38af4
DIFF: https://github.com/llvm/llvm-project/commit/bd6eb1423c38ef14014b8ddacb42326bd9f38af4.diff
LOG: [NFC][Pipeline] Move PromotePass into GlobalCleanupPM
Added:
Modified:
llvm/lib/Passes/PassBuilderPipelines.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Passes/PassBuilderPipelines.cpp b/llvm/lib/Passes/PassBuilderPipelines.cpp
index c47a3f1afbaec..adb555ed21b9d 100644
--- a/llvm/lib/Passes/PassBuilderPipelines.cpp
+++ b/llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -1017,19 +1017,13 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
// Optimize globals to try and fold them into constants.
MPM.addPass(GlobalOptPass());
- // Promote any localized globals to SSA registers.
- // FIXME: Should this instead by a run of SROA?
- // FIXME: We should probably run instcombine and simplifycfg afterward to
- // delete control flows that are dead once globals have been folded to
- // constants.
- MPM.addPass(createModuleToFunctionPassAdaptor(PromotePass()));
-
// Create a small function pass pipeline to cleanup after all the global
// optimizations.
FunctionPassManager GlobalCleanupPM;
+ // FIXME: Should this instead by a run of SROA?
+ GlobalCleanupPM.addPass(PromotePass());
GlobalCleanupPM.addPass(InstCombinePass());
invokePeepholeEPCallbacks(GlobalCleanupPM, Level);
-
GlobalCleanupPM.addPass(
SimplifyCFGPass(SimplifyCFGOptions().convertSwitchRangeToICmp(true)));
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(GlobalCleanupPM),
More information about the llvm-commits
mailing list