[cfe-commits] [PATCH] First OpenMP patch

Alexey Bataev a.bataev at gmx.com
Mon Dec 17 01:48:33 PST 2012


Dmitry, Hal,
 Thank you for your comments and sorry for the delay, I was on a vacation.
 I've made some fixes according to your comments. 
 Hal, I've change the sentence in the doc. Now there is only one warning, if any OpenMP pragma is found.
 Dmitry, I've changed the processing of the -fno-openmp flag. If -fno-openmp is specified, the option -Wno-source-uses-openmp is passed to the frontend. Option -Wsource-uses-openmp is on by default.

----- Original Message -----
From: Dmitri Gribenko
Sent: 12/12/12 12:39 PM
To: Alexey Bataev
Subject: Re: [cfe-commits] [PATCH] First OpenMP patch

 On Wed, Dec 12, 2012 at 6:10 AM, Alexey Bataev <a.bataev at gmx.com> wrote: > Hello guys, > Are there any comments on this version of patch? If no, then can I commit? Sorry for a long delay. I do have comments. +// Only -Wsource-uses-openmp is passed. +// RUN: %clang -### -S -Wsource-uses-openmp -o - %s 2>&1 | FileCheck --check-prefix=CHECK-WOMP %s +// CHECK-WOMP: -Wsource-uses-openmp +// RUN: %clang -### -S -Wsource-uses-openmp -o - %s 2>&1 | FileCheck --check-prefix=CHECK-WOMPN %s +// CHECK-WOMPN-NOT: -Wno-source-uses-openmp It doesn't make sense to test this by itself. This aspect of the Clang warning infrastructure is working well and is tested elsewhere. Sorry if that was unclear, but what I meant to ask to test is: if -Wsource-uses-openmp is passed or not depending on whether -fopenmp/-fno-openmp is passed. + // -fno-openmp switch processing + if (Args.hasArg(OPT_fno_openmp)) { + Opts.Warnings.push_back("no-source-uses-openmp"); + } Now I see that since warning is contro!
 lled from the frontend, rather than the driver, it is not possible to test the logic with -###. I wonder if it is possible (and makes sense!) to move this logic to the driver, since the frontend should not make such decisions. 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>*/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121217/5c5150b1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.p
Type: application/octet-stream
Size: 9023 bytes
Desc: Attachment: patch.p
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121217/5c5150b1/attachment.obj>


More information about the cfe-commits mailing list