[llvm-branch-commits] [llvm] [LoopInterchange] Drop loop metadata and branch weights of interchanged loops (PR #235892)
Madhur Amilkanthwar via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Nov 3 23:03:11 PST 2026
================
@@ -2168,6 +2170,26 @@ void LoopInterchangeTransform::restructureLoops(
SE->forgetLoop(NewOuter);
}
+/// Update the metadata attached to the latch branches of the two loops. The
+/// loop metadata and the branch weights are dropped. Some attributes of the
+/// loop metadata may not hold after interchange (e.g.,
+/// llvm.loop.parallel_accesses of the inner loop doesn't imply that the loop is
----------------
madhur13490 wrote:
Since the loop ID stays on its own loop, maybe say that explicitly. Something like: "The metadata stays on its loop's latch, but attributes that depend on the loop's position in the nest may no longer hold (e.g., ...)". That would explain why we drop only some attributes, if we go that way.
https://github.com/llvm/llvm-project/pull/235892
More information about the llvm-branch-commits
mailing list