Sorry for the spam to llvm-commit list (to some extent). Somehow, CFE COMMIT list was got replaced by LLVM COMMIT list during mail exchange.
-- mahesha On Fri, Nov 23, 2012 at 9:35 AM, Mahesha HS <[email protected]> wrote: > On Fri, Nov 23, 2012 at 1:53 AM, Hal Finkel <[email protected]> wrote: >> >> ----- Original Message ----- >>> From: "Mahesha HS" <[email protected]> >>> To: "Hal Finkel" <[email protected]>, "Dmitri Gribenko" <[email protected]> >>> Cc: "llvm-commits" <[email protected]>, "Joey Gouly" >>> <[email protected]>, "Benjamin Kramer" >>> <[email protected]> >>> Sent: Wednesday, November 21, 2012 11:52:39 PM >>> Subject: Re: [cfe-commits] [PATCH] First OpenMP patch >>> >>> That is fine. I will experiment with GCC for different flags like -W, >>> -Wall etc. And make sure that the implementation is in compatible >>> with >>> GCC (when it is not really a bug-to-bug compatible). I think, this >>> additional implementation will be on top of what the current patch >>> contains. This, I will send as an another patch. >> >> Makes sense. >> >>> >>> Do you guys agree to the internal requirement for two lang options - >>> OpenMP and NoOpenMP - to keep track of the options -fopenmp and >>> -fno-openmp? If so, I will change the "comment and test case" as >>> mentioned by Joey and re-submit the patch. >> >> If the only purpose of this is to affect the warnings, then Dmitri's >> suggestion of using something like -Wsource-uses-openmp is (in my opinion) >> better. > > I agree. As of now, it affects only warnings though I do not know > about future requirements. So I will remove "NoOpenMP" for the time > being. > > -- > mahesha > > >> >> Thanks again, >> Hal >> >>> >>> -- >>> mahesha >>> >>> >>> >>> >>> >>> On Thu, Nov 22, 2012 at 2:09 AM, Hal Finkel <[email protected]> wrote: >>> > ----- Original Message ----- >>> >> From: "Dmitri Gribenko" <[email protected]> >>> >> To: "Mahesha HS" <[email protected]> >>> >> Cc: "Benjamin Kramer" <[email protected]>, "llvm cfe" >>> >> <[email protected]> >>> >> Sent: Wednesday, November 21, 2012 11:06:50 AM >>> >> Subject: Re: [cfe-commits] [PATCH] First OpenMP patch >>> >> >>> >> On Wed, Nov 21, 2012 at 6:02 PM, Mahesha HS >>> >> <[email protected]> >>> >> wrote: >>> >> > Though -fopenmp and -fno-openmp are mutually exclusive options, >>> >> > underlying functionality, that we intended to implement differ a >>> >> > little. In a nutshell, we, sometime back discussed in CFE DEV >>> >> > list >>> >> > to >>> >> > implement OpenMP as follows. We thought that passing neither >>> >> > -fopenmp >>> >> > nor -fno-openmp is not same as passing only -fno-openmp. >>> >> > Following >>> >> > is the intended implementation. This forced me to add two lang >>> >> > options >>> >> > as I could not handle it using only one lang option. If this was >>> >> > not >>> >> > there, I guess, all your comments would not have araised. >>> >> > >>> >> > if (source contains OpenMP statements) { >>> >> > if (neither -fopenmp nor -fno-openmp present) { >>> >> > Throw warning. >>> >> > } >>> >> > else if (only -fopenmp present) { >>> >> > Process OpenMP >>> >> > } >>> >> > else if (only -fno-openmp) { >>> >> > Silently ignore OpenMP. Do not throw warning. >>> >> > } >>> >> > else if (both -fopenmp and -fno-openmp are present) { >>> >> > Decide based on which one appears later in the command >>> >> > line. >>> >> > } >>> >> > } >>> >> >>> >> I think the implementation should use the general diagnostics >>> >> infrastructure. For example, by default add something like >>> >> -Wsource-uses-openmp and disable it in case of -fno-openmp. >>> >> >>> >> $ g++ -W -Wall /tmp/zzz.cc >>> >> /tmp/zzz.cc:3:0: warning: ignoring #pragma omp barrier >>> >> [-Wunknown-pragmas] >>> >> >>> >> By the way, the algorithm above is not consistent with gcc, which >>> >> ignores the pragma when no -f flag is passed. >>> > >>> > I think that we'd like to act the way that gcc does, except that we >>> > don't want to warn about unused OpenMP pragmas when -fno-openmp is >>> > given even if -Wall is also specified. >>> > >>> > -Hal >>> > >>> >> >>> >> 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 <[email protected]>*/ >>> >> _______________________________________________ >>> >> cfe-commits mailing list >>> >> [email protected] >>> >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >>> >> >>> > >>> > -- >>> > Hal Finkel >>> > Postdoctoral Appointee >>> > Leadership Computing Facility >>> > Argonne National Laboratory >>> >>> >>> >>> -- >>> mahesha >>> >> >> -- >> Hal Finkel >> Postdoctoral Appointee >> Leadership Computing Facility >> Argonne National Laboratory > > > > -- > mahesha -- mahesha _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
