[PATCH] D35000: [OpenCL] Added extended tests on metadata generation for half data type and arrays.

2017-07-17 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 106851. https://reviews.llvm.org/D35000 Files: test/CodeGenOpenCL/kernel-arg-info.cl Index: test/CodeGenOpenCL/kernel-arg-info.cl === --- test/CodeGenOpenCL/kernel-arg-info.cl +++

[PATCH] D35000: [OpenCL] Added extended tests on metadata generation for half data type and arrays.

2017-07-13 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added a comment. In https://reviews.llvm.org/D35000#801132, @Anastasia wrote: > In https://reviews.llvm.org/D35000#799705, @Anastasia wrote: > > > Btw, is there any reason to add testing specifically for half? Is there > > anything specific to half in the implementation of this? > > >

[PATCH] D35000: [OpenCL] Added extended tests on metadata generation for half data type and arrays.

2017-07-06 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 105375. echuraev marked an inline comment as done. https://reviews.llvm.org/D35000 Files: test/CodeGenOpenCL/kernel-arg-info.cl Index: test/CodeGenOpenCL/kernel-arg-info.cl === ---

[PATCH] D35000: [OpenCL] Added extended tests on metadata generation for half data type and arrays.

2017-07-05 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. https://reviews.llvm.org/D35000 Files: test/CodeGenOpenCL/kernel-arg-info.cl Index: test/CodeGenOpenCL/kernel-arg-info.cl === ---

[PATCH] D34980: [OpenCL] Test on image access modifiers and image type can only be a type of a function argument.

2017-07-05 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 105218. echuraev marked 6 inline comments as done. https://reviews.llvm.org/D34980 Files: test/SemaOpenCL/images.cl Index: test/SemaOpenCL/images.cl === --- test/SemaOpenCL/images.cl +++

[PATCH] D34980: [OpenCL] Test on image access modifiers and image type can only be a type of a function argument.

2017-07-05 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. https://reviews.llvm.org/D34980 Files: test/SemaOpenCL/images.cl Index: test/SemaOpenCL/images.cl === --- test/SemaOpenCL/images.cl +++ test/SemaOpenCL/images.cl

[PATCH] D33648: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

2017-05-29 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. This is the fix for patch https://reviews.llvm.org/D33353 @uweigand, could you please verify that everything will be good on SystemZ? I added triple spir-unknown-unknown. Thank you in advance! https://reviews.llvm.org/D33648

[PATCH] D33353: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

2017-05-29 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added a comment. Hi all, I tried to reproduce this problem but I'm not able to do it... I tried to do it in two different ways: 1. I tried to build llvm by the following steps: 1.1. Checkout llvm and clang: svn co https://echur...@llvm.org/svn/llvm-project/llvm/trunk llvm svn co

[PATCH] D33592: [OpenCL] Test on half immediate support.

2017-05-26 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. https://reviews.llvm.org/D33592 Files: test/CodeGenOpenCL/half.cl Index: test/CodeGenOpenCL/half.cl === --- test/CodeGenOpenCL/half.cl +++

[PATCH] D33353: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

2017-05-25 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 100219. echuraev marked 2 inline comments as done. https://reviews.llvm.org/D33353 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/SemaOpenCL/arithmetic-conversions.cl test/SemaOpenCL/cond.cl Index:

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-05-25 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 100210. https://reviews.llvm.org/D31745 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaOpenCL/clang-builtin-version.cl test/SemaOpenCL/to_addr_builtin.cl Index: test/SemaOpenCL/to_addr_builtin.cl

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-05-22 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added inline comments. Comment at: lib/Sema/SemaDecl.cpp:12449 // function declaration is going to be treated as an error. - if (Diags.getDiagnosticLevel(diag_id, Loc) >= DiagnosticsEngine::Error) { + if (!getLangOpts().OpenCL && +

[PATCH] D33353: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

2017-05-19 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. https://reviews.llvm.org/D33353 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/SemaOpenCL/arithmetic-conversions.cl test/SemaOpenCL/cond.cl Index: test/SemaOpenCL/cond.cl

[PATCH] D32896: [OpenCL] Make CLK_NULL_RESERVE_ID invalid reserve id.

