[polly] [Polly] Distribute the innermost point loop of tile over its statements (PR #225844)
Timur Baidusenov via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 26 10:45:05 PDT 2026
================
@@ -589,6 +725,25 @@ ScheduleTreeOptimizer::optimizeBand(__isl_take isl_schedule_node *NodeArg,
if (OAI->Postopts)
Node = applyTileBandOpt(Node);
+ // Prevectorization strip-mines a parallel point loop and register tiling
+ // unrolls the point loops, leave those to them.
+ if (OAI->Postopts && DistributePointLoops && !OAI->Prevect &&
+ !RegisterTiling) {
+ isl::schedule_node Distributed;
+ {
+ IslQuotaScope MaxScope = OAI->MaxOpGuard.enter();
+ Distributed = distributeInnermostLoop(Node, OAI->D);
+ // Leave the band as it is if the analysis exceeds the quota, rather than
+ // discarding the other optimizations of the SCoP.
+ if (OAI->MaxOpGuard.hasQuotaExceeded()) {
+ Distributed = {};
+ isl_ctx_reset_error(Node.ctx().get());
----------------
bai-tim wrote:
I kept it: without the reset, if no other quota scope follows, the quota error would still be set at the end of runIslScheduleOptimizer, and hasQuotaExceeded() there would discard all optimizations of the SCoP, while here we only want to skip the distribution. I clarified the comment.
https://github.com/llvm/llvm-project/pull/225844
More information about the llvm-commits
mailing list