================
@@ -10621,6 +10682,36 @@ checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr
*CollapseLoopCountExpr,
SourceLocation UpdLoc = IS.IncSrcRange.getBegin();
ExprResult Iter;
+ // Wire the reinterpreted lower bound to its floor dependence (see design
+ // note in ActOnOpenMPTileDirective).
+ if (IS.ReinterpretTileLB && IS.CounterInit) {
+ bool FoundFloor = false;
+ if (const auto *LBRef =
+ dyn_cast<DeclRefExpr>(IS.CounterInit->IgnoreParenImpCasts())) {
+ const Decl *FloorDecl = LBRef->getDecl()->getCanonicalDecl();
+ for (unsigned K = 0; K < Cnt; ++K) {
+ const auto *CV = dyn_cast_or_null<DeclRefExpr>(Built.Counters[K]);
+ if (CV && CV->getDecl()->getCanonicalDecl() == FloorDecl) {
+ IS.IsNonRectangularLB = true;
+ IS.LoopDependentIdx = K + 1;
----------------
Meinersbur wrote:
Can we avoid introducing `ReinterpretTileLB` and set these directly in
`checkOpenMPIterationSpace`? Modifying `IS` after `checkOpenMPIterationSpace`
has already computed it is kind-of an anti-pattern.
https://github.com/llvm/llvm-project/pull/191114
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits