[PATCH] D111328: [LoopFlatten] Mark loop analyses as perserved

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 7 11:41:33 PDT 2021


nikic created this revision.
nikic added reviewers: SjoerdMeijer, asbirlea, aeubanks, dmgreen.
Herald added subscribers: javed.absar, hiraditya.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

LoopFlatten does preserve loop analyses (DT, LI and SCEV), but currently doesn't mark them as preserved in the NewPM (the 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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111328

Files:
  llvm/lib/Transforms/Scalar/LoopFlatten.cpp


Index: llvm/lib/Transforms/Scalar/LoopFlatten.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LoopFlatten.cpp
+++ llvm/lib/Transforms/Scalar/LoopFlatten.cpp
@@ -815,7 +815,7 @@
   if (!Changed)
     return PreservedAnalyses::all();
 
-  return PreservedAnalyses::none();
+  return getLoopPassPreservedAnalyses();
 }
 
 namespace {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111328.377928.patch
Type: text/x-patch
Size: 386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211007/a86c3ecf/attachment.bin>


More information about the llvm-commits mailing list