2017-05-15 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added inline comments. Comment at: lib/Headers/opencl-c.h:16020 +// The macro CLK_NULL_RESERVE_ID refers to an invalid reservation ID. +#define CLK_NULL_RESERVE_ID (__builtin_astype((void *)0, reserve_id_t)) bool __ovld is_valid_reserve_id(reserve_id_t reserve_id);

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-05-15 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 98958. echuraev added a comment. I disabled adding note diagnostic for OpenCL. Addition function to dictionary occurs in function CurrectTypo. In this function take place creation of consumer by calling function makeTypoCorrectionConsumer. The function do

[PATCH] D27334: [OpenCL] Ambiguous function call.

2017-05-11 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added a comment. So, I think that we have to do some decision about this patch. @Anastasia, What do you think about it? Please see my commentary above. What should we do with this patch? https://reviews.llvm.org/D27334 ___ cfe-commits

[PATCH] D32898: [OpenCL] Handle OpenCL specific subelement types

2017-05-10 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 98416. https://reviews.llvm.org/D32898 Files: lib/Sema/SemaInit.cpp test/SemaOpenCL/array-init.cl Index: test/SemaOpenCL/array-init.cl === --- /dev/null +++ test/SemaOpenCL/array-init.cl

[PATCH] D32898: [OpenCL] Handle OpenCL specific subelement types

2017-05-05 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. https://reviews.llvm.org/D32898 Files: lib/Sema/SemaInit.cpp test/SemaOpenCL/array-init.cl Index: test/SemaOpenCL/array-init.cl === --- /dev/null +++

[PATCH] D32897: [OpenCL] Added checking OpenCL version for cl_khr_mipmap_image built-ins

2017-05-05 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. https://reviews.llvm.org/D32897 Files: lib/Headers/opencl-c.h Index: lib/Headers/opencl-c.h === --- lib/Headers/opencl-c.h +++ lib/Headers/opencl-c.h @@ -14962,6

[PATCH] D32896: [OpenCL] Make CLK_NULL_RESERVE_ID invalid reserve id.

2017-05-05 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. Make CLK_NULL_RESERVE_ID invalid reserve id. Rename PIPE_RESERVE_ID_VALID_BIT to avoid user name space pollution. Current implementation reserve_id_t type assumes that it's a pointer type whose most significant bit is set to one

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-04-14 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added inline comments. Comment at: test/SemaOpenCL/clang-builtin-version.cl:32 + work_group_reserve_write_pipe(tmp, tmp); // expected-error{{implicit declaration of function 'work_group_reserve_write_pipe' is invalid in OpenCL}} + // expected-note@-1{{did you mean

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-04-10 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8254 "%0 cannot be used as the type of a kernel parameter">; +def err_opencl_implicit_function_decl : Error< + "implicit declaration of function %0 is invalid in OpenCL">;

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-04-10 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 94537. https://reviews.llvm.org/D31745 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaOpenCL/clang-builtin-version.cl test/SemaOpenCL/to_addr_builtin.cl Index: test/SemaOpenCL/to_addr_builtin.cl

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

2017-04-07 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 94503. echuraev marked an inline comment as done. https://reviews.llvm.org/D26794 Files: lib/Sema/SemaExpr.cpp test/SemaOpenCL/blocks_with_array.cl Index: test/SemaOpenCL/blocks_with_array.cl

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

2017-04-07 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added a comment. Yes, I have an access to the new revision and I have read it. https://reviews.llvm.org/D26794 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-04-06 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. https://reviews.llvm.org/D31745 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaOpenCL/clang-builtin-version.cl test/SemaOpenCL/to_addr_builtin.cl Index:

[PATCH] D27334: [OpenCL] Ambiguous function call.

2017-04-06 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added a comment. In https://reviews.llvm.org/D27334#700521, @Anastasia wrote: > I don't actually. But remembering the follow up discussion: > http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20161205/178846.html > and since we have to deviate from the standard C/C++

[PATCH] D31594: [OpenCL] Enables passing sampler initializer to function argument

2017-04-04 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 94032. echuraev marked an inline comment as done. https://reviews.llvm.org/D31594 Files: lib/Sema/SemaInit.cpp test/CodeGenOpenCL/sampler.cl test/SemaOpenCL/sampler_t.cl Index: test/SemaOpenCL/sampler_t.cl

[PATCH] D31594: [OpenCL] Enables passing sampler initializer to function argument

2017-04-03 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. https://reviews.llvm.org/D31594 Files: lib/Sema/SemaInit.cpp test/SemaOpenCL/sampler_t.cl Index: test/SemaOpenCL/sampler_t.cl === ---

