Hi folks. Me again; trying to incorporate the elemental feature into GCC trunk.
The attribute syntax, as specified in the language spec is a bit problematic for the GCC infrastructure, and I'm wondering how committed are you to the current syntax. For example, this is a sample vector use as allowed by the syntax:
__attribute__ ((vector(vectorlength(4), nomask, processor (core_i7_sse4_2), uniform (x,y))))
int foobar(int x, int y)
First, the GCC way for something like uniform(x,y) is to tag the appropriate variables with a corresponding attribute, not to tag the entire function and then specify the arguments out of scope. Also, instead of a "vector" attribute with sub-attributes therein, the attributes should be separate entities. So, the above should be rewritten as:
__attribute__((vector, vectorlength(4), nomask, processor(core_i7_sse4_2)))
void foobar (int x __attribute__((uniform)), int y __attribute__((uniform)))
This is in keeping with the rest of the attributes we support. I'm not saying it's impossible to implement this as in the spec, but it would be rather odd as compared to the rest of the attributes we support.
Can this be changed in the spec?
Also, it would be nice to have less generic names for these attributes, perhaps something like:
vector -> cilk_elemental
nomask -> cilk_elemental_nomask
processor -> cilk_elemental_processor
uniform -> cilk_elemental_uniform