[cfe-dev] Adding "simd" pragma to Clang

Andrey Bokhanko andreybokhanko at gmail.com
Mon Feb 10 06:26:12 PST 2014


Hi All,

Continuing (and forking :-)) the discussion started by Renato (
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-February/035162.html), what
is the community's opinion on introducing pragma simd support in clang?

One possibility is to commit "#pragma omp simd" implementation, which is a
part of OpenMP 4 standard (
http://www.openmp.org/mp-documents/OpenMP4.0.0.pdf, section 2.8). I see two
downsides here: a) "omp" prefix (which might be confusing to some) and b)
necessity to add -fopenmp to enable support (this also automatically links
OpenMP RTL, which has nothing to do with this particular pragma).

Another possibility is to drop omp prefix -- this removes the downsides
mentioned above (and yes, makes the pragma similar to what is proposed in
CilkPlus -- not necessarily a bad thing in itself).

IMHO, both alternatives provide a useful, standards-based tool to control
vectorization in clang / llvm compiler -- while also advancing clang's
compatibility with existing standards.

We (Intel) can contribute all required code -- implementation is ready,
just needs some massaging before submission to clang trunk.

Opinions?

Yours,
Andrey
========
Software Engineer
Intel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140210/8e046cc4/attachment.html>


More information about the cfe-dev mailing list