[llvm] c141c65 - [NPM][LTO] Do not enable MemorySSA with LoopFullUnrollPass
David Green via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 19 00:35:22 PST 2021
Author: David Green
Date: 2021-02-19T08:35:11Z
New Revision: c141c6551be64f220b71786d24e98f6de906e6de
URL: https://github.com/llvm/llvm-project/commit/c141c6551be64f220b71786d24e98f6de906e6de
DIFF: https://github.com/llvm/llvm-project/commit/c141c6551be64f220b71786d24e98f6de906e6de.diff
LOG: [NPM][LTO] Do not enable MemorySSA with LoopFullUnrollPass
As with the standard opt pipeline, we disable the MemorySSA dependency
in the LTO LPM pipeline as not all passes preserve MemorySSA.
Added:
Modified:
llvm/lib/Passes/PassBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index 1581af9d6aa9..236d54b97bba 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -1764,8 +1764,10 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level,
LPM.addPass(LoopFullUnrollPass(Level.getSpeedupLevel(),
/* OnlyWhenForced= */ !PTO.LoopUnrolling,
PTO.ForgetAllSCEVInLoopUnroll));
+ // The loop passes in LPM (LoopFullUnrollPass) do not preserve MemorySSA.
+ // *All* loop passes must preserve it, in order to be able to use it.
MainFPM.addPass(createFunctionToLoopPassAdaptor(
- std::move(LPM), EnableMSSALoopDependency, /*UseBlockFrequencyInfo=*/true,
+ std::move(LPM), /*UseMemorySSA=*/false, /*UseBlockFrequencyInfo=*/true,
DebugLogging));
MainFPM.addPass(LoopDistributePass());
More information about the llvm-commits
mailing list