r274509 - [OpenCL] Make OpenCL Builtins added according to the right version.

2016-07-04 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Mon Jul 4 11:07:18 2016 New Revision: 274509 URL: http://llvm.org/viewvc/llvm-project?rev=274509&view=rev Log: [OpenCL] Make OpenCL Builtins added according to the right version. Currently we only have OpenCL 2.0 Builtins i.e. pipes or address space conversions. They have

r274540 - [OpenCL] An implementation of device side enqueue (DSE) from OpenCL v2.0 s6.13.17.

2016-07-05 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Tue Jul 5 06:31:24 2016 New Revision: 274540 URL: http://llvm.org/viewvc/llvm-project?rev=274540&view=rev Log: [OpenCL] An implementation of device side enqueue (DSE) from OpenCL v2.0 s6.13.17. - Added new Builtins: enqueue_kernel, get_kernel_work_group_size and get_kernel

[PATCH] D21989: [OpenCL] Improve diagnostics of OpenCL types

2016-07-05 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added reviewers: bader, yaxunl. Anastasia added a subscriber: cfe-commits. This change: 1. Changes diagnostics for Blocks to be implicitly const qualified OpenCL v2.0 s6.12.5. 2. Adds and unifies diagnostics of some OpenCL special types: blocks, images,

Re: [PATCH] D21295: Add a negative TBAA test

2016-07-05 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Has this test case been missing from the original commit? If yes, could you point to it please! Thanks! http://reviews.llvm.org/D21295

Re: [PATCH] D21989: [OpenCL] Improve diagnostics of OpenCL types

2016-07-06 Thread Anastasia Stulova via cfe-commits
Anastasia updated this revision to Diff 62880. Anastasia added a comment. - Fixed misc formatting issues - Added restrictions and testing for return types http://reviews.llvm.org/D21989 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaExpr.cpp lib/Sem

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

2016-07-07 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/AST/BuiltinTypes.def:164 @@ +163,3 @@ +// Internal OpenCL sampler initializer type. +BUILTIN_TYPE(OCLSamplerInit, OCLSamplerInitTy) + > However, we want it to be translated to __sampler_initializer* type.

Re: [PATCH] D20948: [OpenCL] Fix access qualifiers handling for typedefs

2016-07-07 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Could you please address these last minor comments though before committing. Thanks! Comment at: test/SemaOpenCL/access-qualifier.cl:10 @@ +9,3 @@ +#if __OPENCL_

Re: [PATCH] D20948: [OpenCL] Fix access qualifiers handling for typedefs

2016-07-07 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2509 @@ -2508,3 +2508,3 @@ "functions, methods, and parameters|classes|enums|variables|methods|" - "fields and global variables|structs|variables and typedefs|thread-local variables|" - "

Re: [PATCH] D22067: [OpenCL] Add missing -cl-no-signed-zeros option into driver

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

r275061 - [OpenCL] Improved diagnostics of OpenCL types.

2016-07-11 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Mon Jul 11 08:46:02 2016 New Revision: 275061 URL: http://llvm.org/viewvc/llvm-project?rev=275061&view=rev Log: [OpenCL] Improved diagnostics of OpenCL types. - Changes diagnostics for Blocks to be implicitly const qualified OpenCL v2.0 s6.12.5. - Added and unified diagno

