[PATCH] D98805: [NewPM] Verify LoopAnalysisResults after a loop pass

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 17 13:38:05 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG6db3ab2903f4: [NewPM] Verify LoopAnalysisResults after a loop pass (authored by aeubanks).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98805/new/

https://reviews.llvm.org/D98805

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


Index: llvm/lib/Transforms/Scalar/LoopPassManager.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LoopPassManager.cpp
+++ llvm/lib/Transforms/Scalar/LoopPassManager.cpp
@@ -291,8 +291,15 @@
     else
       PI.runAfterPass<Loop>(*Pass, *L, PassPA);
 
-    // FIXME: We should verify the set of analyses relevant to Loop passes
-    // are preserved.
+#ifndef NDEBUG
+    // LoopAnalysisResults should always be valid.
+    // Note that we don't LAR.SE.verify() because that can change observed SE
+    // queries. See PR44815.
+    LAR.DT.verify();
+    LAR.LI.verify(LAR.DT);
+    if (LAR.MSSA)
+      LAR.MSSA->verifyMemorySSA();
+#endif
 
     // If the loop hasn't been deleted, we need to handle invalidation here.
     if (!Updater.skipCurrentLoop())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98805.331364.patch
Type: text/x-patch
Size: 812 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210317/fab509ce/attachment.bin>


More information about the llvm-commits mailing list