[llvm] efd71eb - [LoopLoadElimination] Preserve DT and LI (NFCI)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 21 05:33:04 PDT 2023
Author: Nikita Popov
Date: 2023-04-21T14:32:55+02:00
New Revision: efd71ebea4ba34fa3bc4973781495b9e53ceaef9
URL: https://github.com/llvm/llvm-project/commit/efd71ebea4ba34fa3bc4973781495b9e53ceaef9
DIFF: https://github.com/llvm/llvm-project/commit/efd71ebea4ba34fa3bc4973781495b9e53ceaef9.diff
LOG: [LoopLoadElimination] Preserve DT and LI (NFCI)
This pass makes control-flow changes, but only via LoopSimplify
and LoopVersioning utilities, which perserve DT and LI.
Added:
Modified:
llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp b/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
index 91a336f8f63c..e32b97e43864 100644
--- a/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
@@ -677,5 +677,7 @@ PreservedAnalyses LoopLoadEliminationPass::run(Function &F,
return PreservedAnalyses::all();
PreservedAnalyses PA;
+ PA.preserve<DominatorTreeAnalysis>();
+ PA.preserve<LoopAnalysis>();
return PA;
}
More information about the llvm-commits
mailing list