[PATCH] D87262: [Inliner] Apply llvm.loop.mustprogress to caller loops

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 20:45:43 PDT 2020


jdoerfert added a comment.

Add a test case with multiple loops in the caller and callee please. also nested ones. And one with the callee loop not having the metadata so we see it won't after.
And a test with both caller and callee having the attribute so no metadata is added.



================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:2316
+        L->setLoopMustProgress();
+    }
+  }
----------------
Don't walk the blocks but the loops. `LoopInfo` exposes only top-level loops but you can use it as a graph or employ a worklist to get to the nested ones. I usually see the latter. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87262



More information about the llvm-commits mailing list