On 11/04/15 05:26, Richard Biener wrote: > On Tue, Nov 3, 2015 at 7:11 PM, Nathan Sidwell wrote: >> Richard, > this all seems a little bit fragile and relying on implementation details? > Is the attribute always present? Is the call argument always a constant > that fits in a HOST_WIDE_INT (or even int here)? Are there always enough > 'dims' in the tree list? Is the 'dim' value always an INTEGER_CST that > fits a HOST_WIDE_INT (or even an int here)? > If so I'd like to see helper functions to hide these implementation details > from generic code like this. Like this? I've added two helper functions to omp-low.c, one to get the internal fn arg number and the other to get a dimension value, given an axis number. omp-low seemed the most appropriate point -- that's where the dimension processing is, and the generation of these internal fn calls. (Bernd, I'll fixup the dimension folding patch to use these calls before applying it.) ok? nathan