On Mon, May 15, 2023 at 12:19:00PM +0200, Jakub Jelinek via Gcc-patches wrote: > For C++ in templates we obviously need to defer that until instantiations, > the constants in the clauses etc. could be template parameters etc.
Even in C++ the how many canonical loop nest form loops does this transformation generate can be probably answered during parsing at least for the 5.1/5.2 loop transformations. I think we don't really allow template <int ...args> void foo () { #pragma omp for collapse(2) #pragma omp tile sizes(args...) for (int i = 0; i < 64; i++) for (int j = 0; j < 64; j++) for (int k = 0; k < 64; k++) ; } there how many arguments sizes clause has would be determined only after instantiation. Of course, we don't know the exact values... Jakub