[cfe-dev] OpenMP support in CLANG: A proposal

Mahesha HS mahesha.llvm at gmail.com
Wed Nov 7 21:07:52 PST 2012


I understand. I was bit aggressive with my previous *generalized*
statement. Let us discuss such topics case by case, when we encounter
their implementation in near future.

As of now, I am really trying to understand the Olaf's suggestion of
treating OpenMP *pragmas* as *attributes* and implement them
accordingly. This is actually the core of the implementation in my
opinion, and I appreciate any further discussions in this line. I
would request you guys to go through his proposal, and pour some
lights upon it.

--
mahesha



On Thu, Nov 8, 2012 at 10:17 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> On Wed, Nov 7, 2012 at 8:20 PM, Mahesha HS <mahesha.llvm at gmail.com> wrote:
>> Ok. Shall I assume the following basic thumb rule for our OpenMP
>> support in Clang?
>>
>> "The OpenMP annotated C/C++ source when compiled with OpenMP
>> *disabled* should be (both syntactically and semantically) equal to
>> its sequential counterpart. Any OpenMP (non-standard) extension which
>> violates the above rule will not be supported even if it will going to
>> be *not* compatible with existing OpenMP compilers".
>
> While I don't think it is possible to guarantee that, I would agree
> that this is the spirit of OpenMP.  But I would not make a statement
> as strong as that -- every extension is different and should be
> considered on a case by case basis.  If we find an extension that
> *lots* of code depends on, then we might consider implementing that.
> But in my opinion that particular if(int var = ...) extension does not
> meet this bar.
>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



-- 
mahesha



More information about the cfe-dev mailing list