[clang] [llvm] [mlir] [openmp] [Clang][OpenMP] Canonicalize Intra-tiles in Loop Tiling (PR #191114)

Amit Tiwari via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 02:54:02 PDT 2026


================
@@ -9575,8 +9581,25 @@ static bool checkOpenMPIterationSpace(
     llvm::MutableArrayRef<LoopIterationSpace> ResultIterSpaces,
     llvm::MapVector<const Expr *, DeclRefExpr *> &Captures,
     const llvm::SmallPtrSetImpl<const Decl *> &CollapsedLoopVarDecls,
-    llvm::SmallPtrSetImpl<const Decl *> &CollapsedLoopInductionVars) {
+    llvm::SmallPtrSetImpl<const Decl *> &CollapsedLoopInductionVars,
+    const OMPInvariantPredicateBoundAttr *IntraTileHint) {
----------------
loopacino wrote:

Dropped the 3-arg form in `doForAllLoop`. By default, the walker unwraps before calling and hands only the loop, so `dyn_cast<ForStmt>` (the earlier crash) don't go, while keeps `checkOpenMPLoop` as the only site that asks not to unwrap, so that the `Stmt *S` can be `AttributeStmt`. Only `checkOpenMPIterationSpace` takes the hint off the wrapper (same pattern as the canonical-loop unwrap that was already there). 


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


More information about the llvm-commits mailing list