[clang] [OpenMP] Tile/stripe followed by reverse (PR #222401)
Michael Klemm via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 18 01:59:42 PDT 2026
================
@@ -177,6 +178,12 @@ bool OMPLoopBasedDirective::doForAllLoops(
OnTransformationCallback) {
CurStmt = ignoreContainersKeepingIntraTileHint(CurStmt);
for (unsigned Cnt = 0; Cnt < NumLoops; ++Cnt) {
+ // If we peel a loop-transformation directive, the enclosing ForStmt is
+ // compiler-synthesized and its body may hold helper statements (e.g.
+ // `reverse` injects `.reversed.iv` and update exprs) before the next
+ // loop. Scan it as an imperfect nest so that e.g. `omp tile` followed by
+ // `omp reverse` is accepted.
----------------
mjklemm wrote:
```suggestion
// `reverse` injects `.reversed.iv` and update exprs) before the next
// loop. Scan it as an imperfect nest so that, e.g., `omp tile` followed by
// `omp reverse` is accepted.
```
https://github.com/llvm/llvm-project/pull/222401
More information about the cfe-commits
mailing list