[Mlir-commits] [flang] [llvm] [mlir] [flang][OpenMP] Enable tiling (PR #143715)

Sergio Afonso llvmlistbot at llvm.org
Thu Aug 28 08:58:08 PDT 2025


================
@@ -3035,16 +3035,46 @@ convertOmpLoopNest(Operation &opInst, llvm::IRBuilderBase &builder,
     loopInfos.push_back(*loopResult);
   }
 
-  // Collapse loops. Store the insertion point because LoopInfos may get
-  // invalidated.
   llvm::OpenMPIRBuilder::InsertPointTy afterIP =
       loopInfos.front()->getAfterIP();
 
-  // Update the stack frame created for this loop to point to the resulting loop
-  // after applying transformations.
+  // Do tiling.
+  if (const auto &tiles = loopOp.getTileSizes()) {
+    llvm::Type *ivType = loopInfos.front()->getIndVarType();
+    SmallVector<llvm::Value *> TileSizes;
+
+    for (auto tile : tiles.value()) {
+      llvm::Value *TileVal = llvm::ConstantInt::get(ivType, tile);
----------------
skatrak wrote:

```suggestion
      llvm::Value *tileVal = llvm::ConstantInt::get(ivType, tile);
```

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


More information about the Mlir-commits mailing list