================
@@ -157,19 +206,22 @@ bool OMPLoopBasedDirective::doForAllLoops(
     }
     if (auto *CanonLoop = dyn_cast<OMPCanonicalLoop>(CurStmt))
       CurStmt = CanonLoop->getLoopStmt();
-    if (Callback(Cnt, CurStmt))
+    // Keep the wrapper while walking so a caller that asked not to unwrap can
+    // read the hint; look through it to reach the loop body.
+    Stmt *LoopStmt = ignoreIntraTileHint(CurStmt);
+    if (Callback(Cnt, UnwrapIntraTileHint ? LoopStmt : CurStmt))
----------------
Meinersbur wrote:

Prefer adding another argument to the callback rather than make it configurable 
what the meaning of each argument is: The callback can decide itself what data 
it needs, potentially both.

https://github.com/llvm/llvm-project/pull/191114
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to