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

Hal Finkel hfinkel at anl.gov
Mon Oct 29 05:03:27 PDT 2012


----- 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



More information about the cfe-commits mailing list