Author: Nikita Popov Date: 2021-08-16T20:34:18+02:00 New Revision: 0a031449b2c757400090b23bd6ddf4d896d32643
URL: https://github.com/llvm/llvm-project/commit/0a031449b2c757400090b23bd6ddf4d896d32643 DIFF: https://github.com/llvm/llvm-project/commit/0a031449b2c757400090b23bd6ddf4d896d32643.diff LOG: [PassBuilder] Don't use MemorySSA for standalone LoopRotate passes Two standalone LoopRotate passes scheduled using createFunctionToLoopPassAdaptor() currently enable MemorySSA. However, while LoopRotate can preserve MemorySSA, it does not use it, so requiring MemorySSA is unnecessary. This change doesn't have a practical compile-time impact by itself, because subsequent passes still request MemorySSA. Differential Revision: https://reviews.llvm.org/D108073 Added: Modified: clang/test/CodeGen/thinlto-distributed-newpm.ll llvm/lib/Passes/PassBuilder.cpp Removed: ################################################################################ diff --git a/clang/test/CodeGen/thinlto-distributed-newpm.ll b/clang/test/CodeGen/thinlto-distributed-newpm.ll index c61a6ff7fbeb5..4651a5d282faf 100644 --- a/clang/test/CodeGen/thinlto-distributed-newpm.ll +++ b/clang/test/CodeGen/thinlto-distributed-newpm.ll @@ -134,7 +134,6 @@ ; CHECK-O: Running pass: LoopSimplifyPass on main ; CHECK-O: Running analysis: LoopAnalysis on main ; CHECK-O: Running pass: LCSSAPass on main -; CHECK-O: Running analysis: MemorySSAAnalysis on main ; CHECK-O: Running analysis: AAManager on main ; CHECK-O: Running analysis: BasicAA on main ; CHECK-O: Running analysis: ScalarEvolutionAnalysis on main @@ -147,6 +146,7 @@ ; CHECK-O: Running analysis: BranchProbabilityAnalysis on main ; CHECK-O: Running analysis: PostDominatorTreeAnalysis on main ; CHECK-O: Running analysis: DemandedBitsAnalysis on main +; CHECK-O: Running analysis: MemorySSAAnalysis on main ; CHECK-O: Running pass: LoopLoadEliminationPass on main ; CHECK-O: Running pass: InstCombinePass on main ; CHECK-O: Running pass: SimplifyCFGPass on main diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp index 2972687274f52..cdf0a732e6708 100644 --- a/llvm/lib/Passes/PassBuilder.cpp +++ b/llvm/lib/Passes/PassBuilder.cpp @@ -923,7 +923,7 @@ void PassBuilder::addPGOInstrPasses(ModulePassManager &MPM, FunctionPassManager FPM; // Disable header duplication in loop rotation at -Oz. FPM.addPass(createFunctionToLoopPassAdaptor( - LoopRotatePass(Level != OptimizationLevel::Oz), EnableMSSALoopDependency, + LoopRotatePass(Level != OptimizationLevel::Oz), /*UseMemorySSA=*/false, /*UseBlockFrequencyInfo=*/false)); MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); @@ -1399,8 +1399,7 @@ PassBuilder::buildModuleOptimizationPipeline(OptimizationLevel Level, // Disable header duplication at -Oz. OptimizePM.addPass(createFunctionToLoopPassAdaptor( LoopRotatePass(Level != OptimizationLevel::Oz, LTOPreLink), - EnableMSSALoopDependency, - /*UseBlockFrequencyInfo=*/false)); + /*UseMemorySSA=*/false, /*UseBlockFrequencyInfo=*/false)); // Distribute loops to allow partial vectorization. I.e. isolate dependences // into separate loop that would otherwise inhibit vectorization. This is _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits