[llvm] c5245dd - [LoopFlatten] Mark loop analyses as preserved
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 7 12:57:01 PDT 2021
Author: Nikita Popov
Date: 2021-10-07T21:56:49+02:00
New Revision: c5245dd33904bd1b69a2a49d17b1bea156e8dabf
URL: https://github.com/llvm/llvm-project/commit/c5245dd33904bd1b69a2a49d17b1bea156e8dabf
DIFF: https://github.com/llvm/llvm-project/commit/c5245dd33904bd1b69a2a49d17b1bea156e8dabf.diff
LOG: [LoopFlatten] Mark loop analyses as preserved
LoopFlatten does preserve loop analyses (DT, LI and SCEV), but
currently doesn't mark them as preserved in the NewPM (they are
marked as preserved in the LegacyPM). I think this doesn't really
have an effect in the end because the loop pass adaptor will just
assume they're preserved anyway, but let's be explicit about this
for the sake of clarity.
Differential Revision: https://reviews.llvm.org/D111328
Added:
Modified:
llvm/lib/Transforms/Scalar/LoopFlatten.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LoopFlatten.cpp b/llvm/lib/Transforms/Scalar/LoopFlatten.cpp
index 9440de21b81b5..aa286d690b7f7 100644
--- a/llvm/lib/Transforms/Scalar/LoopFlatten.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopFlatten.cpp
@@ -815,7 +815,7 @@ PreservedAnalyses LoopFlattenPass::run(LoopNest &LN, LoopAnalysisManager &LAM,
if (!Changed)
return PreservedAnalyses::all();
- return PreservedAnalyses::none();
+ return getLoopPassPreservedAnalyses();
}
namespace {
More information about the llvm-commits
mailing list