[cfe-commits] OpenMP-Patch-1: fopenmp option support

Ron Lieberman ronl at codeaurora.org
Tue Oct 30 09:40:08 PDT 2012


Seems fine to me.

Ron
---
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation


-----Original Message-----
From: Mahesha HS [mailto:mahesha.llvm at gmail.com] 
Sent: Monday, October 29, 2012 11:32 PM
To: Hal Finkel; ronl at codeaurora.org
Cc: llvm cfe
Subject: Re: [cfe-commits] OpenMP-Patch-1: fopenmp option support

Hi Hal and Ron,

Here is possibilities, for -fopenmp and -fno-openmp combinations. Is it
looks okay?

1. Neither -fopenmp nor -fno-openmp is passed.
       if (Translation unit has OpenMP source)
            Do emit warning.
       else
            Do nothing.

2. Only -fopenmp is passed
         if (Translation unit has OpenMP source)
             Do process it.
         else
             Do nothing.

3. Only -fno-openmp is passed
         if (Translation unit has OpenMP source)
             Do nothing
         else
             Do nothing

Note: It is actually no-op.

4. -fopenmp -fno-openmp is passed in the same order
          Same as 3.

5. -fno-openmp -fopenmp is passed in the same order
          Same as 2


--
mahesha



On Mon, Oct 29, 2012 at 6:03 PM, Mahesha HS <mahesha.llvm at gmail.com> wrote:
> Hi Ron and Hal,
>
> I think, my investigation on -fno-openmp was not thorough enough.
> Based on your mails, I do think that Clang should have support for 
> this option too. I will support this option.
>
>
> --
> mahesha
>
>
> On Mon, Oct 29, 2012 at 5:33 PM, Hal Finkel <hfinkel at anl.gov> wrote:
>> ----- Original Message -----
>>> From: "Mahesha HS" <mahesha.llvm at gmail.com>
>>> To: "Eli Friedman" <eli.friedman at gmail.com>, "Dmitri Gribenko" 
>>> <gribozavr at gmail.com>
>>> Cc: "llvm cfe" <cfe-commits at cs.uiuc.edu>
>>> Sent: Monday, October 29, 2012 12:47:50 AM
>>> Subject: [cfe-commits] OpenMP-Patch-1: fopenmp option support
>>>
>>> Hi Eli and Dmitri,
>>>
>>> Let me start again from the beginning one step at a time. Going 
>>> further, I avoid sending more than one patch at a time as reviewing
>>> (big) several patches requires considerable effort, and also some 
>>> time it is confusing. Attached is the very first patch to support 
>>> -fopenmp option. This patch is in fact smaller one, and it already 
>>> went through few rounds of review, and all the review comments are 
>>> taken for it.
>>>
>>> However, please take one more look at it, and if it is in a good 
>>> shape to commit, please do the same or provide me an approval to 
>>> commit this patch. OTOH, if there is any fresh review comments, I 
>>> will work on it.
>>>
>>> Note: Chandler as an opinion to support counter part of this option, 
>>> namely -fno-openmp. I am still thinking, if it is worth supporting 
>>> it as I am not aware of any other OpenMP compiler supporting such an 
>>> option. However, let us think about it, and if we decide that it is 
>>> useful to support it, I will support it.
>>
>> One thing that we could do, which gcc does not do (as of 4.7.2), is
explicitly disable all unused pragma warnings when -fno-openmp is provided.
Otherwise, the usefulness of -fno-openmp is certainly context dependent. As
Mahesha points out, so long as OpenMP is disabled by default (as it is in
gcc and many other compilers), using -fno-openmp by itself is a no-op. The
inverted options are sometimes useful for overriding default options in a
makefile (at least when the user options appear after the default options in
the makefile). In gcc, -fopenmp -fno-openmp leaves OpenMP disabled, while
-fno-openmp -fopenmp enables OpenMP.
>>
>> Mahesha, Thanks again for working on this.
>>
>>  -Hal
>>
>>>
>>>
>>> --
>>> mahesha
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>
>>
>> --
>> Hal Finkel
>> Postdoctoral Appointee
>> Leadership Computing Facility
>> Argonne National Laboratory
>
>
>
> --
> mahesha



--
mahesha




More information about the cfe-commits mailing list