D16358: [OpenMP] Parsing + Sema for nowait clause on target directive

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 20 23:42:24 PST 2016


Ok, thanks

Best regards,
Alexey Bataev
=============
Software Engineer
Intel Compiler Team

21.01.2016 10:16, Hahnfeld, Jonas пишет:
> Hi Alexey,
>
> Phabricator doesn't send mails when only the review state changes as mentioned
> in documentation. This makes following the current status hard when relying on
> them.
> Could you therefore please type a "LGTM" which should trigger an email to the
> mailing list?
>
> Thanks,
> Jonas
>
>> -----Original Message-----
>> From: cfe-commits [mailto:cfe-commits-bounces at lists.llvm.org] On Behalf
>> Of Arpith Jacob via cfe-commits
>> Sent: Wednesday, January 20, 2016 5:56 PM
>> To: acjacob at us.ibm.com; a.bataev at hotmail.com; kkwli0 at gmail.com;
>> hfinkel at anl.gov; sfantao at us.ibm.com; cbertol at us.ibm.com
>> Cc: caomhin at us.ibm.com; cfe-commits at lists.llvm.org
>> Subject: [PATCH] D16358: [OpenMP] Parsing + Sema for nowait clause on
>> target directive
>>
>> arpith-jacob created this revision.
>> arpith-jacob added reviewers: ABataev, kkwli0, hfinkel, sfantao,
>> carlo.bertolli.
>> arpith-jacob added subscribers: cfe-commits, caomhin, fraggamuffin.
>>
>> Allow nowait clause on target directive in sema and add test cases.
>>
>> http://reviews.llvm.org/D16358
>>
>> Files:
>>    include/clang/Basic/OpenMPKinds.def
>>    test/OpenMP/target_ast_print.cpp
>>    test/OpenMP/target_nowait_messages.cpp
>>
>> Index: test/OpenMP/target_nowait_messages.cpp
>> ==========================================================
>> =========
>> --- /dev/null
>> +++ test/OpenMP/target_nowait_messages.cpp
>> @@ -0,0 +1,17 @@
>> +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp
>> +-ferror-limit 100 -o - %s
>> +
>> +void foo() {
>> +}
>> +
>> +int main(int argc, char **argv) {
>> +  #pragma omp target nowait( // expected-warning {{extra tokens at the
>> +end of '#pragma omp target' are ignored}}
>> +  foo();
>> +  #pragma omp target nowait (argc)) // expected-warning {{extra tokens
>> +at the end of '#pragma omp target' are ignored}}
>> +  foo();
>> +  #pragma omp target nowait device (-10u)
>> +  foo();
>> +  #pragma omp target nowait (3.14) device (-10u) // expected-warning
>> +{{extra tokens at the end of '#pragma omp target' are ignored}}
>> +  foo();
>> +
>> +  return 0;
>> +}
>> Index: test/OpenMP/target_ast_print.cpp
>> ==========================================================
>> =========
>> --- test/OpenMP/target_ast_print.cpp
>> +++ test/OpenMP/target_ast_print.cpp
>> @@ -25,6 +25,8 @@
>>     foo();
>>   #pragma omp target map(always,alloc: i)
>>     foo();
>> +#pragma omp target nowait
>> +  foo();
>>     return 0;
>>   }
>>
>> @@ -44,6 +46,8 @@
>>   // CHECK-NEXT: foo()
>>   // CHECK-NEXT: #pragma omp target map(always,alloc: i)  // CHECK-NEXT:
>> foo()
>> +// CHECK-NEXT: #pragma omp target nowait // CHECK-NEXT: foo()
>>   // CHECK: template <typename T = char, int C = 1> char tmain(char argc,
>> char
>> *argv) {  // CHECK-NEXT: char i, j, a[20]  // CHECK-NEXT: #pragma omp target
>> @@ -60,6 +64,8 @@  // CHECK-NEXT: foo()  // CHECK-NEXT: #pragma omp
>> target map(always,alloc: i)  // CHECK-NEXT: foo()
>> +// CHECK-NEXT: #pragma omp target nowait // CHECK-NEXT: foo()
>>   // CHECK: template <typename T, int C> T tmain(T argc, T *argv) {  //
>> CHECK-
>> NEXT: T i, j, a[20]  // CHECK-NEXT: #pragma omp target @@ -76,6 +82,8 @@
>> // CHECK-NEXT: foo()  // CHECK-NEXT: #pragma omp target
>> map(always,alloc: i)  // CHECK-NEXT: foo()
>> +// CHECK-NEXT: #pragma omp target nowait // CHECK-NEXT: foo()
>>
>>   // CHECK-LABEL: int main(int argc, char **argv) {  int main (int argc, char
>> **argv) { @@ -115,6 +123,11 @@
>>     foo();
>>   // CHECK-NEXT: foo();
>>
>> +#pragma omp target nowait
>> +// CHECK-NEXT: #pragma omp target nowait
>> +  foo();
>> +// CHECK-NEXT: foo();
>> +
>>     return tmain<int, 5>(argc, &argc) + tmain<char, 1>(argv[0][0],
>> rgv[0]);  }
>>
>> Index: include/clang/Basic/OpenMPKinds.def
>> ==========================================================
>> =========
>> --- include/clang/Basic/OpenMPKinds.def
>> +++ include/clang/Basic/OpenMPKinds.def
>> @@ -355,6 +355,7 @@
>>   OPENMP_TARGET_CLAUSE(device)
>>   OPENMP_TARGET_CLAUSE(map)
>>   OPENMP_TARGET_CLAUSE(private)
>> +OPENMP_TARGET_CLAUSE(nowait)
>>
>>   // Clauses allowed for OpenMP directive 'target data'.
>>   // TODO More clauses for 'target data' directive.
>>



More information about the cfe-commits mailing list