On Tue, 2025-12-16 at 12:40 +0100, Richard Biener wrote: > On Tue, 16 Dec 2025, Avinash Jayakar wrote: > > > > 2. I see that using "-O2 -fgraphite -floop-block -fdump-tree-all", > > the > > graphite pass is actually placed a bit deeper in the pipeline. And > > I > > observed that it hinders ability to do polyhedral transformations, > > since it creates complex loop dependencies after loop invariant > > motion > > and partial redundancy elimination. > > Any reason as to why it is placed so deep in the pipeline? Because > > according to the tools I have seen, it would be beneficial to > > perform > > polyhedral analysis/transformations closer to source. > > It's been always in the place it is now. > > > 3. Is graphite under active development? Would it be beneficial to > > implement polyhedral transforms closer to the source level (right > > after > > gimplification)? > > No, it's not under active development. As to the second question - I > don't know? Do you? I'd suggest to simply try. > Sure thanks for this info. I tried to reorder the pass as it is, but looks like it depends on several other passes. Probably need to rewrite this pass if it has to work near the start of the pipeline, will investigate further.
> > Also I think it would be useful to have some kind of > > metadata/pragma > > for the scops, where a programmer familiar with polyhedral > > schedules > > could specify a custom transformation like blocking/interchange. > > Something like > > > > #pragma beginscop > > #pragma transform (i, j, k) -> (j / N_C, k / K_C, i / M_C, j / N_R, > > i / > > M_R, k mod K_C, j mod N_R, i mod M_R) > > for loop... > > > > #pragma endscop > > Huh. I think there's OpenMP annotations for such things, so I'd > suggest > to leverage those annotations, possibly with a -fopenmp-hllt > (high-level-loop-transforms). > I have not looked into OpenMP annotations in detail, but I think polyhedral schedules are more expressive for loop transformations. For example, diamond tiling can be simply written as a one line schedule on a normal loop. I was thinking in perspective of debugging the graphite pass. But I think it is not required for now until there is a good use case for graphite. Best Regards, Avinash Jayakar
