r302435 - [Sema] Fix typos handling in an overloadable call.

2017-05-08 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Mon May 8 11:05:54 2017 New Revision: 302435 URL: http://llvm.org/viewvc/llvm-project?rev=302435&view=rev Log: [Sema] Fix typos handling in an overloadable call. In C typos in arguments in a call of an overloadable function lead to a failure of construction of CallExpr and

[PATCH] D25305: [OpenCL] Setting constant address space for array initializers

2016-10-19 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1272 +if (getLangOpts().OpenCL) { + UA = llvm::GlobalValue::UnnamedAddr::None; + AS = CGM.getContext().getTargetAddressSpace(LangAS::opencl_constant); Why this change? https://rev

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-19 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D25343#567374, @tstellarAMD wrote: > In https://reviews.llvm.org/D25343#565288, @Anastasia wrote: > > > Do you have any code example where Clang/LLVM performs wrong optimizations > > with respect to the control flow of SPMD execution? > > >

RE: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-24 Thread Anastasia Stulova via cfe-commits
Hi Ettore, As far as I understand the whole problem is that the optimized functions are marked by __attribute__((pure)). If the attribute is removed from your example, we get LLVM dump preserving correctness: define i32 @bar(i32 %x) local_unnamed_addr #0 { entry: %call = tail call i32 @foo()

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-24 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D25343#567374, @tstellarAMD wrote: > In https://reviews.llvm.org/D25343#565288, @Anastasia wrote: > > > Do you have any code example where Clang/LLVM performs wrong optimizations > > with respect to the control flow of SPMD execution? > > >

[PATCH] D25305: [OpenCL] Setting constant address space for array initializers

2016-10-24 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1272 +if (getLangOpts().OpenCL) { + UA = llvm::GlobalValue::UnnamedAddr::None; + AS = CGM.getContext().getTargetAddressSpace(LangAS::opencl_constant); bader wrote: > AlexeySotkin wr

[PATCH] D25935: [OpenCL] Diagnose variadic arguments

2016-10-25 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: yaxunl. Anastasia added a subscriber: cfe-commits. OpenCL disallows using variadic arguments (s6.9.e and s6.12.5 OpenCL v2.0) apart from some exceptions: - printf - enqueue_kernel This change adds error diagnostic for variadic functio

[PATCH] D25305: [OpenCL] Setting constant address space for array initializers

2016-10-25 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1272 +if (getLangOpts().OpenCL) { + UA = llvm::GlobalValue::UnnamedAddr::None; + AS = CGM.getContext().getTargetAddressSpace(LangAS::opencl_constant); AlexeySotkin wrote: > bader wr

[PATCH] D25954: [OpenCL] Add missing atom_xor for 64 bit to opencl-c.h

2016-10-25 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D25954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D25305: [OpenCL] Setting constant address space for array initializers

2016-10-26 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Thanks! https://reviews.llvm.org/D25305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

RE: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-28 Thread Anastasia Stulova via cfe-commits
Hi Ettore, Thanks for the example. Up to now we used noduplicate to prevent this erroneous optimisation but using convergent instead would be equally good. And as it's pointed out it is less restrictive to allow more optimisations in LLVM i.e. loop unrolling with convergent operation in it. I

r285395 - [OpenCL] Diagnose variadic arguments

2016-10-28 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Fri Oct 28 07:59:39 2016 New Revision: 285395 URL: http://llvm.org/viewvc/llvm-project?rev=285395&view=rev Log: [OpenCL] Diagnose variadic arguments OpenCL disallows using variadic arguments (s6.9.e and s6.12.5 OpenCL v2.0) apart from some exceptions: - printf - enqueue_kern

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-31 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Thanks! Could you please address the last comment before committing? Comment at: test/CodeGenOpenCL/convergent.cl:54 +// CHECK: tail call spir_func void @f() +// CHECK-NOT: call spir_func void @non_convfun() +//

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-31 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Additional discussions: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20161024/175373.html https://reviews.llvm.org/D25343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[PATCH] D25935: [OpenCL] Diagnose variadic arguments

2016-10-31 Thread Anastasia Stulova via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in r285395 https://reviews.llvm.org/D25935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26157: [OpenCL] always use SPIR address spaces for kernel_arg_addr_space MD

2016-10-31 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. It looks good generally. My only concern here if anyone could use this MD expecting target AS values which correspond to those put in the IR itself. On the other hand clGetKernelArgInfo is supposed to be used for obtaining the information about the original source whi

[PATCH] D26196: AMDGPU: Translate null pointers in private and local addr space

2016-11-03 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. My understanding of NULL constant in IR was that it doesn't assume any specific integer value (i.e. 0). And currently as I can see it is lowered very late in LLVM backend during the code selection phase. Looking at the lowering code in LLVM, it seems like it shouldn'

[PATCH] D26157: [OpenCL] always use SPIR address spaces for kernel_arg_addr_space MD

2016-11-03 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. > Is there nowadays such a thing as "standard OpenCL logical AS IDs" which > could be retained down to code gen? I must say I haven't checked the current > situation here. It used to be that the logical ids are assumed to be > converted to the target ones already in C

[PATCH] D26157: [OpenCL] always use SPIR address spaces for kernel_arg_addr_space MD

2016-11-03 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D26157#586764, @yaxunl wrote: > One purpose of kernel arg info metadata is to be passed to OpenCL runtime to > fulfill clGetKernelArgInfo queries. > (https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clGetKernelArgInfo.html). > As

[PATCH] D26157: [OpenCL] always use SPIR address spaces for kernel_arg_addr_space MD

2016-11-03 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. I am wondering whether returning the strings with source level information would be an option instead? But yes this MD are OpenCL specific indeed. I am just not sure whether putting hard-coded arbitrary numbers would not cause any confusions in the future. I feel that

RE: r273191 - [OpenCL] Include opencl-c.h by default as a clang module

2016-11-04 Thread Anastasia Stulova via cfe-commits
Hi Richard, I guess the problem is that the header file itself is really large and we have all these configurations that depending on versions/extensions expose different builtin libraries. They are all based on the core part though which is already large. Ideally it would be nice to test the

RE: r273191 - [OpenCL] Include opencl-c.h by default as a clang module

2016-11-04 Thread Anastasia Stulova via cfe-commits
Great! Thanks! From: Liu, Yaxun (Sam) [mailto:yaxun@amd.com] Sent: 04 November 2016 13:52 To: Anastasia Stulova; Richard Smith Cc: nd; cfe-commits@lists.llvm.org Subject: RE: r273191 - [OpenCL] Include opencl-c.h by default as a clang module Hi Richard/Anastasia, I agree some tests are redun

[PATCH] D26302: [OpenCL] Remove redundant test for OpenCL header file

2016-11-04 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/Headers/opencl-c-header.cl:48 -// === -// Compile for OpenCL 1.0 for the first time. A module should be generated. -// RUN: %clang_cc1 -triple spir-unknown-unknown -emit-llvm -o - -finclude-default-header -fmodules -fimplicit-mod

[PATCH] D26302: [OpenCL] Remove redundant test for OpenCL header file

2016-11-05 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. LGTM! Thanks! Do you know the runtime of this test now? https://reviews.llvm.org/D26302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26157: [OpenCL] always use SPIR address spaces for kernel_arg_addr_space MD

2016-11-07 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D26157#586867, @pekka.jaaskelainen wrote: > Indeed, it requires wider scale discussion to get it right, and e.g. to pass > the info to AA. But to be honest, I think OpenCL and CUDA are still > considered 'minority' languages in Clang/LLVM w

[PATCH] D26302: [OpenCL] Remove redundant test for OpenCL header file

2016-11-07 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Cool! Thanks! Repository: rL LLVM https://reviews.llvm.org/D26302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26157: [OpenCL] always use SPIR address spaces for kernel_arg_addr_space MD

2016-11-08 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. Your code comment seem to describe the issue quite well. Even though I am still inclined towards keeping the address spaces as long as possible and only converting into physical memory segments on the backend really. I believe there a

[PATCH] D26507: [OpenCL] Change to clk_event parameter in enqueue_kernel

2016-11-10 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: yaxunl. Anastasia added a subscriber: cfe-commits. - Accept NULL pointer as a valid parameter value for clk_event - Generate clk_events_t arguments of internal __enqueue_kernel_XXX function to be pointers in generic address space htt

[PATCH] D26509: [OpenCL] Fix integer parameters of enqueue_kernel

2016-11-10 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: yaxunl. Anastasia added a subscriber: cfe-commits. Parameters representing number of events as well as sizes of enqueued block arguments in enqueue_kernel function are specified as uint type. This prevents passing sizeof(int) type expr

[PATCH] D26509: [OpenCL] Fix integer parameters of enqueue_kernel

2016-11-11 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:2547 + llvm::Value *NumEvents = + Builder.CreateZExtOrTrunc(EmitScalarExpr(E->getArg(3)), Int32Ty); llvm::Value *EventList = yaxunl wrote: > should Int32Ty be SizeTy? I am

[PATCH] D26509: [OpenCL] Fix integer parameters of enqueue_kernel

2016-11-14 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. I see. If I say something like: - For the number of event argument allow to pass larger integers than 32 bits as soon as compiler can prove that the range fits in 32 bits. If not, the diagnostic will be given. - Change type of the arguments specifying sizes of the co

r286836 - [OpenCL] Change to clk_event parameter in enqueue_kernel.

2016-11-14 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Mon Nov 14 09:34:01 2016 New Revision: 286836 URL: http://llvm.org/viewvc/llvm-project?rev=286836&view=rev Log: [OpenCL] Change to clk_event parameter in enqueue_kernel. - Accept NULL pointer as a valid parameter value for clk_event. - Generate clk_event_t arguments of inter

[PATCH] D26507: [OpenCL] Change to clk_event parameter in enqueue_kernel

2016-11-14 Thread Anastasia Stulova via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in r286836. https://reviews.llvm.org/D26507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26509: [OpenCL] Fix integer parameters of enqueue_kernel

2016-11-14 Thread Anastasia Stulova via cfe-commits
Anastasia updated the summary for this revision. Anastasia updated this revision to Diff 77825. Anastasia added a comment. 1. Corrected typos in CodeGen test. 2. Improved description. https://reviews.llvm.org/D26509 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CGBuiltin.cpp

r286849 - [OpenCL] Fix for integer parameters of enqueue_kernel

2016-11-14 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Mon Nov 14 11:39:58 2016 New Revision: 286849 URL: http://llvm.org/viewvc/llvm-project?rev=286849&view=rev Log: [OpenCL] Fix for integer parameters of enqueue_kernel Make handling integer parameters more flexible: - For the number of events argument allow to pass larger int

[PATCH] D26509: [OpenCL] Fix integer parameters of enqueue_kernel

2016-11-14 Thread Anastasia Stulova via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in r286849. https://reviews.llvm.org/D26509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r286856 - Fix OpenCL test for buildbot by removing extra (erroneous) RUN line

2016-11-14 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Mon Nov 14 12:11:09 2016 New Revision: 286856 URL: http://llvm.org/viewvc/llvm-project?rev=286856&view=rev Log: Fix OpenCL test for buildbot by removing extra (erroneous) RUN line Modified: cfe/trunk/test/SemaOpenCL/cl20-device-side-enqueue.cl Modified: cfe/trunk/test/

Re: [PATCH] D13105: [OpenCL] Enable program scope variables for OpenCL2.0

2015-09-25 Thread Anastasia Stulova via cfe-commits
Anastasia updated this revision to Diff 35732. Anastasia added a comment. Thanks! The review comments are addressed in this update! http://reviews.llvm.org/D13105 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/Specifiers.h lib/AST/Decl.cpp lib/AST/DeclPrinter.cpp

[PATCH] D13168: [OpenCL] OpenCL2.0 - Apply default address space rules

2015-09-25 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: pekka.jaaskelainen. Anastasia added a subscriber: cfe-commits. If address space (AS) of a variable/parameter declaration is not set, OpenCL2.0 s6.5 defines explicit rules for default ASes: - The AS of global and local static variables

[Patch][OpenCL] Custom atomic Builtin check ignores address space of a non-atomic pointer

2015-09-30 Thread Anastasia Stulova via cfe-commits
Hi all, Address spaces are not handled in custom semantic checks of atomic Builtins. If there are two pointers passed to the Builtin, it doesn't allow the second (non-atomic) one to be qualified with an address space. This patch removed this restriction by recording the address space

r248891 - [OpenCL 2.0] Fix wrong atomic type detection in the diagnostics of allowed types

2015-09-30 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Wed Sep 30 06:48:15 2015 New Revision: 248891 URL: http://llvm.org/viewvc/llvm-project?rev=248891&view=rev Log: [OpenCL 2.0] Fix wrong atomic type detection in the diagnostics of allowed types Modified: cfe/trunk/lib/Sema/SemaType.cpp cfe/trunk/test/Parser/opencl-ato

r248896 - [OpenCL 2.0] This change adds extra diagnostics to atomic types

2015-09-30 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Wed Sep 30 08:18:52 2015 New Revision: 248896 URL: http://llvm.org/viewvc/llvm-project?rev=248896&view=rev Log: [OpenCL 2.0] This change adds extra diagnostics to atomic types Applied restrictions from OpenCL v2.0 s6.13.11.8 that mainly disallow operations on atomic types (e

r248902 - [OpenCL] Add missing OpenCL LangOpts in address space compatibility checks

2015-09-30 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Wed Sep 30 08:49:55 2015 New Revision: 248902 URL: http://llvm.org/viewvc/llvm-project?rev=248902&view=rev Log: [OpenCL] Add missing OpenCL LangOpts in address space compatibility checks and test checking broken (due to CL specific diagnostics) C functionality Mtest/Sem

r248906 - [OpenCL 2.0] Enable program scope variables, Section 6.5.1.

2015-09-30 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Wed Sep 30 09:08:20 2015 New Revision: 248906 URL: http://llvm.org/viewvc/llvm-project?rev=248906&view=rev Log: [OpenCL 2.0] Enable program scope variables, Section 6.5.1. - Remove virtual SC_OpenCLWorkGroupLocal storage type specifier as it conflicts with static local vari

Re: [PATCH] D13168: [OpenCL] OpenCL2.0 - Apply default address space rules

2015-10-05 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:6282 @@ +6281,3 @@ +} else if (state.getCurrentChunkIndex() == 0 && + D.getContext() == Declarator::FileContext && + !D.isFunctionDeclarator() && !D.isFunctionDefinition() && ---

r249301 - [OpenCL] Fix casting a true boolean to an integer vector.

2015-10-05 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Mon Oct 5 06:27:41 2015 New Revision: 249301 URL: http://llvm.org/viewvc/llvm-project?rev=249301&view=rev Log: [OpenCL] Fix casting a true boolean to an integer vector. OpenCL v1.1 s6.2.2: for the boolean value true, every bit in the result vector should be set. This chan

RE: [Patch][OpenCL] Custom atomic Builtin check ignores address space of a non-atomic pointer

2015-10-05 Thread Anastasia Stulova via cfe-commits
'd be time to drop the default value from it, and go through all the places where it's called with the default AS, thus breaking multi-AS. Might be a worthwhile job to do at some point. On 09/30/2015 01:23 PM, Anastasia Stulova via cfe-commits wrote: > Hi all, > > Address s

RE: [Patch][OpenCL] Custom atomic Builtin check ignores address space of a non-atomic pointer

2015-10-12 Thread Anastasia Stulova via cfe-commits
that I wonder if it'd be time to drop the default value from it, and go through all the places where it's called with the default AS, thus breaking multi-AS. Might be a worthwhile job to do at some point. On 09/30/2015 01:23 PM, Anastasia Stulova via cfe-commits wrote: > Hi all,

r250892 - [OpenCL] Add test for program scope variable restrictions in OpenCL v2.0

2015-10-21 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Wed Oct 21 05:37:57 2015 New Revision: 250892 URL: http://llvm.org/viewvc/llvm-project?rev=250892&view=rev Log: [OpenCL] Add test for program scope variable restrictions in OpenCL v2.0 http://reviews.llvm.org/D13105 Added: cfe/trunk/test/SemaOpenCL/storageclass-cl20.cl

Re: [PATCH] D13168: [OpenCL] OpenCL2.0 - Apply default address space rules

2015-10-21 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:6282 @@ +6281,3 @@ +} else if (state.getCurrentChunkIndex() == 0 && + D.getContext() == Declarator::FileContext && + !D.isFunctionDeclarator() && !D.isFunctionDefinition() && ---

RE: [Patch][OpenCL] Custom atomic Builtin check ignores address space of a non-atomic pointer

2015-10-21 Thread Anastasia Stulova via cfe-commits
Hi Pekka, Are you ok with this change? Thanks, Anastasia -Original Message- From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of Anastasia Stulova via cfe-commits Sent: 12 October 2015 16:00 To: 'Pekka Jääskeläinen'; cfe-commits@lists.llvm.org Subject:

Re: [PATCH] D19780: Output OpenCL version in Clang diagnostics

2016-07-19 Thread Anastasia Stulova via cfe-commits
Anastasia closed this revision. Anastasia added a comment. r269305 https://reviews.llvm.org/D19780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21567: [OpenCL] Generate struct type for sampler_t and function call for the initializer

2016-07-19 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:2399 @@ +2398,3 @@ + // therefore no need to be translated. + if (getLangOpts().OpenCL && ASTTy->isSamplerT()) +return; Could we lift this check right to the beginning of the function

Re: [PATCH] D21567: [OpenCL] Generate struct type for sampler_t and function call for the initializer

2016-07-20 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaInit.cpp:6945 @@ +6944,3 @@ + // get the integer literal. + Init = cast(const_cast( +Var->getInit()))->getSubExpr(); What if global variable sampler is initialized with another

Re: [PATCH] D22523: [OpenCL] AMDGCN target will generate images in constant address space

2016-07-20 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Comment at: lib/CodeGen/TargetInfo.cpp:6868 @@ +6867,3 @@ +unsigned AMDGPUTargetCodeGenInfo::getOpenCLImageAddrSpace(CodeGen::CodeGenModule &CGM) const { + return CGM.getContext().getTargetAddressSpace(LangAS:

Re: [PATCH] D22637: [OpenCL] Add extension cl_khr_mipmap_image to clang

2016-07-25 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/Misc/amdgcn.languageOptsOpenCL.cl:188 @@ +187,3 @@ +#endif +// expected-warning@+6{{unsupported OpenCL extension 'cl_khr_mipmap_image' - ignoring}} +#else Can you move this error message down instead of adding 6 l

Re: [PATCH] D21567: [OpenCL] Generate struct type for sampler_t and function call for the initializer

2016-07-26 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaInit.cpp:6945 @@ +6944,3 @@ + // get the integer literal. + Init = cast(const_cast( +Var->getInit()))->getSubExpr(); Could you please take a look at the new diagnostics you are

Re: [PATCH] D22637: [OpenCL] Add extension cl_khr_mipmap_image to clang

2016-07-26 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/Misc/amdgcn.languageOptsOpenCL.cl:188 @@ +187,3 @@ +#endif +// expected-warning@+6{{unsupported OpenCL extension 'cl_khr_mipmap_image' - ignoring}} +#else ashi1 wrote: > yaxunl wrote: > > Anastasia wrote: > > > Ca

Re: [PATCH] D22637: [OpenCL] Add extension cl_khr_mipmap_image to clang

2016-07-26 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/extension-version.cl:228 @@ +227,3 @@ +#endif +// expected-warning@+6{{unsupported OpenCL extension 'cl_khr_mipmap_image' - ignoring}} +#else Anastasia wrote: > ashi1 wrote: > > Anastasia wrote: > > > C

Re: [PATCH] D22637: [OpenCL] Add extension cl_khr_mipmap_image to clang

2016-07-27 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/Misc/amdgcn.languageOptsOpenCL.cl:188 @@ +187,3 @@ + #endif +#else + #ifdef cl_khr_mipmap_image Looks good! Could you just remove indentation please as it's not common for C macros? The same for the test below!

Re: [PATCH] D21567: [OpenCL] Generate struct type for sampler_t and function call for the initializer

2016-07-27 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Btw, I am missing tests for generated __translate_sampler_initializer which I think we had at some point. Comment at: lib/CodeGen/CGOpenCLRuntime.cpp:84 @@ +83,3 @@ +SamplerTy = llvm::PointerType::get(llvm::StructType::create( + CGM.getLLVMCo

Re: [PATCH] D21567: [OpenCL] Generate struct type for sampler_t and function call for the initializer

2016-07-28 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Could you please address these small comments before committing! Comment at: lib/Sema/SemaInit.cpp:6959 @@ +6958,3 @@ +// this has already been don

Re: [PATCH] D22767: [OpenCL] Added CLK_ABGR definition for get_image_channel_order return value

2016-07-28 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Repository: rL LLVM https://reviews.llvm.org/D22767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22637: [OpenCL] Add extension cl_khr_mipmap_image to clang

2016-07-28 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Repository: rL LLVM https://reviews.llvm.org/D22637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21567: [OpenCL] Generate struct type for sampler_t and function call for the initializer

2016-07-28 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaInit.cpp:6961 @@ +6960,3 @@ +// the initializer. +if (!Init->isConstantInitializer(S.Context, false)) + break; yaxunl wrote: > Anastasia wrote: > > I think you don't need this check

RE: [PATCH] D20979: [OpenCL] Use function metadata to represent kernel attributes

2016-08-01 Thread Anastasia Stulova via cfe-commits
Hi Xiuli, Could you please elaborate what do you think it broken exactly? Because we haven't actually removed opencl.kernels metadata but just changed the format of it. Basically, we are using function metadata instead of generic metadata as it was before. Thanks, Anastasia -Original Me

Re: [PATCH] D22927: [OpenCL] Fix size of image type

2016-08-01 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D22927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

Re: [PATCH] D23071: [OpenCL] Remove extra native_ functions from opencl-c.h

2016-08-03 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. LGTM! Repository: rL LLVM https://reviews.llvm.org/D23071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23086: [OpenCL] Generate concrete struct type for ndrange_t

2016-08-04 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. I don't think it works correctly yet. Since ndrange_t is a copyable type i.e. we should be able to allocate the space for it at compile time and to copy it. See spec example s6.13.17.2: ndrange_t ndrange = ndrange_1d(...); This implies that compiler should: 1. Gen

Re: [PATCH] D23120: [OpenCL] Added underscores to the names of 'to_addr' OpenCL built-ins.

2016-08-04 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Thanks! https://reviews.llvm.org/D23120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

RE: r277743 - [OpenCL] Added underscores to the names of 'to_addr' OpenCL built-ins.

2016-08-05 Thread Anastasia Stulova via cfe-commits
Hans, If still possible could we merge this into 3.9. It contains just a minor renaming but it makes all those new OpenCL Builtins usable. Thanks, Anastasia -Original Message- From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of Alexey Bader via cfe-commits Sent:

Re: [PATCH] D23086: [OpenCL] Generate concrete struct type for ndrange_t

2016-08-05 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGOpenCLRuntime.cpp:43 @@ +42,3 @@ + + return llvm::StructType::create(EleTypes, "ndrange_t"); +} yaxunl wrote: > Anastasia wrote: > > yaxunl wrote: > > > yaxunl wrote: > > > > struct name should be "struct

Re: [PATCH] D23086: [OpenCL] Generate concrete struct type for ndrange_t

2016-08-05 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D23086#507055, @majnemer wrote: > This approach seems wrong to me. > > Instead, why not just make `ndrange_t` a typedef of a real struct in > `Sema::Initialize`? I think we have an issue because in that case during the diagnostic of enque

Re: [PATCH] D22815: [OpenCL][AMDGPU] Add support for -cl-denorms-are-zero

2016-08-05 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D22815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

Re: [PATCH] D22940: [OpenCL] Handle -cl-fp32-correctly-rounded-divide-sqrt

2016-08-05 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Comment at: include/clang/Driver/Options.td:393 @@ -392,1 +392,3 @@ +def cl_fp32_correctly_rounded_divide_sqrt : Flag<["-"], "cl-fp32-correctly-rounded-divide-sqrt">, Group, Flags<[CC1Option]>, + HelpText<"Ope

Re: [PATCH] D23086: [OpenCL] Generate concrete struct type for ndrange_t

2016-08-08 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D23086#507360, @yaxunl wrote: > In https://reviews.llvm.org/D23086#507203, @yaxunl wrote: > > > How about assuming ndrange_t is a struct type defined by user and identify > > it by struct type name in Clang? This gives user freedom of implem

RE: r277743 - [OpenCL] Added underscores to the names of 'to_addr' OpenCL built-ins.

2016-08-08 Thread Anastasia Stulova via cfe-commits
Thanks! -Original Message- From: hwennb...@google.com [mailto:hwennb...@google.com] On Behalf Of Hans Wennborg Sent: 08 August 2016 17:40 To: Anastasia Stulova Cc: Alexey Bader; cfe-commits@lists.llvm.org; nd Subject: Re: r277743 - [OpenCL] Added underscores to the names of 'to_addr' Ope

Re: [PATCH] D23346: [OpenCL] Change block descriptor address space to constant

2016-08-10 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Repository: rL LLVM https://reviews.llvm.org/D23346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

RE: r278234 - [OpenCL] Change block descriptor address space to constant.

2016-08-10 Thread Anastasia Stulova via cfe-commits
Hi Hans, Is it still possible to merge this change in release 3.9 branch. This is just a minor bug fix we have found with Clang Blocks and only affects OpenCL. PS, it goes together with a typo fix in the next commit r278235. Thanks in advance, Anastasia -Original Message- From: cfe-com

Re: [PATCH] D23361: [OpenCL] AMDGCN: Fix size_t type

2016-08-11 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. I think Clang is supposed to generate the IR specific to the target architecture. It seems strange to ignore the pointer size. I am not sure if it might lead to some issues for the backends. Comment at: lib/CodeGen/CodeGenModule.cpp:107 @@ -106,2 +10

Re: [PATCH] D23322: [OpenCL] AMDGPU: Add extensions cl_amd_media_ops and cl_amd_media_ops2

2016-08-11 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Is this related to our discussion on cfe-dev about the extensions and also the earlier review you have created: https://reviews.llvm.org/D21698? https://reviews.llvm.org/D23322 ___ cfe-commits mailing list cfe-commits@lis

Re: [PATCH] D23322: [OpenCL] AMDGPU: Add extensions cl_amd_media_ops and cl_amd_media_ops2

2016-08-11 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Ok, sure. Is the plan to refactor this bit in case we implement the generic support later then? It seems fine, although I can't check much without any documentation. Is there any reference available online? https://reviews.llvm.org/D23322

Re: [PATCH] D23322: [OpenCL] AMDGPU: Add extensions cl_amd_media_ops and cl_amd_media_ops2

2016-08-12 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Do you think testing the declaration to be available without/with an error after the extension is enabled/disabled might be useful too? https://reviews.llvm.org/D23322 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D23452: [OpenCL] Release 3.9 notes

2016-08-12 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: hans. Anastasia added subscribers: yaxunl, bader, cfe-commits. Release notes for OpenCL in Clang https://reviews.llvm.org/D23452 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst =

Re: [PATCH] D23452: [OpenCL] Release 3.9 notes

2016-08-12 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Thanks! Is there a way to check the doc before committing? I am not sure how to make the html generated out of this. https://reviews.llvm.org/D23452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

Re: [PATCH] D23322: [OpenCL] AMDGPU: Add extensions cl_amd_media_ops and cl_amd_media_ops2

2016-08-12 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D23322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

Re: [PATCH] D23452: [OpenCL] Release 3.9 notes

2016-08-15 Thread Anastasia Stulova via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Thanks! Committed in r278677. https://reviews.llvm.org/D23452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23086: [OpenCL] Generate concrete struct type for ndrange_t

2016-08-15 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D23086#514279, @yaxunl wrote: > How about we decide if a type is ndrange_t type based on their canonical > types. If the canonical type of type X is the same as the canonical type of > ndrange_t type, then type X is treated as ndrange_t typ

Re: [PATCH] D23086: [OpenCL] Generate concrete struct type for ndrange_t

2016-08-15 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D23086#515468, @yaxunl wrote: > In https://reviews.llvm.org/D23086#515443, @Anastasia wrote: > > > In https://reviews.llvm.org/D23086#514279, @yaxunl wrote: > > > > > How about we decide if a type is ndrange_t type based on their canonical >

Re: [PATCH] D16692: [OpenCL] Eliminate warning when declaring OpenCL builtin functions

2016-02-01 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! http://reviews.llvm.org/D16692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

Re: [PATCH] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-01 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Parse/Parser.h:2200 @@ -2199,1 +2199,3 @@ void ParseOpenCLQualifiers(ParsedAttributes &Attrs); + /// \brief Parses opencl_unroll_hint attribute if language is OpenCL 2.0+. + /// \return false if error happens. ---

Re: [PATCH] D16351: [FIX] Bug 25404 - Crash on typedef in OpenCL 2.0

2016-02-01 Thread Anastasia Stulova via cfe-commits
Anastasia added a subscriber: Anastasia. Comment at: lib/Sema/SemaDecl.cpp:2038 @@ +2037,3 @@ + // returns 0. The're many implicit typedefs in OpenCL, e.g. atomic_flag. + if (Old->isImplicit() || New->isImplicit()) { +return; Braces are not needed.

r259491 - [OpenCL] Eliminate warning when declaring OpenCL builtin functions.

2016-02-02 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Tue Feb 2 05:29:43 2016 New Revision: 259491 URL: http://llvm.org/viewvc/llvm-project?rev=259491&view=rev Log: [OpenCL] Eliminate warning when declaring OpenCL builtin functions. OpenCL builtin functions are usually declared in header files. Currently clang emits warning fo

Re: [PATCH] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-02 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaStmtAttr.cpp:225 @@ +224,3 @@ +Expr *E = A.getArgAsExpr(0); +assert(E != nullptr && "Invalid opencl_unroll_hint argument"); +llvm::APSInt ArgVal(32); pxli168 wrote: > Is this necessary as you ha

r259651 - [OpenCL] Adding reserved operator logical xor for OpenCL

2016-02-03 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Wed Feb 3 09:17:14 2016 New Revision: 259651 URL: http://llvm.org/viewvc/llvm-project?rev=259651&view=rev Log: [OpenCL] Adding reserved operator logical xor for OpenCL This patch adds the reserved operator ^^ when compiling for OpenCL (spec v1.1 s6.3.g), which results in a

Re: [PATCH] D16351: [FIX] Bug 25404 - Crash on typedef in OpenCL 2.0

2016-02-03 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:2039 @@ +2038,3 @@ + if (Old->isImplicit() || New->isImplicit()) { +// Since we don't emit system header warnings for compatibility with GCC, +// don't do this for implicit type redifinition warnings the s

Re: [PATCH] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-03 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaStmtAttr.cpp:230 @@ +229,3 @@ + << A.getName() << AANT_ArgumentIntegerConstant << E->getSourceRange(); + return 0; +} 0 -> nullptr http://reviews.llvm.org/D16686

r259678 - Added Anastasia Stulova as a code owner for OpenCL

2016-02-03 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Wed Feb 3 12:51:19 2016 New Revision: 259678 URL: http://llvm.org/viewvc/llvm-project?rev=259678&view=rev Log: Added Anastasia Stulova as a code owner for OpenCL Reviewers: Chris Lattner Subscribers: cfe-dev Modified: cfe/trunk/CODE_OWNERS.TXT Modified: cfe/trunk/CO

RE: r258782 - Recommit: R258773 [OpenCL] Pipe builtin functions

2016-02-03 Thread Anastasia Stulova via cfe-commits
I think the main reason is that we have committed pipe type before the release branch was taken. It appears to have no use without the pipe builtin functions. Are there any risks of adding this now? Btw, @Richard, I have just updated CODE_OWNERS.TXT putting myself as a code owner of OpenCL (app

RE: r258782 - Recommit: R258773 [OpenCL] Pipe builtin functions

2016-02-04 Thread Anastasia Stulova via cfe-commits
Thanks for clarifications and feedback. I think there is enough time to improve the patch before the release date. But I believe Hans has more experience to evaluate potential issues here. I think I am fine to complete this work for the next release instead. I hope Xiuli and others agree too.

<    1   2   3   4   5   6   7   >