[PATCH] [OPENMP] Parsing and sema support for #pragma omp target data" directive.
Bataev, Alexey
a.bataev at hotmail.com
Wed Jul 1 20:20:00 PDT 2015
Kelvin, you don't need fake OMPD_data, instead mark it as OMPD_unknown
and check explicitly that 'data' identifier is expected
Best regards,
Alexey Bataev
=============
Software Engineer
Intel Compiler Team
01.07.2015 18:03, Kelvin Li пишет:
> ================
> Comment at: lib/Parse/ParseOpenMP.cpp:43-55
> @@ -42,2 +42,15 @@
> : getOpenMPDirectiveKind(P.getPreprocessor().getSpelling(Tok));
> +
> + switch (DKind) {
> + case OMPD_target: {
> + auto SavedToken = P.getPreprocessor().LookAhead(0);
> + if (!SavedToken.isAnnotation()) {
> + if (P.getPreprocessor().getSpelling(SavedToken) == "data") {
> + DKind = OMPD_target_data;
> + P.ConsumeToken();
> + }
> + }
> + break;
> + }
> + default:
> for (unsigned i = 0; i < llvm::array_lengthof(F); ++i) {
> ----------------
> ABataev wrote:
>> This code is copied from clang-omp, we're using another solution in official clang. See the patch for 'declare simd' construct (http://reviews.llvm.org/D10599)
> Perhaps I misunderstand it. The issue of the suggested approach is that it treats 'data' as a directive in order to have { OMPD_target, OMPD_data, OMPD_target_data }. Creating a fake OMPD_data may be confusing. That is why I took this approach.
>
> http://reviews.llvm.org/D10765
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
More information about the cfe-commits
mailing list