[PATCH] D28080: [Docs][OpenCL] Added OpenCL feature description to user manual.

2017-01-18 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: docs/UsersManual.rst:2065 + + $ clang -cc1 -triple spir64-unknown-unknown -cl-ext=-cl_khr_fp64 test.cl + pekka.jaaskelainen wrote: > Anastasia wrote: > > pekka.jaaskelainen wrote: > > > Is this correct? I cannot make

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

2016-11-29 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288126: [OpenCL] Prohibit using reserve_id_t in program scope. (authored by bader). Changed prior to commit: https://reviews.llvm.org/D27099?vs=79508=79525#toc Repository: rL LLVM

[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-07 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. @echuraev, please, request commit access as described here: http://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access Repository: rL LLVM https://reviews.llvm.org/D27403 ___ cfe-commits mailing list

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

2016-12-07 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288890: [OpenCL] Fix SPIR version generation. (authored by bader). Changed prior to commit: https://reviews.llvm.org/D27300?vs=80229=80548#toc Repository: rL LLVM https://reviews.llvm.org/D27300

[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-07 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288891: [OpenCL] Added a LIT test for ensuring address space mangling is done the sameā€¦ (authored by bader). Changed prior to commit: https://reviews.llvm.org/D27403?vs=80401=80549#toc Repository:

[PATCH] D28080: [Docs][OpenCL] Added OpenCL feature description to user manual.

2017-01-11 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. LGTM. Thanks! https://reviews.llvm.org/D28080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28080: [Docs][OpenCL] Added OpenCL feature description to user manual.

2017-01-11 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Thanks for working on this! Looks good, except a few pedantic notes. Comment at: docs/UsersManual.rst:44 - :ref:`Objective C++ Language ` +- :ref:`OpenCL Language `: v1.0, v1.1, v1.2, v2.0. It should and to be perfectly clear we

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

2016-12-04 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In https://reviews.llvm.org/D27334#611703, @Anastasia wrote: > This change seems to modify normal C behavior again. Is there any strong > motivation for doing this and if yes could it be done generically with C? Motivation: // Non-portable OpenCL 1.2 code __kernel

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

2016-12-06 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In https://reviews.llvm.org/D27334#613504, @Anastasia wrote: > In https://reviews.llvm.org/D27334#612858, @bader wrote: > > > In https://reviews.llvm.org/D27334#611703, @Anastasia wrote: > > > > > This change seems to modify normal C behavior again. Is there any strong >

[PATCH] D31397: [Bug 25404] Fix crash on typedef in OpenCL 2.0

2017-03-28 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Anastasia, could you generate patch with full context, please? https://reviews.llvm.org/D31397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31397: [Bug 25404] Fix crash on typedef in OpenCL 2.0

2017-03-28 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/Sema/SemaDecl.cpp:2157 if (getDiagnostics().getSuppressSystemWarnings() && - (Context.getSourceManager().isInSystemHeader(Old->getLocation()) || + // Some standard types are defined implicitly in Clang (e.g. OpenCL). +

[PATCH] D31397: [Bug 25404] Fix crash on typedef in OpenCL 2.0

2017-03-28 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. I think my topics are not related to the bug 25404 and can be handled separately. Thanks! https://reviews.llvm.org/D31397 ___ cfe-commits mailing

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

2017-03-15 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. > From all the above arguments, I feel like the right approach would be to > implement it as Clang builtin which closely matches the operator semantic in > my opinion. We could of course reuse the implementation of __bultin_astype > to avoid unnecessary extra work and

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

2017-03-15 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/Headers/opencl-c.h:6588 -char __ovld __cnfn as_char(char); -char __ovld __cnfn as_char(uchar); - Anastasia wrote: > Why do we have some of the overloads omitted? Would this cause any extra > conversions? uchar ->

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

2017-03-13 Thread Alexey Bader via Phabricator via cfe-commits
bader 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] D30816: [OpenCL] Added implicit conversion rank for overloading functions with vector data type in OpenCL

2017-03-14 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/SemaOpenCL/overload_addrspace_resolution.cl:1 -// RUN: %clang_cc1 -cl-std=CL2.0 -emit-llvm -o - -triple x86_64-unknown-unknown %s | FileCheck %s +// RUN: %clang_cc1 -cl-std=CL2.0 -emit-llvm -o - -triple spir-unknown-unknown %s |

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

2017-03-14 Thread Alexey Bader via Phabricator via cfe-commits
bader 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-13 Thread Alexey Bader via Phabricator via cfe-commits
bader 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] D28136: [OpenCL] Implement as_type operator as alias of __builtin_astype.

2017-03-10 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. > Why do you think this is a bug? It seems to follow standard behavior in C to > promote char to int if required. Just like if you would have a C code: > > int as_int(int i); > void foo() { > char src = 1; > int dst = as_int(src); > } > > > This

[PATCH] D36044: [OpenCL] -cl-ext option can overwrite OpenCL features imported from a module

2017-07-31 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/SemaOpenCL/extensions-import.cl:14 + +#ifdef FP64 +// expected-no-diagnostics You can use `#ifdef cl_khr_fp64` to check if extension is supported. https://reviews.llvm.org/D36044

[PATCH] D36259: [OpenCL] Remove extra select functions from opencl-c.h

2017-08-03 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. Out of curiosity: how did you detect this? Can we use the same approach for writing tests? https://reviews.llvm.org/D36259 ___ cfe-commits mailing

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

2017-08-10 Thread Alexey Bader via Phabricator via cfe-commits
bader 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] D36676: Remove -finclude-default-header in OpenCL atomic tests

2017-08-14 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM! Thanks. https://reviews.llvm.org/D36676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-14 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In https://reviews.llvm.org/D36327#840616, @yaxunl wrote: > In https://reviews.llvm.org/D36327#839809, @rjmccall wrote: > > > Could you just implement this in SimplifyLibCalls? I assume there's some > > way to fill in TargetLibraryInfo appropriately for a platform. Is

[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-07-11 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM, thanks. https://reviews.llvm.org/D35082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33945: [OpenCL] Add support for missing sub_group functions.

2017-07-27 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. Thanks! Overall the patch looks good, but I would suggest splitting it into three commits (as they seems to be independent): 1. [OpenCL] Check that cl_khr_subgroups pragma is enabled if

[PATCH] D34871: [OpenCL] Add function name to extension diagnostic

2017-06-30 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. Just one minor comment. Thanks. Comment at: clang/Sema/Sema.h:8435 /// \return true if type is disabled. - bool checkOpenCLDisabledDecl(const Decl , const Expr ); +

[PATCH] D34948: [OpenCL] Generalise err_opencl_enqueue_kernel_expected_type to be used with other builtins

2017-07-03 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. Do you have another built-in in mind which can use this diagnostic message? If so, it would make sense to re-use it in the same patch. https://reviews.llvm.org/D34948

[PATCH] D33681: [OpenCL] Allow function declaration with empty argument list.

2017-06-29 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. @chapuni, thanks for taking care of this. I'll take a look. https://reviews.llvm.org/D33681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34948: [OpenCL] Generalise err_opencl_enqueue_kernel_expected_type to be used with other builtins

2017-07-05 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. >> Do you have another built-in in mind which can use this diagnostic message? >> If so, it would make sense to re-use it in the same patch. > > This is split off from https://reviews.llvm.org/D33945, which I will be > rebasing/re-uploading once this patch is committed.

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-27 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Note: `get_sampler_initializer` from my test case returns integer, not a sampler, but having function is not relevant to the problem. Here is a bit simplified test case without function calls that still reproduces the problem: kernel void foo(int sampler_init_value) {

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-08 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. @rsmith do you have an opinion on what would be the right place for the kind of proposed optimization? It looks like it can be implemented as target independent optimization, acting only for target with specified properties - in this case target must provide required

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-07 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Hi Sam, What do you think about implementing this optimization in target specific optimization pass? Since size/alignment is saved as function parameter in LLVM IR, the optimization can be done in target specific components w/o adding additional conditions to generic

[PATCH] D28691: Add OpenCL 2.0 atomic builtin functions as Clang builtin

2017-08-04 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added inline comments. Comment at: lib/AST/Expr.cpp:4000-4004 + if (auto AT = T->getAs()) { +return AT->getValueType(); + } else { +return T; + } No need in else branch after return: ``` if (...) { return

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

2017-05-17 Thread Alexey Bader via Phabricator via cfe-commits
bader 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] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-19 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/CodeGenOpenCL/sampler.cl:62 + + const sampler_t const_smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR; + // CHECK: [[CONST_SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)*

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-21 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 103421. bader added a comment. This revision is now accepted and ready to land. Added test case reproducing the issue described in the description. Removed test cases from test/SemaOpenCL/sampler_t.cl covered by test/CodeGenOpenCL/sampler.cl. While I was

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-21 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. I think I found the way to reproduce the issue. There are two pre-requisites: sampler must be declared in the constant address space and clang must be build in Debug mode. I'll fix the test and add the test cases from test/SemaOpenCL/sampler_t.cl as mentioned earlier.

[PATCH] D33681: [OpenCL] Allow function declaration with empty argument list.

2017-06-23 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Ping. Although this patch is already accepted, I'd like to confirm that I can commit the latest update with changes in test/SemaOpenCL/invalid-pipes-cl2.0.cl. Thanks. https://reviews.llvm.org/D33681 ___ cfe-commits mailing

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-20 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Wow... Nice catch. For some reason I can't reproduce the problem neither. I will drop source code change, but I'd like to modify the test anyway. https://reviews.llvm.org/rL277024 added test/CodeGenOpenCL/sampler.cl and modified test/SemaOpenCL/sampler_t.cl. I want to move

[PATCH] D34235: [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-19 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/CodeGenOpenCL/spir_version.cl:13 kernel void foo() {} +kernel void bar() {} Anastasia wrote: > Would the original code produce duplicate version metadata here or is it just > for overloaded functions? Would it

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

2017-05-26 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. This issue probably can be fixed by setting SPIR target architecture or just enabling cl_khr_fp64 extension. Unfortunately, I can't check it today. Could you revert Egor's commit, please? https://reviews.llvm.org/D33353 ___

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

2017-05-22 Thread Alexey Bader via Phabricator via cfe-commits
bader 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] D32896: [OpenCL] Make CLK_NULL_RESERVE_ID invalid reserve id.

2017-05-22 Thread Alexey Bader via Phabricator via cfe-commits
bader 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] D33821: [OpenCL] Harden function pointer diagnostics.

2017-06-02 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. Improve OpenCL type checking by rejecting function pointer types. https://reviews.llvm.org/D33821 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaType.cpp test/SemaOpenCL/func.cl Index: test/SemaOpenCL/func.cl

[PATCH] D33821: [OpenCL] Harden function pointer diagnostics.

2017-06-02 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304575: [OpenCL] Harden function pointer diagnostics. (authored by bader). Changed prior to commit: https://reviews.llvm.org/D33821?vs=101181=101242#toc Repository: rL LLVM

[PATCH] D33681: Allow function declaration with empty argument list.

2017-06-13 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 102319. bader added a comment. Update one more test missed in the first version of the patch. Actually it looks like a bug in Parser. Clang interprets following statement as variable declaration. extern pipe write_only int get_pipe(); So the type of the

[PATCH] D34235: [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-15 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. OpenCL and SPIR version metadata must be generated once per module instead of once per mangled global value. https://reviews.llvm.org/D34235 Files: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/TargetInfo.cpp

[PATCH] D34235: [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-16 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 102789. bader added a comment. Applied Akira's comment: re-used cached Int32Ty type. https://reviews.llvm.org/D34235 Files: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/TargetInfo.cpp test/CodeGenOpenCL/spir_version.cl

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-16 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: include/clang/Basic/TargetInfo.h:1041 +default: + return LangAS::Default; +} yaxunl wrote: > bader wrote: > > yaxunl wrote: > > > I think the default (including even_t, clk_event_t, queue_t, > > >

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-19 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. Constant samplers are handled as static variables and clang's code generation library, which leads to llvm::unreachable. We bypass emitting sampler variable as static since it's translated to a function call later. https://reviews.llvm.org/D34342 Files:

[PATCH] D33945: [OpenCL] Add support for missing sub_group functions.

2017-06-19 Thread Alexey Bader via Phabricator via cfe-commits
bader requested changes to this revision. bader added a comment. This revision now requires changes to proceed. Please, split this patch into two parts: 1. Improve diagnostics on extension enabling. 2. Add missing `sub_group_*` built-in functions. Comment at:

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-14 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: include/clang/Basic/TargetInfo.h:1041 +default: + return LangAS::Default; +} yaxunl wrote: > I think the default (including even_t, clk_event_t, queue_t, reserved_id_t) > should be global since these opaque

[PATCH] D37804: [OpenCL] Handle address space conversion while setting type alignment

2017-09-22 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/CodeGenOpenCL/vectorLoadStore.cl:7 +typedef float float4 __attribute((ext_vector_type(4))); +; Can we remove this line? Comment at: test/CodeGenOpenCL/vectorLoadStore.cl:15 + +// CHECK: define

[PATCH] D33681: [OpenCL] Allow function declaration with empty argument list.

2017-10-09 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 118210. bader edited the summary of this revision. bader added a comment. Fix parsing of function declarations with empty parameter list initializers. This change should fix the failure caught by the buildbot. Sorry for the long delay.

[PATCH] D33681: [OpenCL] Allow function declaration with empty argument list.

2017-10-10 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 118437. bader added a comment. Applied comments. https://reviews.llvm.org/D33681 Files: lib/Parse/ParseDecl.cpp lib/Sema/SemaType.cpp test/SemaOpenCL/func.cl test/SemaOpenCL/invalid-pipes-cl2.0.cl Index: test/SemaOpenCL/invalid-pipes-cl2.0.cl

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-12 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. @arichardson, great work! Thanks a lot! https://reviews.llvm.org/D38816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-08-30 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In https://reviews.llvm.org/D36410#856716, @yaxunl wrote: > The captured variable is still passed by value. The address taking is on the > duplicate of the captured variable, not on the original variable. In this case address of captured variables should point to the

[PATCH] D37804: [OpenCL] Handle address space conversion while setting type alignment

2017-09-25 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. LGTM. Thanks! https://reviews.llvm.org/D37804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38463: [OpenCL] Fix checking of vector type casting

2017-10-03 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D38463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36951: [OpenCL][5.0.0 Release] Release notes for OpenCL in Clang

2017-08-21 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM, except one nit. Comment at: docs/ReleaseNotes.rst:146 +- Extended Clang builtins with required ``cl_khr_subgroups`` support. +- Now interpreting empty argument

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-08-29 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In https://reviews.llvm.org/D36410#855282, @Anastasia wrote: > Ok, I will update it to be implicitly generic then. Just to be sure, @bader > do you agree on this too? > An alternative approached could be (in case we want to allow this code) to > **assume captures are

[PATCH] D39936: [OpenCL] Add extensions cl_intel_subgroups and cl_intel_subgroups_short

2017-11-23 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. LGTM. Thanks! https://reviews.llvm.org/D39936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39129: [OpenCL] Fix generation of constant address space sampler in function scope

2017-11-14 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In https://reviews.llvm.org/D39129#923235, @Anastasia wrote: > In https://reviews.llvm.org/D39129#902848, @bader wrote: > > > @Anastasia, during the discussion of similar fix > > (https://reviews.llvm.org/D34342). > > > > I found another bug in the CodeGen library. Do you

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-11-15 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318290: [OpenCL] Fix code generation of function-scope constant samplers. (authored by bader). Repository: rL LLVM https://reviews.llvm.org/D34342 Files: cfe/trunk/lib/CodeGen/CGDecl.cpp

[PATCH] D39129: [OpenCL] Fix generation of constant address space sampler in function scope

2017-10-21 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. @Anastasia, during the discussion of similar fix (https://reviews.llvm.org/D34342). I found another bug in the CodeGen library. Do you have time to fix it too? Here is the reproducer from the old review request: int get_sampler_initializer(void); kernel void foo() {

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-27 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() == LangAS::Default) +Ty = C.getAddrSpaceQualType(Ty, LangAS::opencl_constant); + Anastasia wrote: > bader wrote: > > As `Ty` is passed by

[PATCH] D46501: [OpenCL] Guard all half float usage based on cl_khr_fp16 extension

2018-05-23 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/Headers/opencl-c.h:12097 +#ifdef cl_khr_fp16 float __ovld vload_half(size_t offset, const __constant half *p); #if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 These built-ins are part of the core specification, which

[PATCH] D47630: [Sema] Allow creating types with multiple of the same addrspace.

2018-06-07 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/Sema/address_spaces.c:17 int *_AS1 _AS2 *Z; // expected-error {{multiple address spaces specified for type}} + int *_AS1 _AS1 *M; ebevhan wrote: > Anastasia wrote: > > ebevhan wrote: > > > bader wrote: > > >

[PATCH] D47630: [Sema] Allow creating types with multiple of the same addrspace.

2018-06-01 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/Sema/address_spaces.c:17 int *_AS1 _AS2 *Z; // expected-error {{multiple address spaces specified for type}} + int *_AS1 _AS1 *M; I think it might be valuable to give a warning or remark to user. Using the

[PATCH] D47630: [Sema] Allow creating types with multiple of the same addrspace.

2018-06-20 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC335103: [Sema] Allow creating types with multiple of the same addrspace. (authored by bader, committed by ). Changed prior to commit: https://reviews.llvm.org/D47630?vs=150683=152033#toc Repository:

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-26 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added inline comments. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaExpr.cpp:3056 + if (LangOpts.OpenCL) +ResTy = Context.getAddrSpaceQualType(ResTy, LangAS::opencl_constant); ResTy =

[PATCH] D42307: [OpenCL][6.0.0 Release] Release notes for OpenCL in Clang

2018-01-21 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. Looks good to me. Thanks for working on this. https://reviews.llvm.org/D42307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42532: [OpenCL] Add "cles_khr_int64" extension.

2018-01-26 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323522: [OpenCL] Add cles_khr_int64 extension. (authored by bader, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D42532 Files:

[PATCH] D42532: [OpenCL] Add "cles_khr_int64" extension.

2018-01-25 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM, but I'd like Anastasia to approve. Thanks. Repository: rC Clang https://reviews.llvm.org/D42532 ___ cfe-commits mailing list

[PATCH] D50259: [OpenCL] Disallow negative attribute arguments

2018-08-17 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. LGTM. Please, remove "Change-Id: I910b5c077f5f29e02a1572d9202f0fdbea5280fd" from the log message - it not relevant to the project. Repository: rC Clang https://reviews.llvm.org/D50259 ___

[PATCH] D43783: [OpenCL] Remove block invoke function from emitted block literal struct

2018-03-06 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. Hi Sam, Sorry for the delay. LGTM, I have only minor refactoring suggestion. Thanks, Alexey Comment at: lib/CodeGen/CGBlocks.cpp:1065-1067 + llvm::Value *FuncPtr; + if

[PATCH] D45363: [OpenCL] Added -std/-cl-std=CL2.2/CLC++

2018-04-11 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. Thanks! https://reviews.llvm.org/D45363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45363: [OpenCL] Added -std/-cl-std=CL2.2/CLC++

2018-04-06 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: include/clang/Frontend/LangStandards.def:167 +LANGSTANDARD_ALIAS_DEPR(opencl22, "CL2.2") +LANGSTANDARD_ALIAS_DEPR(opencl22, "clc++") +LANGSTANDARD_ALIAS_DEPR(opencl22, "CLC++") OpenCL C++ 1.0 specification defines only

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-25 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/Sema/SemaExpr.cpp:3059 /*IndexTypeQuals*/ 0); SL = StringLiteral::Create(Context, Str, StringLiteral::Ascii, /*Pascal*/ false, ResTy, Loc);

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-26 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() == LangAS::Default) +Ty = C.getAddrSpaceQualType(Ty, LangAS::opencl_constant); + As `Ty` is passed by value, shouldn't we accept only data

[PATCH] D54858: [OpenCL] Improve diagnostics for address spaces in template instantiation

2018-11-28 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/Sema/TreeTransform.h:5276 +// Return type cann't be qualified with an address space. +if (ResultType.getAddressSpace() != LangAS::Default) { "cann't" - typo? cann't - > can't or cannot.

[PATCH] D59646: [PR40778][PR41157][OpenCL] Prevent implicit initialization of local address space objects

2019-03-24 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/Sema/SemaDecl.cpp:11648-11651 +// In OpenCL we don't allow to initialize objects in local address space. +if (getLangOpts().OpenCL && +Var->getType().getAddressSpace() == LangAS::opencl_local) + return;

[PATCH] D59646: [PR40778][PR41157][OpenCL] Prevent implicit initialization of local address space objects

2019-03-25 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/CodeGenOpenCLCXX/local_addrspace_init.cl:12 + __local int i; + __local C ii; + //FIXME: In OpenCL C we don't accept initializers for local address space variables. Anastasia wrote: > bader wrote: > > I guess this

[PATCH] D57768: [SYCL] Add clang front-end option to enable SYCL device compilation flow.

2019-02-21 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 187785. bader added a comment. Add check that SYCL specific macro is not enabled by default. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57768/new/ https://reviews.llvm.org/D57768 Files:

[PATCH] D57768: [SYCL] Add SYCL device compilation flow.

2019-02-21 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 187751. bader added a comment. Applied comments from @ABataev. - Split changes into two patches. This part contains front-end option enabling device specific macro. Changes adding driver option will be sent in a separate patch. - Added LIT test Repository:

[PATCH] D57768: [SYCL] Add clang front-end option to enable SYCL device compilation flow.

2019-02-25 Thread Alexey Bader via Phabricator via cfe-commits
bader closed this revision. bader added a comment. Committed: https://reviews.llvm.org/rL354773 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57768/new/ https://reviews.llvm.org/D57768 ___ cfe-commits

[PATCH] D59219: [PR41007][OpenCL] Allow printf and toolchain reserved variadic functions in C++

2019-03-15 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. > May be test/Driver/include-default-header.cl would make more sense to show > the intent? test/Headers/opencl-c-header.cl sounds like good candidate. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59219/new/

[PATCH] D59486: [OpenCL] Improve testing of default header in C++ mode

2019-03-18 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. I see seven OpenCL C tests using -finclude-default-header option and AFAIK, only test/Driver/include-default-header.cl doesn't parse it. Could you also update OpenCL C tests? I think clang/test/Headers/opencl-c-header.cl and test/Driver/include-default-header.cl fully

[PATCH] D59492: [OpenCL] Allow variadic macros as Clang feature

2019-03-18 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59492/new/ https://reviews.llvm.org/D59492 ___ cfe-commits mailing list

[PATCH] D59486: [OpenCL] Improve testing of default header in C++ mode

2019-03-18 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. OpenCL C++ part looks good. Thanks! Comment at: test/Headers/opencl-c-header.cl:57-65 char f(char x) { -#if __OPENCL_C_VERSION__ != CL_VERSION_2_0 +#if

[PATCH] D59544: [OpenCL] Minor improvements in default header testing

2019-03-19 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59544/new/ https://reviews.llvm.org/D59544 ___ cfe-commits mailing list

[PATCH] D59219: [PR41007][OpenCL] Allow printf and toolchain reserved variadic functions in C++

2019-03-12 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: cfe/trunk/test/SemaOpenCL/extensions.cl:31 // RUN: %clang_cc1 %s -triple amdgcn-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=CL2.0 -finclude-default-header -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic

[PATCH] D57768: [SYCL] Add SYCL device compilation flow.

2019-02-06 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D57768#1386924 , @ABataev wrote: > This definitely requires a test. @ABataev, I tried to find some tests on similar `-fcuda-is-device` and `-fopenmp-is-device` options, but I wasn't able to find a dedicated test. Could you

[PATCH] D57768: [SYCL] Add SYCL device compilation flow.

2019-02-06 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D57768#1386754 , @Naghasan wrote: > LGTM > > Side note: might be good to also involve @Anastasia, as some of the future > patches will overlap with OpenCL. Sure. I'll add @Anastasia as a reviewer to the relevant patches.

[PATCH] D58277: [OpenCL] Change type of block pointer for OpenCL

2019-02-19 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354337: [OpenCL] Change type of block pointer for OpenCL (authored by bader, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D57768: [SYCL] Add SYCL device compilation flow.

2019-02-11 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D57768#1386941 , @ABataev wrote: > In D57768#1386933 , @bader wrote: > > > In D57768#1386924 , @ABataev wrote: > > > > > This definitely requires a

[PATCH] D57768: [SYCL] Add SYCL device compilation flow.

2019-02-05 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. bader added reviewers: keryell, Naghasan. Herald added subscribers: cfe-commits, ebevhan. Herald added a project: clang. -fsycl-is-device enables compilation of the device part of SYCL source file. Patch by Mariya Podchishchaeva Repository: rG LLVM Github

[PATCH] D60455: [SYCL] Add support for SYCL device attributes

2019-04-09 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. To give more context to the question, I'd like to clarify the use case of new attributes. As @Fznamznon already mentioned in previous comments SYCL is not supposed to expose any non-standard extensions to a user. Here is code example of the SYCL program, which

[PATCH] D60455: [SYCL] Add support for SYCL device attributes

2019-04-15 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. LGTM. One minor comment. Comment at: clang/test/SemaSYCL/device-attributes-on-non-sycl.cpp:3 +// Now pretend that we're compiling a C++ file. There should be warnings. +// RUN: %clang_cc1 -DEXPECT_WARNINGS -fsyntax-only

  1   2   3   4   >