================
@@ -15257,6 +15367,13 @@ StmtResult 
SemaOpenMP::ActOnOpenMPTileDirective(ArrayRef<OMPClause *> Clauses,
         ForStmt(Context, InitStmt.get(), CondExpr.get(), nullptr,
                 IncrStmt.get(), Inner, LoopHelper.Init->getBeginLoc(),
                 LoopHelper.Init->getBeginLoc(), LoopHelper.Inc->getEndLoc());
+
+    // Attach the droppable reinterpretation attribute to the intra-tile loop.
+    auto *Hint = OMPInvariantPredicateBoundAttr::CreateImplicit(
----------------
loopacino wrote:

No, it does because without the attribute the outer-loop variable (`.floor.iv`) 
is not registered in the DSA stack–making it loop invariant. This results in no 
recomputation of the `.floor.iv` value, and the stale value keeps re-assigning 
to inner `.tile.iv`.  Here, `ReinterpretTileLB/FoundFloor` trigger this 
recompuatation for all the cases including the `NoPartialTile` case. By the 
way, other convenience is that we can directly use `f+T` from the 
`OMPInvariantPredicateBoundAttr`, instead of extracting it from default 
`min(f+T,N)`.
          
NB: The same floor stale value issue arises with `stripe` with an outer 
`collapse`

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