Folks, One of the things that we've been discussing for a while and there are just too many options out there and none fits exactly what we're looking for (obviously), is the vectorization control pragmas.
Our initial semantics is working on on a specific loop / lexical block to: * turn vectorization on/off (even if -fvec is disabled) * specify the vector width (number of lanes) * specify the unroll factor (either to help with vectorization or to use when vectorization is not profitable) Later metadata could be added to: * determine memory safety at specific distances * determine vectorized functions to use for specific widths * etc The current discussion is floating around four solutions: 1. Local pragma (#pragma vectorize), which is losing badly on the argument that it's yet-another pragma to do mostly the same thing many others do. 2. Using OMP SIMD pragmas (#pragma simd, #pragma omp simd) which is already standardised (OMP 4.0 I think), but that doesn't cover all the semantics we may want in the future, plus it's segregated and may confuse the users. 3. Using GCC-style optimize pragmas (#pragma Clang optimize), which could be Clang-specific without polluting other compilers' namespaces. The problem here is that we'd end up with duplicated flags with closely-related-but-different semantics between #pragma GCC and #pragma Clang variants. 4. Using C++11 annotations. This would be the cleanest way, but would only be valid in C++11 mode and could be very well a different way to express an identical semantics to the pragmas, which are valid in all C variants and Fortran. I'm trying to avoid adding new semantics to old problems, but I'm also trying to avoid spreading closely related semantics across a multitude of pragmas, annotation and who knows else. Does GCC have anything similar? Do you guys have any ideas we could use? I'm open to anything, even in favour of one of the defective propositions above. I'd rather have something than nothing, but I'd also rather have something that most people agree on. cheers, --renato