[PATCH] D30643: [OpenCL] Extended diagnostics for atomic initialization

2017-04-03 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 93837. echuraev marked an inline comment as done. https://reviews.llvm.org/D30643 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp lib/Sema/SemaInit.cpp test/Parser/opencl-atomics-cl20.cl test/SemaOpenCL/atomic-init.cl

[PATCH] D30643: [OpenCL] Extended diagnostics for atomic initialization

2017-03-31 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 93602. echuraev marked an inline comment as done. https://reviews.llvm.org/D30643 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp lib/Sema/SemaInit.cpp test/Parser/opencl-atomics-cl20.cl test/SemaOpenCL/atomic-init.cl

[PATCH] D31321: [OpenCL] Do not generate "kernel_arg_type_qual" metadata for non-pointer args

2017-03-31 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 93596. https://reviews.llvm.org/D31321 Files: lib/CodeGen/CodeGenFunction.cpp test/CodeGenOpenCL/kernel-arg-info.cl Index: test/CodeGenOpenCL/kernel-arg-info.cl === ---

[PATCH] D30643: [OpenCL] Extended diagnostics for atomic initialization

2017-03-29 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 93368. echuraev marked 2 inline comments as done. https://reviews.llvm.org/D30643 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp lib/Sema/SemaInit.cpp test/Parser/opencl-atomics-cl20.cl test/SemaOpenCL/atomic-init.cl

[PATCH] D31321: [OpenCL] Do not generate "kernel_arg_type_qual" metadata for non-pointer args

2017-03-29 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 93357. echuraev marked an inline comment as done. https://reviews.llvm.org/D31321 Files: lib/CodeGen/CodeGenFunction.cpp test/CodeGenOpenCL/kernel-arg-info.cl Index: test/CodeGenOpenCL/kernel-arg-info.cl

[PATCH] D31321: [OpenCL] Do not generate "kernel_arg_type_qual" metadata for non-pointer args

2017-03-29 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added inline comments. Comment at: test/CodeGenOpenCL/kernel-arg-info.cl:66 // CHECK: ![[MD13]] = !{!"int*", !"int", !"int", !"float*"} -// CHECK: ![[MD14]] = !{!"restrict", !"const", !"volatile", !"restrict const"} // ARGINFO: ![[MD15]] = !{!"X", !"Y", !"anotherArg",

[PATCH] D31183: [OpenCL] Added parsing for OpenCL vector types.

2017-03-27 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 93132. echuraev marked an inline comment as done. https://reviews.llvm.org/D31183 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp test/Parser/vector-cast-define.cl Index: test/Parser/vector-cast-define.cl

[PATCH] D30643: [OpenCL] Extended diagnostics for atomic initialization

2017-03-27 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 93113. echuraev marked 2 inline comments as done. echuraev removed a reviewer: bader. echuraev added a subscriber: bader. https://reviews.llvm.org/D30643 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp lib/Sema/SemaInit.cpp

[PATCH] D31183: [OpenCL] Added parsing for OpenCL vector types.

2017-03-27 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added a comment. In https://reviews.llvm.org/D31183#710202, @Anastasia wrote: > In https://reviews.llvm.org/D31183#709566, @echuraev wrote: > > > In https://reviews.llvm.org/D31183#708833, @yaxunl wrote: > > > > > I think this is a good feature for the convenience of user. I've seen >

[PATCH] D31324: [OpenCL] Extended mapping of parcing CodeGen arguments

2017-03-24 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. Enable cl_mad_enamle and cl_no_signed_zeros options when user turns on cl_unsafe_math_optimizations or cl_fast_relaxed_math options. https://reviews.llvm.org/D31324 Files: lib/Frontend/CompilerInvocation.cpp

[PATCH] D31321: [OpenCL] Do not generate "kernel_arg_type_qual" metadata for non-pointer args

2017-03-24 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. "kernel_arg_type_qual" metadata should contain const/volatile/restrict tags only for pointer types to match the corresponding requirement of the OpenCL specification. OpenCL 2.0 spec 5.9.3 Kernel Object Queries:

[PATCH] D31183: [OpenCL] Added parsing for OpenCL vector types.

2017-03-23 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added a comment. In https://reviews.llvm.org/D31183#708833, @yaxunl wrote: > I think this is a good feature for the convenience of user. I've seen usage > like this. I agree. I don't see any reasons why this case doesn't have the right to exist. I don't think that using extra

[PATCH] D31183: [OpenCL] Added parsing for OpenCL vector types.

2017-03-21 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. https://reviews.llvm.org/D31183 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp test/Parser/vector-cast-define.cl Index: test/Parser/vector-cast-define.cl

[PATCH] D30937: [OpenCL] Added diagnostic for checking length of vector

2017-03-15 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 91890. echuraev marked 5 inline comments as done. Herald added a subscriber: yaxunl. https://reviews.llvm.org/D30937 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExprMember.cpp test/SemaOpenCL/vector_swizzle_length.cl Index:

[PATCH] D30816: [OpenCL] Added implicit conversion rank for overloading functions with vector data type in OpenCL

2017-03-14 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 91713. echuraev marked 2 inline comments as done. https://reviews.llvm.org/D30816 Files: include/clang/Sema/Overload.h lib/Sema/SemaOverload.cpp test/CodeGenOpenCL/overload.cl test/SemaOpenCL/overload_addrspace_resolution.cl Index:

[PATCH] D30937: Added diagnostic for checking length of vector

2017-03-14 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. https://reviews.llvm.org/D30937 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExprMember.cpp test/SemaOpenCL/vector_swizzle_length.cl Index: test/SemaOpenCL/vector_swizzle_length.cl

[PATCH] D30816: [OpenCL] Added implicit conversion rank for overloading functions with vector data type in OpenCL

2017-03-14 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 91691. echuraev marked an inline comment as done. https://reviews.llvm.org/D30816 Files: include/clang/Sema/Overload.h lib/Sema/SemaOverload.cpp test/SemaOpenCL/overload_addrspace_resolution.cl Index: test/SemaOpenCL/overload_addrspace_resolution.cl

[PATCH] D30643: [OpenCL] Extended diagnostics for atomic initialization

2017-03-13 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 91536. https://reviews.llvm.org/D30643 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp lib/Sema/SemaInit.cpp test/Parser/opencl-atomics-cl20.cl test/SemaOpenCL/atomic-init.cl Index: test/SemaOpenCL/atomic-init.cl

[PATCH] D28136: [OpenCL] Implement as_type operator as alias of __builtin_astype.

2017-03-10 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added a comment. In https://reviews.llvm.org/D28136#634356, @Anastasia wrote: > This has been discussed during the initial review for the header: > http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160425/157187.html > > The main issue is after preprocessing the header the

[PATCH] D28136: [OpenCL] Implement as_type operator as alias of __builtin_astype.

2017-03-10 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 91327. https://reviews.llvm.org/D28136 Files: lib/Headers/opencl-c.h test/SemaOpenCL/as_type.cl Index: test/SemaOpenCL/as_type.cl === --- test/SemaOpenCL/as_type.cl +++

[PATCH] D30816: [OpenCL] Added implicit conversion rank for overloading functions with vector data type in OpenCL

2017-03-10 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. I added a new rank to ImplicitConversionRank enum to resolve the function overload ambiguity with vector types. Rank of scalar types conversion is lower than vector splat. So, we can choose which function should we call. See

[PATCH] D30643: [OpenCL] Extended diagnostics for atomic initialization

2017-03-10 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8263 +def err_atomic_init_addressspace : Error< + "initialization of atomic variables is restricted to variables in global address space">; def err_atomic_init_constant : Error<

[PATCH] D30643: [OpenCL] Extended diagnostics for atomic initialization

2017-03-10 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 91305. echuraev marked 2 inline comments as done. https://reviews.llvm.org/D30643 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaInit.cpp test/SemaOpenCL/atomic-init.cl Index: test/SemaOpenCL/atomic-init.cl

[PATCH] D27334: [OpenCL] Ambiguous function call.

2017-03-09 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added a comment. In https://reviews.llvm.org/D27334#614826, @Anastasia wrote: > In https://reviews.llvm.org/D27334#614389, @bader wrote: > > > In https://reviews.llvm.org/D27334#613504, @Anastasia wrote: > > > > > In https://reviews.llvm.org/D27334#612858, @bader wrote: > > > > > > > In

[PATCH] D30643: [OpenCL] Extended diagnostics for atomic initialization

2017-03-06 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. I saw the same changes in the following review: https://reviews.llvm.org/D17438 I don't know in that way I could determine that atomic variable was initialized by macro ATOMIC_VAR_INIT. Anyway I added check that atomic variables

[PATCH] D27917: [OpenCL] Improve diagnostics for double type

2017-01-26 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added a comment. This diagnostic was added in this commit: https://reviews.llvm.org/rL289979 It is something like that: "use of undeclared identifier 'double2'; did you mean 'double'?" This message isn't clear enough and it is difficult to understand that I forgot to enable cl_khr_fp64

[PATCH] D28136: [OpenCL] Implement as_type operator as alias of __builtin_astype.

2016-12-28 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. echuraev added a reviewer: Anastasia. echuraev added subscribers: bader, yaxunl, cfe-commits. https://reviews.llvm.org/D28136 Files: lib/Headers/opencl-c.h Index: lib/Headers/opencl-c.h === ---

[PATCH] D28048: [OpenCL] Align fake address space map with the SPIR target maps.

2016-12-22 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. echuraev added a reviewer: Anastasia. echuraev added subscribers: cfe-commits, bader, yaxunl. We compile user opencl kernel code with spir triple. But built-ins are written in OpenCL and we compile it with triple x86_64 to be able to use x86 intrinsics. And we

[PATCH] D27917: [OpenCL] Improve diagnostics for double type

2016-12-20 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 82094. echuraev marked an inline comment as done. https://reviews.llvm.org/D27917 Files: include/clang/AST/Type.h lib/AST/Type.cpp lib/Sema/SemaType.cpp test/SemaOpenCL/unknown_type.cl Index: test/SemaOpenCL/unknown_type.cl

[PATCH] D27981: Fix problems in "[OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand."

2016-12-20 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. echuraev added reviewers: djasper, Anastasia. echuraev added subscribers: bader, cfe-commits, yaxunl. Fixed warnings in commit: https://reviews.llvm.org/rL290171 https://reviews.llvm.org/D27981 Files: include/clang/AST/OperationKinds.def

[PATCH] D27917: [OpenCL] Improve diagnostics for double type

2016-12-19 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. echuraev added a reviewer: Anastasia. echuraev added subscribers: bader, cfe-commits, yaxunl. https://reviews.llvm.org/D27917 Files: include/clang/AST/Type.h lib/AST/Type.cpp lib/Sema/SemaType.cpp test/SemaOpenCL/unknown_type.cl Index:

[PATCH] D27569: [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.

2016-12-18 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 81917. echuraev marked an inline comment as done. https://reviews.llvm.org/D27569 Files: include/clang/AST/OperationKinds.def include/clang/Sema/Initialization.h include/clang/Sema/Overload.h lib/AST/ExprConstant.cpp lib/CodeGen/CGExprAgg.cpp

[PATCH] D27569: [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.

2016-12-16 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 81742. echuraev marked 3 inline comments as done. https://reviews.llvm.org/D27569 Files: include/clang/AST/OperationKinds.def include/clang/Sema/Initialization.h include/clang/Sema/Overload.h lib/AST/ExprConstant.cpp lib/CodeGen/CGExprAgg.cpp

[PATCH] D27569: [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.

2016-12-14 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 81372. echuraev marked 4 inline comments as done. https://reviews.llvm.org/D27569 Files: include/clang/AST/OperationKinds.def include/clang/Sema/Initialization.h include/clang/Sema/Overload.h lib/AST/ExprConstant.cpp lib/CodeGen/CGExprAgg.cpp

[PATCH] D27453: [OpenCL] Enable unroll hint for OpenCL 1.x.

2016-12-13 Thread Egor Churaev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289535: [OpenCL] Enable unroll hint for OpenCL 1.x. (authored by echuraev). Changed prior to commit: https://reviews.llvm.org/D27453?vs=80547=81223#toc Repository: rL LLVM

[PATCH] D27671: [OpenCL] Improve address space diagnostics.

2016-12-12 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. echuraev added a reviewer: Anastasia. echuraev added subscribers: cfe-commits, yaxunl, bader. https://reviews.llvm.org/D27671 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaOpenCL/invalid-kernel.cl Index:

[PATCH] D27569: [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.

2016-12-08 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. echuraev added a reviewer: Anastasia. echuraev added subscribers: bader, yaxunl, cfe-commits. Enabling the compression of CLK_NULL_QUEUE to variable of type queue_t. https://reviews.llvm.org/D27569 Files: lib/Sema/SemaExpr.cpp

[PATCH] D27453: [OpenCL] Enable unroll hint for OpenCL 1.x.

2016-12-07 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 80547. echuraev marked an inline comment as done. https://reviews.llvm.org/D27453 Files: lib/Sema/SemaStmtAttr.cpp test/CodeGenOpenCL/unroll-hint.cl test/SemaOpenCL/unroll-hint.cl Index: test/SemaOpenCL/unroll-hint.cl

[PATCH] D27453: [OpenCL] Enable unroll hint for OpenCL 1.x.

2016-12-06 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. echuraev added a reviewer: Anastasia. echuraev added subscribers: bader, cfe-commits, yaxunl. Although the feature was introduced only in OpenCL C v2.0 spec., it's useful for OpenCL 1.x too and doesn't require HW support. https://reviews.llvm.org/D27453 Files:

[PATCH] D27403: [OpenCL] Added a LIT test for ensuring address space mangling is done the same both in OpenCL1.2 and OpenCL2.0.

2016-12-06 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 80401. echuraev marked an inline comment as done. https://reviews.llvm.org/D27403 Files: test/CodeGenOpenCL/address-spaces-mangling.cl Index: test/CodeGenOpenCL/address-spaces-mangling.cl

[PATCH] D27403: [OpenCL] Added a LIT test for ensuring address space mangling is done the same both in OpenCL1.2 and OpenCL2.0.

2016-12-05 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. echuraev added a reviewer: Anastasia. echuraev added subscribers: bader, cfe-commits, yaxunl. https://reviews.llvm.org/D27403 Files: test/CodeGenOpenCL/address-spaces-mangling.cl Index: test/CodeGenOpenCL/address-spaces-mangling.cl

[PATCH] D27300: [OpenCL] Fix SPIR version generation.

2016-12-04 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 80229. echuraev marked 2 inline comments as done. https://reviews.llvm.org/D27300 Files: lib/CodeGen/TargetInfo.cpp test/CodeGenOpenCL/spir_version.cl Index: test/CodeGenOpenCL/spir_version.cl

[PATCH] D27334: [OpenCL] Ambiguous function call.

2016-12-02 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. echuraev added a reviewer: Anastasia. echuraev added subscribers: bader, cfe-commits, yaxunl. Added warning about potential ambiguity error with built-in overloading. Patch by Alexey Bader https://reviews.llvm.org/D27334 Files:

[PATCH] D27300: [OpenCL] Fix SPIR version generation.

2016-12-02 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 80034. echuraev marked 3 inline comments as done. https://reviews.llvm.org/D27300 Files: lib/CodeGen/TargetInfo.cpp test/CodeGenOpenCL/spir_version.cl Index: test/CodeGenOpenCL/spir_version.cl

[PATCH] D27300: [OpenCL] Fix SPIR version generation.

2016-12-01 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added inline comments. Comment at: test/CodeGenOpenCL/spir_version.cl:21 -// CHECK-SPIR-CL12: [[SPIR]] = !{i32 2, i32 0} -// CHECK-SPIR-CL12: [[OCL]] = !{i32 1, i32 2} // CHECK-SPIR-CL20: !opencl.spir.version = !{[[SPIR:![0-9]+]]} yaxunl wrote: > why

[PATCH] D27300: [OpenCL] Fix SPIR version generation.

2016-12-01 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. echuraev added a reviewer: Anastasia. echuraev added subscribers: cfe-commits, yaxunl, bader. https://reviews.llvm.org/D27300 Files: lib/CodeGen/TargetInfo.cpp test/CodeGenOpenCL/spir_version.cl Index: test/CodeGenOpenCL/spir_version.cl

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

2016-11-28 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 79508. https://reviews.llvm.org/D27099 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaOpenCL/event_t.cl test/SemaOpenCL/invalid-clk-events-cl2.0.cl test/SemaOpenCL/invalid-pipes-cl2.0.cl Index:

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

2016-11-27 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 79372. echuraev marked 2 inline comments as done. https://reviews.llvm.org/D27099 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaOpenCL/event_t.cl test/SemaOpenCL/invalid-clk-events-cl2.0.cl

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

2016-11-25 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 79292. echuraev marked 3 inline comments as done. https://reviews.llvm.org/D27099 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaOpenCL/event_t.cl test/SemaOpenCL/invalid-clk-events-cl2.0.cl