[Mlir-commits] [mlir] [acc] add RegionBranchOpInterface to acc.loop (PR #172940)

Susan Tan ス-ザン タン llvmlistbot at llvm.org
Fri Dec 19 09:02:47 PST 2025


================
@@ -444,6 +444,12 @@ void HostDataOp::getSuccessorRegions(
                                     regions);
 }
 
+void LoopOp::getSuccessorRegions(RegionBranchPoint point,
+                                 SmallVectorImpl<RegionSuccessor> &regions) {
+  getSingleRegionOpSuccessorRegions(getOperation(), getRegion(), point,
----------------
SusanTan wrote:

Just to post here what we've discussed offline: acc.loop can function as both structured (like scf.for) and unstructured. When it's structured, it should have a back edge to itself. When it's unstructured, it should model as if the region only execute once, and leave the back edges to be modeled within the loop using `cf.cond_br` 

https://github.com/llvm/llvm-project/pull/172940


More information about the Mlir-commits mailing list