[PATCH] D27099: [OpenCL] Prohibit using reserve_id_t in program scope.

2016-11-24 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Btw, Spec v2.0 s6.9.p seems to mention other types as well! Comment at: lib/Sema/SemaDecl.cpp:5923 + if (getLangOpts().OpenCL && (NULL == S->getParent())) { +if (R->isReserveIDT()) { - Could we combine with the OpenCL check

[PATCH] D27109: [OpenCL] Prevent generation of globals in non-constant address space for OpenCL

2016-11-24 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: yaxunl. Anastasia added a subscriber: cfe-commits. Clang performs some optimizations/shortcuts for const qualified aggregate variables while generating them on the stack. It bypasses the generation of alloca instructions and their

[PATCH] D26794: [OpenCL] Blocks are allowed to capture arrays in OpenCL 2.0 and higher.

2016-11-17 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. I have created a bug to Khronos regarding this, but unfortunately I don't see it being progressed yet. https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15659 The problem here is that I am not sure we should deviate from the ObjC implementation because OpenCL blocks

[PATCH] D26746: [OpenCL] Split PipeType into ReadPipe/WritePipe

2016-11-16 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Earlier related discussion: https://reviews.llvm.org/D17821 Repository: rL LLVM https://reviews.llvm.org/D26746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D26735: [OpenCL] Disable && (address of label) GNU extension for OpenCL

2016-11-16 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. It seems that this bit is accepted under -std=c99 and the warning is given with the -pedantic flag. I am not sure whether it adds much deviating the implementation from C here. The OpenCL spec doesn't seem to contain anything on this matter? But if we decide to be

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=rev Log: Fix OpenCL test for buildbot by removing extra (erroneous) RUN line Modified: cfe/trunk/test/SemaOpenCL/cl20-device-side-enqueue.cl Modified:

[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

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=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

[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

[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

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=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 internal

[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

[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

[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

[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

[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-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

[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] 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

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

[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

[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). >

[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

[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

[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

[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] 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

[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()

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=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_kernel

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

[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

[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

[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

[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

[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

[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? > > >

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-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? > > >

[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?

[PATCH] D25335: [OpenCL] Allow partial initializer for array and struct

2016-10-08 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Comment at: test/CodeGenOpenCL/partial_initializer.cl:5 + +// CHECK: @GA = addrspace(1) global [6 x [6 x float]] {{[[][[]}}6 x float] [float 1.00e+00, float

[PATCH] D24715: [OpenCL] Block captured variables in dynamic parallelism - OpenCL 2.0

2016-10-08 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. However, it seems like we didn't provide quite complete implementation with respect to the captures yet as it's not possible at the moment for __enqueue_kernel_XXX to know the size of the captures or even the block literal struct itself to be able to copy the block

[PATCH] D24715: [OpenCL] Block captured variables in dynamic parallelism - OpenCL 2.0

2016-10-04 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. > Regarding the improvement proposed by us which "flatten" captured variables > into invoke_function argument list and block_literal pointer wouldn't be > passed as first argument(to invoke_function) anymore. The reason why it > doesn't require global memory

[PATCH] D25123: [OpenCL] Fix bug in __builtin_astype causing invalid LLVM cast instructions

2016-10-02 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! https://reviews.llvm.org/D25123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] [Commented On] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-30 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Sam, I ran a few more tests and understood that the overhead mainly comes from extra initialization (in Sema::Initialize()). Therefore, it's more noticeable on a very small kernels. However, I agree we can probably neglect the overhead as it account for only a

Re: [PATCH] D23712: [OpenCL] Override supported OpenCL extensions with -cl-ext option

2016-09-27 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/OpenCLOptions.h:39 @@ +38,3 @@ + + void set(llvm::StringRef Ext, bool Enable = true) { +assert(!Ext.empty() && "Extension is empty."); yaxunl wrote: > Better add a comments for this function

Re: [PATCH] D24813: Driver: Add a test for triple with opencl environment

2016-09-26 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/D24813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-21 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D21698#546733, @yaxunl wrote: > In https://reviews.llvm.org/D21698#540237, @Anastasia wrote: > > > I have made an experiment with a simple kernel: > > > > void foo1(void); > > void foo2(void); > > void foo3(void); > > void

Re: [PATCH] D24666: [OpenCL] Allow half type kernel argument when cl_khr_fp16 is enabled

2016-09-17 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:7600 @@ +7599,3 @@ +// Do not diagnose half type since it is diagnosed as invalid argument +// type for any function eleswhere. +if (!PT->isHalfType()) -> elsewhere

Re: [PATCH] D24626: [OpenCL] Diagnose assignment to dereference of half type pointer

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

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-12 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. I have made an experiment with a simple kernel: void foo1(void); void foo2(void); void foo3(void); void foo4(void); void foo5(void); void foo6(void); void foo7(void); void foo8(void); void foo9(void); void foo10(void); void test(){ foo1();

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-09 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! https://reviews.llvm.org/D24235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-08 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D21698#537156, @yaxunl wrote: > I did profiling with valgrind for the cost of checking disabled types and > declarations. For a typical program, time spent in checking disabled types > and declarations are less than 0.1%, so this cost can

Re: [PATCH] D24054: Do not validate pch when -fno-validate-pch is set

2016-09-07 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/D24054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-07 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:832 @@ -831,2 +831,3 @@ BTy->getKind() == BuiltinType::Float)) -E = ImpCastExprToType(E, Context.DoubleTy, CK_FloatingCast).get(); + { +if (getLangOpts().OpenCL && This

Re: [PATCH] D23953: OpenCL: Defining __ENDIAN_LITTLE__ and fix target endianness

2016-09-06 Thread Anastasia Stulova via cfe-commits
Anastasia added a subscriber: Anastasia. Anastasia accepted this revision. Anastasia added a reviewer: Anastasia. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D23953 ___ cfe-commits

Re: [PATCH] D23712: [OpenCL] Override supported OpenCL extensions with -cl-ext option

2016-09-06 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D23712#524021, @asavonic wrote: > In https://reviews.llvm.org/D23712#520818, @Anastasia wrote: > > > What would be the use case to override the supported extensions for the end > > user? > > > Some extensions may be supported by the

Re: [PATCH] D23992: [OpenCL] Augment pipe built-ins with pipe packet size and alignment.

2016-09-06 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! https://reviews.llvm.org/D23992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D24136: [OpenCL] Fix pipe built-in functions return type.

2016-09-06 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! https://reviews.llvm.org/D24136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-05 Thread Anastasia Stulova via cfe-commits
Anastasia requested changes to this revision. Anastasia added a comment. This revision now requires changes to proceed. Have you done any investigation regarding the compilation speed as this change adds expensive container lookups for all OpenCL declarations and function calls. It would be

Re: [PATCH] D23915: [OpenCL] Remove access qualifiers on images in arg info metadata.

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

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-05 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Could we add a CodeGen test as well to check that the constants generated are in the right precision format? https://reviews.llvm.org/D24235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D23992: [OpenCL] Augment pipe built-ins with pipe packet size and alignment.

2016-09-05 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGOpenCLRuntime.cpp:97 @@ +96,3 @@ + return llvm::ConstantInt::get(Int32Ty, +TypeSizeInBits / 8, // Size in bytes. +false); Perhaps it's

Re: [PATCH] D23712: [OpenCL] Override supported OpenCL extensions with -cl-ext option

2016-08-19 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. What would be the use case to override the supported extensions for the end user? The change to set the right extensions based on the target compiled for was to avoid mis-compilations. But adding a user flag to control that could lead to the old problem to reoccur.

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

2016-08-19 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Just to summarize, it seems there are the following options to proceed, each has some benefits and disadvantages: 1. We can check the canonical type. This gives us possibility to accept the type name aliases, but reduces flexibility to implement this type in a custom

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

2016-08-19 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. @hans, I have committed one minor addition to OpenCL notes (r279224), which is important enough to include Index: docs/ReleaseNotes.rst === --- docs/ReleaseNotes.rst (revision 279176) +++

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

2016-08-18 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/D23361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2016-08-18 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1513 @@ -1512,2 +1512,3 @@ // extension. -llvm::Type *MiddleTy = CGF.IntPtrTy; +auto DestLLVMTy = ConvertType(DestTy); +llvm::Type *MiddleTy =

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

2016-08-16 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D23086#516741, @yaxunl wrote: > In https://reviews.llvm.org/D23086#516365, @Anastasia wrote: > > > Why not to just identify the type by the name? It seems much easier and > > also gives flexibility to implement the type in different ways if

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

2016-08-16 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D23086#515590, @yaxunl wrote: > In https://reviews.llvm.org/D23086#515506, @Anastasia wrote: > > > > > > > > > Surely vendors can re-implement all OpenCL types with an implicit typedef. > > For example this would just work: > > > > > >

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] 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

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] 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

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

[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] 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

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-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

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

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:

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

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'

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

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]>, +

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

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

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] 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: [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] 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

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

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

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] 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] 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

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( +

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

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: > > >

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: > > >

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

<    1   2   3   4   5   6   >