forked from OSchip/llvm-project
[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:
parent
b3c227a25a
commit
c141c6551b
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue