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

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

[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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[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. https://reviews.llvm.org

[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] D33681: [OpenCL] Allow function declaration with empty argument list.

2017-10-11 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315453: [OpenCL] Allow function declaration with empty argument list. (authored by bader). Changed prior to commit: https://reviews.llvm.org/D33681?vs=118437&id=118588#toc Repository: rL LLVM https:

[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 http://lists.llvm.o

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

[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&id=101242#toc Repository: rL LLVM https://reviews.llvm.o

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

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

[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 test/CodeGenOpenCL/spir_

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

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

[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: lib/CodeGe

[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: Sema/SemaChecking

[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)* @__translate_sampler

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

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

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

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

[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-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&id=152033#toc Repository:

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

[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] 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/ https://reviews.llvm.org/D59219

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

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

[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 !defined(__OPENCL_CPP_V

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

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

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

2019-04-12 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added inline comments. Comment at: clang/test/SemaSYCL/device-attributes-on-non-sycl.cpp:5 + +#if defined(EXPECT_WARNINGS) +// expected-warning@+8 {{'sycl_kernel' attribute ignored}} I think you can use `__SYCL_DEVICE_ONLY__` d

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

2019-04-15 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/test/SemaSYCL/device-attrubutes.cpp:8-11 +__attribute((sycl_kernel)) void foo(); +__attribute((sycl_device)) void foo1(); +[[clang::sycl_kernel]] void foo2(); +[[clang::sycl_device]] void foo3(); Fznamznon wrote: > b

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

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

2019-04-16 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D60455#1468386 , @Fznamznon wrote: > > Ok, my question is whether you are planning to duplicate the same logic as > > for OpenCL kernel which doesn't really seem like an ideal design choice. Is > > this the only difference then

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

2019-04-16 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D60455#1467279 , @aaron.ballman wrote: > In D60455#1464324 , @Fznamznon wrote: > > > Applied comments from @aaron.ballman and @keryell > > > > - Introduced a C++11 and C2x style spelling i

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

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

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

[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] 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: https://revie

[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-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: clang/include/clang/

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

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

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-06-19 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/test/SemaSYCL/device-attributes.cpp:3 + +[[clang::sycl_kernel]] int gv2 = 0; // expected-warning {{'sycl_kernel' attribute only applies to functions}} +__attribute((sycl_kernel)) int gv3 = 0; // expected-warning {{'sycl_kernel' att

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-05-22 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1017 + let LangOpts = [SYCL]; + let Documentation = [Undocumented]; +} Anastasia wrote: > Ok, I thought the earlier request was not to add undocumented attributes with > the spelling? >

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-05-27 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D60455#1513499 , @Anastasia wrote: > //**Design question**//: since you are not aware what functions are to be run > on a device while parsing them, at what point do you plan to diagnose the > invalid behavior from the standard

[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 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 = Context.get

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

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

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-20 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. bader added a reviewer: Anastasia. Herald added subscribers: cfe-commits, ebevhan, yaxunl. Herald added a project: clang. bader marked an inline comment as done. bader added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:10090 // if both

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-20 Thread Alexey Bader via Phabricator via cfe-commits
bader marked an inline comment as done. bader added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:10090 // if both are pointers check if operation is valid wrt address spaces - if (S.getLangOpts().OpenCL && isLHSPointer && isRHSPointer) { + if ((S.getLangOpts().Op

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-21 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 265487. bader added a comment. Enable diagnostics for non-OpenCL modes and applied refactoring proposed by John. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80317/new/ https://reviews.llvm.org/D80317 Files:

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-21 Thread Alexey Bader via Phabricator via cfe-commits
bader marked 2 inline comments as done. bader added a comment. Thanks for the review. I've enabled the diagnostics for all the modes. I also applied the refactoring suggested by @rjmccall. Hopefully I understand it correctly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-21 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 265547. bader added a comment. - Added C test case with address_space attribute. - Move isAddressSpaceOverlapping from PointerType to QualType. - Move C++ test case to clang/test/SemaCXX Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-21 Thread Alexey Bader via Phabricator via cfe-commits
bader marked 2 inline comments as done. bader added inline comments. Comment at: clang/include/clang/AST/Type.h:1069 + /// qualifiers. + bool isAddressSpaceOverlapping(const QualType &T) const { +Qualifiers Q = getQualifiers(); rjmccall wrote: > It's idioma

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-21 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 265579. bader marked an inline comment as done. bader added a comment. Fix formatting in clang/test/Sema/address_spaces.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80317/new/ https://reviews.llvm.org/D80317

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-22 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe95ee300c053: [SYCL] Prohibit arithmetic operations for incompatible pointers (authored by bader). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80317/new/

[PATCH] D74387: [OpenMP][SYCL] Improve diagnosing of unsupported types usage

2020-05-29 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcf6cc662: [OpenMP][SYCL] Improve diagnosing of unsupported types usage (authored by Fznamznon, committed by bader). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D80829: [OpenMP][SYCL] Do not crash on attempt to diagnose unsupported type use

2020-05-30 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbd85b7d66887: [OpenMP][SYCL] Do not crash on attempt to diagnose unsupported type use (authored by Fznamznon, committed by bader). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D80932: [SYCL] Make default address space a superset of OpenCL address spaces.

2020-06-01 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. bader added reviewers: Anastasia, keryell, Naghasan, asavonic, Fznamznon. Herald added subscribers: cfe-commits, ebevhan, yaxunl. Herald added a project: clang. This change enables conversion between OpenCL address spaces and default address space similar to conversion

[PATCH] D82174: [OpenCL] Add global_device and global_host address spaces

2020-07-29 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8d27be8dbaff: [OpenCL] Add global_device and global_host address spaces (authored by bader). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo C

[PATCH] D80932: [SYCL] Make default address space a superset of OpenCL address spaces.

2020-06-03 Thread Alexey Bader via Phabricator via cfe-commits
bader marked an inline comment as done. bader added a comment. In D80932#2068863 , @Anastasia wrote: > > Why? Can you explain what you are trying to achieve with this? I think @asavonic can provide more detailed answer, but IIRC we spent a lot time t

[PATCH] D80932: [SYCL] Make default address space a superset of OpenCL address spaces.

2020-06-05 Thread Alexey Bader via Phabricator via cfe-commits
bader marked an inline comment as done. bader added a comment. In D80932#2074792 , @Anastasia wrote: > I think my biggest problem is that I don't understand how you can just run > C++ libraries on OpenCL devices. If we were able to compile plain C++ for

[PATCH] D80932: [SYCL] Make default address space a superset of OpenCL address spaces.

2020-06-09 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D80932#2080631 , @Anastasia wrote: > > @Anastasia, if we make this change specific to SYCL mode, will it address > > your concerns? > > I can't answer this question for the reasons I have explained above. Sorry, I'm not sure th

[PATCH] D81641: [SYCL][OpenMP] Implement thread-local storage restriction

2020-06-17 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D81641#2097433 , @Fznamznon wrote: > Seems that `test/OpenMP/nvptx_target_codegen.cpp` is completely not > formatted. If I apply suggestion from pre-merge checks, this will look like a > big unrelated to this patch change and it

[PATCH] D81641: [SYCL][OpenMP] Implement thread-local storage restriction

2020-06-17 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0bdcd95bf20f: [SYCL][OpenMP] Implement thread-local storage restriction (authored by Fznamznon, committed by bader). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D80932: [SYCL] Make default address space a superset of OpenCL address spaces.

2020-06-26 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D80932#2085848 , @Anastasia wrote: > In D80932#2083185 , @bader wrote: > > > In D80932#2080631 , @Anastasia > > wrote: > > > > > > @Anastasia, if w

[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] D116266: [SPIR-V] Add linking of separate translation units using spirv-link

2022-09-05 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/docs/UsersManual.rst:3602 +Linking is done using ``spirv-link`` from `the SPIRV-Tools project +`_. Similar to other external Anastasia wrote: > bader wrote: > >

[PATCH] D122587: [clang][NFC] Extract the EmitAssemblyHelper::TargetTriple member

2022-04-04 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG87b28f5092f2: [clang][NFC] Extract the EmitAssemblyHelper::TargetTriple member (authored by psamolysov-intel, committed by bader). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D118935: [SYCL] Disallow explicit casts between mismatching address spaces

2022-02-04 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118935/new/ https://reviews.llvm.org/D118935

[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-02 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] 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 AT->getVa

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

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

[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 http://lists.llvm.org/cgi-bin/mailman/listinf

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

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

[PATCH] D71962: Fix crash in getFullyQualifiedName for inline namespace

2019-12-28 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. bader added reviewers: bkramer, ilya-biryukov. Herald added subscribers: cfe-commits, ebevhan. Herald added a project: clang. The ICE happens when the most outer namespace is an inline namespace. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D71962

[PATCH] D71962: Fix crash in getFullyQualifiedName for inline namespace

2019-12-28 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG128f39da932b: Fix crash in getFullyQualifiedName for inline namespace (authored by bader). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71962/new/ https://

[PATCH] D72362: [clang-tidy] misc-no-recursion: a new check

2020-01-13 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Does it make sense to implement such diagnostics in clang Sema, considering that OpenCL does not allow recursion? We implemented similar diagnostics for SYCL programming model and would be like to upstream it to clang later (https://github.com/intel/llvm/commit/4efe9fcf2d

[PATCH] D72362: [clang-tidy] misc-no-recursion: a new check

2020-01-14 Thread Alexey Bader via Phabricator via cfe-commits
bader added a subscriber: Naghasan. bader added a comment. In D72362#1817682 , @lebedev.ri wrote: > In D72362#1817599 , @bader wrote: > > > Does it make sense to implement such diagnostics in clang Sema, considering

[PATCH] D88303: [clang][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-09-28 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. I'm okay with this change in general. One note though. There are two aspects of this change: 1. I agree that `cl-fp32-correctly-rounded-divide-sqrt` is OpenCL specific and nothing should not be added in other modes. 2. I have concerns WRT removing the attribute in OpenCL

[PATCH] D88303: [clang][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-09-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. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88303/new/ https://reviews.llvm.org/D88303 ___

[PATCH] D88424: [clang][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-09-28 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. You might need add [OpenCL] tag to the commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88424/new/ https://reviews.llvm.org/D88424 ___ cfe-commits mailing list cfe-com

  1   2   3   4   >