On 12/10/15 06:34, Jakub Jelinek wrote:
I'm aware of some duplication in expand_omp_for_* functions, and some of the obvious duplications were already moved to helper functions. But in these cases the number of differences is even significantly bigger too, so having just one function that would handle all the different schedules would be far less readable. Perhaps we can add some small helpers to handle some little pieces that repeat between the functions.
I agree. For instance, earlier openacc's loop expansion piggybacked onto the the two omp loop expanders. I found it much cleaner to create a separate openacc loop expander. There's so much stuff to juggle in each case, that combining all the variants into one function can lead to cognitive overload.
nathan