On Wed, May 17, 2023 at 01:55:00PM +0200, Frederik Harwath wrote: > Thanks for the explanation. But actually doing this would require a > complete rewrite which would almost certainly imply that mainline GCC > would not support the loop transformations for a long time.
I don't think it needs complete rewrite, the change to use OMP_UNROLL/OMP_TILE should actually simplify stuff when you already have some other extra construct to handle the clauses if it isn't nested into something else, so I wouldn't expect it needs more than 2-3 hours of work. It is true that doing the transformation on trees rather than high gimple is something different, but again it doesn't require everything to be rewritten and we have code to do code copying both on trees and high and low gimple in tree-inline.cc, so the unrolling can just use different APIs to perform it. I'd still prefer to do it like that, I think it will pay back in maintainance costs. If you don't get to this within say 2 weeks, I'll try to do the conversion myself. Jakub