Ok, will default it to 3.1 for now. Best regards, Alexey Bataev ============= Software Engineer Intel Compiler Team
26.05.2016 11:09, Hahnfeld, Jonas пишет: > Hi Alexey, > > If this defaults to the currently completely supported version (I think 4.0 > when target update gets committed), that would be great. That way, the user > would have to explicitly request the newer (and possibly incomplete) version. > > Greetings, > Jonas > >> -----Original Message----- >> From: Alexey Bataev [mailto:a.bat...@hotmail.com] >> Sent: Thursday, May 26, 2016 9:57 AM >> To: Hahnfeld, Jonas >> Cc: cfe-commits@lists.llvm.org; Samuel F Antao >> Subject: Re: r270822 - [OPENMP] Set '_OPENMP' macro to '201511' value to >> reflect support for >> >> Hi, >> >> I thought about this. Will it be good for you if I add and option '-fopenmp- >> version=[31|40|45]', which will allow you to choose the supported version? >> For now it will just modify the value of _OPENMP, later support can be >> extended for better compatibility. >> >> Best regards, >> Alexey Bataev >> ============= >> Software Engineer >> Intel Compiler Team >> >> 26.05.2016 10:46, Hahnfeld, Jonas пишет: >>> Hi Alexey, >>> >>> I don't really know whether this is correct. IMO this may only be set >>> once OpenMP 4.5 is fully supported. >>> This currently isn't even the case for OpenMP 4.0 as at least support >>> for #pragma omp target update has not yet been committed. >>> >>> In my understanding the macro may be used for feature tests. That's >>> what we tried to do within the ompt.h header and we had to add an >>> exception because Clang 3.8 reported 201307 but didn't support #pragma >>> omp declare target (which it only recently gained). >>> Would you be ok reverting this commit? >>> >>> Cheers, >>> Jonas >>> >>>> -----Original Message----- >>>> From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On >>>> Behalf Of Alexey Bataev via cfe-commits >>>> Sent: Thursday, May 26, 2016 6:56 AM >>>> To: cfe-commits@lists.llvm.org >>>> Subject: r270822 - [OPENMP] Set '_OPENMP' macro to '201511' value to >>>> reflect support for >>>> >>>> Author: abataev >>>> Date: Wed May 25 23:56:05 2016 >>>> New Revision: 270822 >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=270822&view=rev >>>> Log: >>>> [OPENMP] Set '_OPENMP' macro to '201511' value to reflect support for >>>> OpenMP 4.5. >>>> >>>> According to OpenMP 4.5 the _OPENMP macro name is defined to have >> the >>>> decimal value yyyymm where yyyy and mm are the year and month >>>> designations of the version of the OpenMP API that the implementation >>>> supports. Clang supports OpenMP 4.5 so updated value of _OPENMP >> macro >>>> to 201511. >>>> >>>> Modified: >>>> cfe/trunk/lib/Frontend/InitPreprocessor.cpp >>>> cfe/trunk/test/OpenMP/predefined_macro.c >>>> >>>> Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp >>>> URL: http://llvm.org/viewvc/llvm- >>>> >> project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=270822&r1=270 >>>> 82 >>>> 1&r2=270822&view=diff >>>> >> ========================================================== >>>> ==================== >>>> --- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original) >>>> +++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Wed May 25 23:56:05 >>>> +++ 2016 >>>> @@ -928,7 +928,7 @@ static void InitializePredefinedMacros(c >>>> // macro name is defined to have the decimal value yyyymm where >>>> // yyyy and mm are the year and the month designations of the >>>> // version of the OpenMP API that the implementation support. >>>> - Builder.defineMacro("_OPENMP", "201307"); >>>> + Builder.defineMacro("_OPENMP", "201511"); >>>> } >>>> >>>> // CUDA device path compilaton >>>> >>>> Modified: cfe/trunk/test/OpenMP/predefined_macro.c >>>> URL: http://llvm.org/viewvc/llvm- >>>> >> project/cfe/trunk/test/OpenMP/predefined_macro.c?rev=270822&r1=2708 >>>> 21&r2=270822&view=diff >>>> >> ========================================================== >>>> ==================== >>>> --- cfe/trunk/test/OpenMP/predefined_macro.c (original) >>>> +++ cfe/trunk/test/OpenMP/predefined_macro.c Wed May 25 23:56:05 >> 2016 >>>> @@ -5,7 +5,7 @@ >>>> // -fopenmp option is specified >>>> #ifndef _OPENMP >>>> #error "No _OPENMP macro is defined with -fopenmp option" >>>> -#elsif _OPENMP != 201307 >>>> +#elsif _OPENMP != 201511 >>>> #error "_OPENMP has incorrect value" >>>> #endif //_OPENMP >>>> #else >>>> >>>> >>>> _______________________________________________ >>>> cfe-commits mailing list >>>> cfe-commits@lists.llvm.org >>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits