[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.
This commit is contained in:
David Green 2021-02-19 08:35:11 +00:00
parent b3c227a25a
commit c141c6551b
1 changed files with 3 additions and 1 deletions

View File

@ -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());