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

Renato Golin renato.golin at linaro.org
Mon Feb 17 05:40:27 PST 2014


On 17 February 2014 12:19, "C. Bergström" <cbergstrom at pathscale.com> wrote:
> I'm not a big fan of using gcc as a reference to determine future goals.

I'm not sure you're getting the point. I'm not using GCC as reference
for anything.

I'm just saying that some pragmas already exist, people already use it
and the semantics maps perfectly to our current needs. They will *not*
go away just because we don't implement them.

New OMP pragma discussions should *still* happen and replace the
current, deprecated ones. But that's completely orthogonal to any
legacy feature being implemented as well.


> Some clean extension to OMP doesn't have to be long term
> 1) Your proposal could be implemented now and just used as a POC (proof of
> concept) for the working group

1st Law of Compiler Extensions:

Any un-standardized extension will be abused and will outlive their
authors and the standard.


> 2) It would show clear deficiencies in the standard that have real world
> value/usage

We can still do that independently.


> By playing nice with OMP now

We can still do that independently.


> This would also possibly help avoid duplicate efforts long term, users
> having to migrate from one set of pragma to another and bringing people with
> interest in solving the problem to help clearly define the behavior.

You're assuming our extension will be accepted as is. Unless your idea
involves discussing them with a large standardization body (OpenMP)
and other compilers (ICC, GCC), I don't think you have great chances
of doing so.

Either un-standardised extensions or deprecated pragmas will have the
same effect, with the difference that deprecated pragmas already
exist.

I don't think the high risk of not getting it perfectly right from the
beginning is worth the trouble of not implementing existing legacy
pragmas.


> Lastly - how would this non-omp set of pragma end up playing nice with omp?

The same way it already does in ICC and GCC. And should be solved in
the same way both ICC and GCC will solve when OpenMP 4, 5, 6... comes
out.

Specifically in LLVM, the OMP variants will use the same metadata, so
in theory, they should be absolutely identical, other than syntax.

cheers,
--renato




More information about the cfe-dev mailing list