Re: [PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

2016-07-11 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:1681 @@ -1692,1 +1680,3 @@ + // -cl-strict-aliasing needs to emit diagnostic in the case where CL > 1.0. + // This option should be deprecated for CL > 1.0 because Was this code m

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

2016-07-11 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7868 @@ +7867,3 @@ +def warn_sampler_initializer_invalid_bits : Warning< + "Sampler initializer has invalid %0 bits">, InGroup; +def err_sampler_initializer_not_constant : Error< -

Re: [PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

2016-07-12 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/Frontend/opencl-blocks.cl:9 @@ -8,1 +8,3 @@ // RUN: %clang_cc1 %s -triple amdgcn--amdhsa -x c -std=c99 -verify -fsyntax-only +// RUN: %clang_cc1 -cl-std=CL1.1 -cl-strict-aliasing %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID-

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

2016-07-12 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGOpenCLRuntime.cpp:83 @@ +82,3 @@ +SamplerTy = llvm::PointerType::get(llvm::StructType::create( + CGM.getLLVMContext(), "__sampler"), + CGM.getContext().getTargetAddressSpace( I am wondering i

Re: [PATCH] D21989: [OpenCL] Improve diagnostics of OpenCL types

2016-07-12 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Wondering if we should add similar restrictions for other OpenCL types incl events or queues? Also I am guessing that the following pipe int (*p) should be parsed as pointer to pipe and not a pointer to a pipe element type (by analogy to function pointers or other

Re: [PATCH] D21989: [OpenCL] Improve diagnostics of OpenCL types

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

Re: [PATCH] D17345: [OpenCL] Improve diagnostics of address spaces for variables inside function

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

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

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

Re: [PATCH] D15293: [OpenCL] Correct NULL constant handling after applying default AS

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

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

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

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

2016-07-12 Thread Anastasia Stulova via cfe-commits
Anastasia closed this revision. Anastasia added a comment. r248906 and r250892 http://reviews.llvm.org/D13105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17343: [OpenCL] Diagnose program scope pointers

2016-07-12 Thread Anastasia Stulova via cfe-commits
Anastasia abandoned this revision. Anastasia added a comment. After clarifying with Khronos, it doesn't seem like this is needed indeed! http://reviews.llvm.org/D17343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

Re: [PATCH] D20249: [OpenCL] Hierarchical/dynamic parallelism - enqueue kernel in OpenCL 2.0

2016-07-12 Thread Anastasia Stulova via cfe-commits
Anastasia closed this revision. Anastasia added a comment. r274540 and r274509 http://reviews.llvm.org/D20249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

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

Re: [PATCH] D16876: [OpenCL] Refine pipe builtin support

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

[PATCH] D17821: [OpenCL] Complete image types support

2016-03-02 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: bader. Anastasia added subscribers: cfe-commits, pekka.jaaskelainen, yaxunl. Follow up from the earlier discussion via cfe-dev regarding incomplete images support in Clang: http://lists.llvm.org/pipermail/cfe-dev/2016-February/047187.ht

Re: [PATCH] D17345: [OpenCL] Improve diagnostics of address spaces for variables inside function

2016-03-02 Thread Anastasia Stulova via cfe-commits
Anastasia updated this revision to Diff 49651. Anastasia added a comment. Improved message text! http://reviews.llvm.org/D17345 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/Parser/opencl-storage-class.cl test/SemaOpenCL/storageclass-cl20.cl test/SemaOpe

r262616 - [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-03-03 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Thu Mar 3 07:33:19 2016 New Revision: 262616 URL: http://llvm.org/viewvc/llvm-project?rev=262616&view=rev Log: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0 Applying the following restrictions for block types in OpenCL (v2.0 s6.12.5): - __block storage clas

r262641 - [OpenCL] Improve diagnostics of address spaces for variables in function

2016-03-03 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Thu Mar 3 12:38:40 2016 New Revision: 262641 URL: http://llvm.org/viewvc/llvm-project?rev=262641&view=rev Log: [OpenCL] Improve diagnostics of address spaces for variables in function - Prevent local variables to be declared in global AS - Diagnose AS of local variables w

Re: [PATCH] D17955: [OpenCL] Fix pipe builtin bugs

2016-03-08 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Tests missing! http://reviews.llvm.org/D17955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17861: [OpenCL] Accept __attribute__((nosvm))

2016-03-09 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/nosvm.cl:9 @@ +8,3 @@ +#else +void f(__attribute__((nosvm)) int* a); // expected-warning {{'nosvm' attribute ignored}} +#endif yaxunl wrote: > Anastasia wrote: > > yaxunl wrote: > > > yaxunl wrote: > >

Re: [PATCH] D17821: [OpenCL] Complete image types support

2016-03-11 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/AST/OpenCLImageTypes.def:39 @@ +38,3 @@ + +IMAGE_READ_TYPE(image1d, OCLImage1d) +IMAGE_READ_TYPE(image1d_array, OCLImage1dArray) bader wrote: > Minor comment: any image access qualifier can be applied to a

Re: [PATCH] D17412: PR19957: [OpenCL] incorrectly accepts implicit address space conversion with ternary operator

2016-03-14 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. I think it's hard to write this simpler as logic is quite complicated. But we can definitely improve understanding with comments! Btw, regarding tests to cover case 2, could we also add test with types in which CV qualifiers differ. May be just at least one. No need t

RE: r257254 - [OpenCL] Pipe type support

2016-03-15 Thread Anastasia Stulova via cfe-commits
It seems we are not printing and dumping the type correctly. Currently we get this if we call PipeType::dump(): PipeType 0x9b14ce0 'pipe' But we should have something like (for 'pipe int p'): PipeType 0x9b14ce0 'pipe int' `-BuiltinType 0x9adeed0 'int' It should be similar to atomic or pointer ty

RE: r257254 - [OpenCL] Pipe type support

2016-03-16 Thread Anastasia Stulova via cfe-commits
Cool! Thanks! I have a feeling we are missing a VisitPipeType method in lib/AST/ASTDumper.cpp and element type printing in TypePrinter::printPipeBefore() method. Anastasia -Original Message- From: xiuli pan [mailto:xiuli...@outlook.com] Sent: 16 March 2016 09:12 To: Anastasia Stulova;

Re: [PATCH] D17821: [OpenCL] Complete image types support

2016-03-22 Thread Anastasia Stulova via cfe-commits
Anastasia updated this revision to Diff 51303. Anastasia added a comment. Thanks to Aleksey Bader for rebasing this patch to ToT and fixing some tests issues! http://reviews.llvm.org/D17821 Files: include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/AST/OpenCLI

Re: [PATCH] D17955: [OpenCL] Fix pipe builtin bugs

2016-03-22 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:1 @@ -1,2 +1,2 @@ // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL2.0 Could you add a test case that fails before your modification here to show that you

Re: [PATCH] D17596: [OpenCL] Add ocl and spir version for spir target

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

Re: [PATCH] D17552: Pass -backend-option to LLVM when there is no target machine

2016-03-22 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM, apart from small remark on the test! Comment at: test/Frontend/backend-option.c:2 @@ +1,3 @@ +// RUN: %clang_cc1 %s -emit-llvm -backend-option -time-passes -o - 2>&1 | FileCheck %s +// RUN: %clang_cc1 %s -emit-l

Re: [PATCH] D17552: Pass -backend-option to LLVM when there is no target machine

2016-03-22 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/Frontend/backend-option.c:2 @@ +1,3 @@ +// RUN: %clang_cc1 %s -emit-llvm -backend-option -time-passes -o - 2>&1 | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -backend-option -time-passes -o - -triple spir-unknown-unknown 2>&1

Re: [PATCH] D15603: [OpenCL] Pipe type support

2016-01-04 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/ASTContext.cpp:3121 @@ +3120,3 @@ +QualType ASTContext::getPipeType(QualType T) const { + // Unique pointers, to guarantee there is only one pointer of a particular + // structure. Could we update the comment

Re: [PATCH] D15603: [OpenCL] Pipe type support

2016-01-05 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a reviewer: Anastasia. Anastasia added a comment. LGTM! Comment at: lib/CodeGen/CGOpenCLRuntime.cpp:108 @@ +107,3 @@ +PipeTy = llvm::PointerType::get(llvm::StructType::create( + CGM.getLLVMContext(), "opencl.pipe_t"), Pi

r256838 - [OpenCL] Disallow taking an address of a function.

2016-01-05 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Tue Jan 5 08:39:27 2016 New Revision: 256838 URL: http://llvm.org/viewvc/llvm-project?rev=256838&view=rev Log: [OpenCL] Disallow taking an address of a function. An undecorated function designator implies taking the address of a function, which is illegal in OpenCL. Impleme

Re: [PATCH] D15603: [OpenCL] Pipe type support

2016-01-05 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGOpenCLRuntime.cpp:108 @@ +107,3 @@ +PipeTy = llvm::PointerType::get(llvm::StructType::create( + CGM.getLLVMContext(), "opencl.pipe_t"), PipeAddrSpc); + } pxli168 wrote: > Anastasia wrote: > > Yes

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-07 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/Builtins.def:1255 @@ -1254,1 +1254,3 @@ +// OpenCL 2.0 Pipe functions. +// We need the variadic prototype, since the packet type could be anything. Could we put reference to spec section?

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-08 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Do you have any tests? We won't be able to commit without. Also having them would help understanding what this modification does. Comment at: include/clang/Basic/Builtins.def:1260 @@ +1259,3 @@ + +LANGBUILTIN(reserve_read_pipe, "i.", "tn", OCLC_LANG)

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-11 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/Builtins.def:1260 @@ +1259,3 @@ + +LANGBUILTIN(reserve_read_pipe, "i.", "tn", OCLC_LANG) +LANGBUILTIN(reserve_write_pipe, "i.", "tn", OCLC_LANG) Ok, this way it means variable number of arg which isn

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-01-11 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:4934 @@ +4933,3 @@ +const Type *DeclTy = PDecl->getType().getCanonicalType().getTypePtr(); +if (AccessAttr->isReadWrite()) { + if (DeclTy->isPipeType() || In the case of failure, w

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-11 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:2033 @@ +2032,3 @@ + *Arg1 = EmitScalarExpr(E->getArg(1)); +llvm::Type *ReservedIDTy = ConvertType(getContext().OCLReserveIDTy); + pekka.jaaskelainen wrote: > Anastasia wrote: > >

Re: [PATCH] D16047: [OpenCL] Add Sema checks for OpenCL 2.0

2016-01-12 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Also generally it's much nicer to have small logically isolated changes committed. I can see how you could partition this change into into pipe, blocks and images. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:593 @@ -592,2 +592,3 @@ InG

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-12 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/Builtins.def:1255 @@ -1254,1 +1254,3 @@ +// OpenCL v2.0 s6.13.16, s9.17.3.5 -- Pipe functions. +// We need the generic prototype, since the packet type could be anything. Could you remove one -? =

Re: [PATCH] D16047: [OpenCL] Add Sema checks for OpenCL 2.0

2016-01-13 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:593 @@ -592,2 +592,3 @@ +def err_no_declarators : Error<"declaration does not declare anything">; def ext_typedef_without_a_name : ExtWarn<"typedef requires a name">, InGroup; -

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-13 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:37 @@ +36,3 @@ + write_pipe(p, tmp); // expected-error {{invalid argument type to function write_pipe (expecting: 'int *')}} + read_pipe(p, ptr);// expected-error {{invalid pipe acc

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-14 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1981 @@ +1980,3 @@ + const char *Name = + (BuiltinID == Builtin::BIread_pipe) ? "read_pipe_2" : "write_pipe_2"; + // Re-Creating the function type for this call, since the original type -

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-14 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:2082 @@ +2081,3 @@ +if (BuiltinID == Builtin::BIget_pipe_num_packets) + Name = "get_pipe_num_packets"; +else prepend "__" here too! Comment at: lib/Sema/SemaChec

Re: [PATCH] D16047: [OpenCL] Add Sema checks for OpenCL 2.0

2016-01-14 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7670 @@ +7669,3 @@ + "%0 can only be used as a function parameter">; +def err_opencl_atomic_init_addressspace : Error< + "initialization of atomic variables is restricted to variables in glob

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-01-18 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. I think some tests for new diagnostics are still missing? Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7676 @@ +7675,3 @@ +def err_opencl_invalid_read_write : Error< + "access qualifier read_write can not be used for %0 %select{|before CL2.

Re: [PATCH] D16047: [OpenCL] Add Sema checks for OpenCL 2.0

2016-01-18 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:7255 @@ -7209,3 +7254,3 @@ return PtrPtrKernelParam; -return PointeeType.getAddressSpace() == 0 ? PrivatePtrKernelParam - : PtrKernelParam; +// Now generi

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-18 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. A few nitpicks here, otherwise it seems we are in a good shape. I hope this will hit trunk soon. :) Comment at: lib/CodeGen/CGBuiltin.cpp:1966 @@ -1965,1 +1965,3 @@ } + + case Builtin::BIread_pipe: Can you put a comment with the s

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-19 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Could you please remove the line with printf before committing (see comment above)? Comment at: lib/CodeGen/CGBuiltin.cpp:1976 @@ +1975,3 @@ +getContext()

Re: [PATCH] D15721: [Sema] Fix ICE on casting a vector of bools to a vector of T

2016-01-25 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. I am generally not clear about the scope of this patch. Is it intended for OpenCL or C++? As for OpenCL, boolean vector types are not permitted (Table 6.2). Also conversions between vector types are disallowed in general (Section 6.2.2) but unfortunately Clang doesn'

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-25 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Could you please copy us in CC? @Pekka, do you think it would make sense to include a description of the new OpenCL features in the release note too? Or shall we wait for the completion of OpenCL 2.0 support (hopefully in next release)? Could do both as well I guess.

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-01-26 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:5705 @@ -5669,8 +5704,3 @@ - // Walk the declarator structure, applying decl attributes that were in a type - // position to the decl itself. This handles cases like: - // int *__attr__(x)** D; - // w

Re: [PATCH] D15721: [Sema] Fix ICE on casting a vector of bools to a vector of T

2016-01-26 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. OpenCL side seems fine! Thanks for adding OpenCL diagnostic btw. I think we will also need to forbid the invalid conversions too at some point. Comment at: lib/Sema/SemaExpr.cpp:5715 @@ +5714,3 @@ + // when compiling code as e.g. C++) + uint64_t src

Re: [PATCH] D16047: [OpenCL] Add Sema checks for OpenCL 2.0

2016-01-26 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Xiuli, do you still plan to continue here? I was just thinking if it would make sense to re-upload the review since the line numbers got broken due to full diff. Also it would be nice to partition to several independent commits/reviews. Let's say: - Blocks diagnosti

Merge OpenCL 2.0 Pipe builtins (r258782) in 3.8

2016-01-26 Thread Anastasia Stulova via cfe-commits
Hi Hans, Could you please merge Clang commit r258782 into release 3.8. It adds Pipe BIFs to be used along with Pipe type committed earlier (in r257254). Thanks, Anastasia ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

Re: [PATCH] D15721: [Sema] Fix ICE on casting a vector of bools to a vector of T

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

Re: [PATCH] D15603: [OpenCL] Pipe type support

2016-01-28 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. No, this shouldn't happen! There shouldn't be any difference in emitted IR depending on a platform. I also don't see any code in CodeGen that could specialize. Is there a way to reproduce your compilation? Passing any triple? http://reviews.llvm.org/D15603 __

Re: [PATCH] D15603: [OpenCL] Pipe type support

2016-01-28 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Yes, I see that it happens only for some vector types. The CodeGen follows quite different paths for both targets. And in the case of s390x-linux-gnu it ends up in ABIArgInfo::Indirect case of the second switch statement where an additional pointer will be added here:

Re: [PATCH] D15603: [OpenCL] Pipe type support

2016-01-28 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Btw, just to be clear in my previous comment I was referring to the 2nd switch statement in CodeGenTypes::GetFunctionType that contains the line: ArgTypes[FirstIRArg] = LTy->getPointerTo(); http://reviews.llvm.org/D15603 _

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

2016-01-29 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaLookup.cpp:698 @@ +697,3 @@ +// tgmath.h, time.h, wchar.h and wctype.h are not available and cannot +// be included by a program. +if (S.getLangOpts().OpenCL && pxli168 wrote: > I th

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

2016-01-29 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/Attr.td:661 @@ +660,3 @@ + let Args = [UnsignedArgument<"UnrollHint">]; + let Documentation = [Undocumented]; +} I think undocumented is not allowed any longer. I suggest you to check OpenCLGeneri

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

2015-11-23 Thread Anastasia Stulova via cfe-commits
Ping! Re-attaching the final patch. -Original Message- From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of Anastasia Stulova via cfe-commits Sent: 21 October 2015 11:49 To: 'Pekka Jääskeläinen'; cfe-commits@lists.llvm.org Subject: RE: [Patch][OpenCL] Cus

r253863 - [OpenCL 2.0] Apply default address space (AS).

2015-11-23 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Mon Nov 23 05:14:44 2015 New Revision: 253863 URL: http://llvm.org/viewvc/llvm-project?rev=253863&view=rev Log: [OpenCL 2.0] Apply default address space (AS). If AS of a variable/parameter declaration is not set by the source, OpenCL v2.0 s6.5 defines explicit rules for defa

Re: [PATCH] D14441: [OpenCL] Pipe types support.

2015-11-23 Thread Anastasia Stulova via cfe-commits
Anastasia added a subscriber: Anastasia. Comment at: include/clang/AST/Type.h:5018 @@ +5017,3 @@ +/// PipeType - OpenCL20. +/// +class PipeType : public Type, public llvm::FoldingSetNode { Any reason for an empty comment line here? Comment at: li

Re: [PATCH] D14441: [OpenCL] Pipe types support.

2015-11-23 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/AST/Type.h:5019 @@ +5018,3 @@ +/// +class PipeType : public Type, public llvm::FoldingSetNode { + QualType ElementType; Not related to this change though, but I was just thinking that it might be possibl

[PATCH] D15293: [OpenCL] Correct NULL constant handling after applying default AS

2015-12-07 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: pekka.jaaskelainen. Anastasia added a subscriber: cfe-commits. In OpenCL2.0 s6.5 all pointers are implicitly in generic address space unless address space is explicitly specified. Correct the behavior of NULL constant detection - gener

Re: [PATCH] D14441: [OpenCL] Pipe types support.

2015-12-07 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. I've made a few small comments. Don't see any reply though. http://reviews.llvm.org/D14441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2015-12-07 Thread Anastasia Stulova via cfe-commits
i32* {{.*}} monotonic Thank you! Anastasia -Original Message- From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of Anastasia Stulova via cfe-commits Sent: 23 November 2015 10:32 To: cfe-commits@lists.llvm.org; 'Pekka Jääskeläinen' Subject: RE: [Patch][

r255337 - [OpenCL 2.0] In OpenCL v2.0 s6.5 all pointers are implicitly in generic

2015-12-11 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Fri Dec 11 07:49:15 2015 New Revision: 255337 URL: http://llvm.org/viewvc/llvm-project?rev=255337&view=rev Log: [OpenCL 2.0] In OpenCL v2.0 s6.5 all pointers are implicitly in generic address space unless address space is explicitly specified. Correct the behavior of NULL co

r255339 - Reverting r255337 as it seems to kill bots. Needs investigation.

2015-12-11 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Fri Dec 11 09:23:00 2015 New Revision: 255339 URL: http://llvm.org/viewvc/llvm-project?rev=255339&view=rev Log: Reverting r255337 as it seems to kill bots. Needs investigation. Removed: cfe/trunk/test/SemaOpenCL/null_literal.cl Modified: cfe/trunk/lib/AST/Expr.cpp

r255346 - [OpenCL 2.0] In OpenCL v2.0 s6.5 all pointers are implicitly in generic

2015-12-11 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Fri Dec 11 11:41:19 2015 New Revision: 255346 URL: http://llvm.org/viewvc/llvm-project?rev=255346&view=rev Log: [OpenCL 2.0] In OpenCL v2.0 s6.5 all pointers are implicitly in generic address space unless address space is explicitly specified. Correct the behavior of NULL co

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

2015-12-16 Thread Anastasia Stulova via cfe-commits
Hi Pekka, Re-attaching as a full patch again as something went wrong earlier with the diff wrapping in the email. Thanks, Anastasia -Original Message- From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of Anastasia Stulova via cfe-commits Sent: 07 December 2015 17

r256243 - [OpenCL] Fix atomic Builtins check for address spaces of non-atomic pointer

2015-12-22 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Tue Dec 22 09:14:54 2015 New Revision: 256243 URL: http://llvm.org/viewvc/llvm-project?rev=256243&view=rev Log: [OpenCL] Fix atomic Builtins check for address spaces of non-atomic pointer If there are two pointers passed to an atomic Builtin, Clang doesn't allow the second

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

2015-12-22 Thread Anastasia Stulova via cfe-commits
g earlier with the > diff wrapping in the email. > > Thanks, > Anastasia > > -Original Message- > From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On > Behalf Of Anastasia Stulova via cfe-commits > Sent: 07 December 2015 17:25 > To: 'Pek

Re: [PATCH] D15603: [OpenCL] Pipe type support

2015-12-24 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/ASTContext.cpp:3121 @@ +3120,3 @@ +QualType ASTContext::getPipeType(QualType T) const { + // Unique pointers, to guarantee there is only one pointer of a particular + // structure. I don't think this comment i

[clang] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below (PR #95750)

2024-07-02 Thread Anastasia Stulova via cfe-commits
@@ -6275,13 +6278,46 @@ static FunctionDecl *rewriteBuiltinFunctionDecl(Sema *Sema, ASTContext &Context, OverloadParams.push_back(Context.getPointerType(PointeeType)); } + QualType ReturnTy = FT->getReturnType(); + QualType OverloadReturnTy = ReturnTy; + if (ReturnTy

[clang] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below (PR #95750)

2024-07-02 Thread Anastasia Stulova via cfe-commits
@@ -0,0 +1,255 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 %s -O0 -triple amdgcn-amd-amdhsa -cl-std=CL1.2 \ +// RUN: -emit-llvm -o - | FileCheck --check-prefix=OPENCL12 %s +// RUN: %clang_cc1 %s -

[clang] [Clang] [WIP] Added builtin_alloca right Address Space for OpenCL (PR #95750)

2024-07-03 Thread Anastasia Stulova via cfe-commits
@@ -1981,6 +1981,29 @@ static bool OpenCLBuiltinToAddr(Sema &S, unsigned BuiltinID, CallExpr *Call) { return false; } +// In OpenCL, __builtin_alloca_* should return a pointer to address space +// that corresponds to the stack address space i.e private address space. +stati

[clang] [OpenCL] Emit opencl.cxx.version metadata for C++ (PR #92140)

2024-07-03 Thread Anastasia Stulova via cfe-commits
https://github.com/AnastasiaStulova approved this pull request. Makes sense! Thanks. https://github.com/llvm/llvm-project/pull/92140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Remove ^^ as a token in OpenCL (PR #108224)

2024-09-11 Thread Anastasia Stulova via cfe-commits
AnastasiaStulova wrote: I think that the diagnostic change is reasonable. Clang doesn't support OpenCL C++ at present so we won't need to worry about it. However the mission of C++ for OpenCL is to track C++ and track OpenCL i.e. we may want to update to C++ with reflection. So it would be goo

[clang] Remove FiniteMathOnly and use only NoHonorINFs and NoHonorNANs. (PR #97342)

2024-07-23 Thread Anastasia Stulova via cfe-commits
@@ -816,6 +816,11 @@ class FPOptions { setAllowFPReassociate(LO.AllowFPReassoc); setNoHonorNaNs(LO.NoHonorNaNs); setNoHonorInfs(LO.NoHonorInfs); +// Ensure that if FiniteMathOnly is enabled, NoHonorNaNs and NoHonorInfs are +// also enabled. This is because

[clang] [flang] [Flang][Driver] Introduce -fopenmp-targets offloading option (PR #100152)

2024-07-24 Thread Anastasia Stulova via cfe-commits
AnastasiaStulova wrote: Can you please provide more details about the design of the interface for setting the offload targets? Is the idea here to mirror clang's interface? While clang has a uniform design for [the main target triple](https://clang.llvm.org/docs/CrossCompilation.html#target-tr

[clang] [flang] [Flang][Driver] Introduce -fopenmp-targets offloading option (PR #100152)

2024-07-25 Thread Anastasia Stulova via cfe-commits
AnastasiaStulova wrote: Adding ``--offload-target=`` seems like a good idea since it will be consistent with ``--target=``. One related question I have - does Flang compile for one offload model or can it mix those (let's say compile sources with mixed OpenACC and OpenMP pragmas)? If mixing i

[clang] [flang] [Flang][Driver] Introduce -fopenmp-targets offloading option (PR #100152)

2024-07-29 Thread Anastasia Stulova via cfe-commits
AnastasiaStulova wrote: > In my opinion, the decision to potentially rename or move to a different set > of offloading flags should be independent from this work, as it doesn't > really add anything new, it only replicates one of the features clang already > has. If a change to that is agreed

[clang] [flang] [Flang][Driver] Introduce -fopenmp-targets offloading option (PR #100152)

2024-07-29 Thread Anastasia Stulova via cfe-commits
AnastasiaStulova wrote: > > The only issue I see is that this PR adds a new driver flag that may be > > used to compile the applications. Renaming the user visible flags is not > > that easy. But if they get renamed before any compiler release then it > > should be fine. > > Thank you for the

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-05-08 Thread Anastasia Stulova via cfe-commits
AnastasiaStulova wrote: > From what I can tell, no-one except libclc is actually using this attribute? > At least on github, the only matches I’ve found for > __attribute__((assume("omp are in LLVM and various forks thereof. Given that > it’s not particularly widely used, I don’t think removal

[clang] 481f681 - [AST] Fix typo in assert messages

2022-03-08 Thread Anastasia Stulova via cfe-commits
Author: Krystian Kuzniarek Date: 2022-03-08T11:06:50Z New Revision: 481f6818670aa86e426e326975aa6ea6035d72b3 URL: https://github.com/llvm/llvm-project/commit/481f6818670aa86e426e326975aa6ea6035d72b3 DIFF: https://github.com/llvm/llvm-project/commit/481f6818670aa86e426e326975aa6ea6035d72b3.diff

[clang] 362958a - [C++4OpenCL] Add extra diagnostics for kernel argument types

2021-04-22 Thread Anastasia Stulova via cfe-commits
Author: Anastasia Stulova Date: 2021-04-22T15:28:04+01:00 New Revision: 362958ac7346ba3539f819e9fe93d2529caad1e8 URL: https://github.com/llvm/llvm-project/commit/362958ac7346ba3539f819e9fe93d2529caad1e8 DIFF: https://github.com/llvm/llvm-project/commit/362958ac7346ba3539f819e9fe93d2529caad1e8.d

[clang] fcb45b5 - [OpenCL] Fix typo in the test.

2021-04-23 Thread Anastasia Stulova via cfe-commits
Author: Anastasia Stulova Date: 2021-04-23T14:36:36+01:00 New Revision: fcb45b544d3da87e0aab895eaac7903197a6c58c URL: https://github.com/llvm/llvm-project/commit/fcb45b544d3da87e0aab895eaac7903197a6c58c DIFF: https://github.com/llvm/llvm-project/commit/fcb45b544d3da87e0aab895eaac7903197a6c58c.d

<    1   2   3   4   5   6   7   >