[PATCH] D58569: [libclang] Avoid crashing when getting layout info of an undeduced type.

2019-02-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/tools/c-index-test/c-index-test.c:1695 +CXType RT = clang_getResultType(T); +if (RT.kind != CXType_Invalid) + PrintSingleTypeSize(RT, " [resulttype=%s] [resulttypekind=%s]", emilio wrote: > Anastasia

[PATCH] D36678: [OpenCL] Do not use vararg in emitted functions for enqueue_kernel

2017-08-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/cl20-device-side-enqueue.cl:116 + // B32: store i32 4, i32* %[[TMP3]], align 4 + // B32: call i32 @__enqueue_kernel_vaargs(%opencl.queue_t{{.*}}* [[DEF_Q]], i32 [[FLAGS]], %struct.ndrange_t* [[NDR]]{{(.[0-9]+)?}},

[PATCH] D37231: Add half load and store builtins

2017-08-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/Builtins.def:1427 +// OpenCL half load/store builtin +BUILTIN(__builtin_store_half, "vdh*", "n") +BUILTIN(__builtin_store_halff, "vfh*", "n") I think this should be a language builtin (see above) bu

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

2017-08-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Ok, I will update it to be implicitly generic then. Just to be sure, @bader do you agree on this too? https://reviews.llvm.org/D36410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D37231: Add half load and store builtins

2017-09-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added inline comments. This revision is now accepted and ready to land. Comment at: include/clang/Basic/Builtins.def:1427 +// OpenCL half load/store builtin +BUILTIN(__builtin_store_half, "vdh*", "n") +BUILTIN(__builtin_store_halff, "vf

[PATCH] D36678: [OpenCL] Do not use vararg in emitted functions for enqueue_kernel

2017-09-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM. Thanks! https://reviews.llvm.org/D36678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D37231: Add half load and store builtins

2017-09-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. LGTM! Thanks! Repository: rL LLVM https://reviews.llvm.org/D37231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37231: Add half load and store builtins

2017-09-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/no-half.cl:19 + __builtin_store_half(foo, bar); +// CHECK: [[HALF_VAL:%.*]] = fptrunc double %foo to half +// CHECK: store half [[HALF_VAL]], half addrspace({{.}})* %bar, align 2 Would it make

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

2017-09-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D36410#856907, @bader wrote: > 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.

[PATCH] D37231: Add half load and store builtins

2017-09-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/no-half.cl:27 + foo[0] = __builtin_load_halff(bar); +// CHECK: [[HALF_VAL:%.*]] = load +// CHECK: [[FULL_VAL:%.*]] = fpext half [[HALF_VAL]] to float jvesely wrote: > Anastasia wrote: > > Minor

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

2017-09-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/AST/Type.h:332 + bool getImplicitAddressSpaceFlag() const { return Mask & IMask; } + void setImplicitAddressSpaceFlag(bool Value) { Could we add a bit of comment somewhere explaining why we added impl

[PATCH] D37231: Add half load and store builtins

2017-09-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. Yes, sorry overlooked that. :) LGTM! Thanks! Repository: rL LLVM https://reviews.llvm.org/D37231 ___ cfe-commits mailing list cfe-commit

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

2017-09-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D36410#863409, @yaxunl wrote: > LGTM as a temporary measure until we have a solution for properly emitting > blocks as enqueued kernel. Should I start discussion with Khronos on that? What would our preference be - implicitly `generic` AS

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

2017-09-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D36410#863508, @yaxunl wrote: > In https://reviews.llvm.org/D36410#863426, @Anastasia wrote: > > > In https://reviews.llvm.org/D36410#863409, @yaxunl wrote: > > > > > LGTM as a temporary measure until we have a solution for properly > > > em

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

2017-09-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:6994 + // OpenCL v1.2 s6.5: + // The generic address space name for arguments to a function in a + // program, or local variables of a function is __private. All function yaxunl wro

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

2017-09-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:6994 + // OpenCL v1.2 s6.5: + // The generic address space name for arguments to a function in a + // program, or local variables of a function is __private. All function yaxunl wro

[PATCH] D37742: Add more tests for OpenCL atomic builtin functions

2017-09-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM generally, apart from I am not sure why address spaces are only tested for atomic stores... https://reviews.llvm.org/D37742 ___ cfe-c

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

2017-09-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Added missing `addrspacecast` case in alignment computation logic of pointer type emission in IR generation. https://reviews.llvm.org/D37804 Files: lib/CodeGen/CGExpr.cpp test/CodeGenOpenCL/vectorLoadStore.cl Index: test/CodeGenOpenCL/vectorLoadStore.cl =

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

2017-09-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:957 -return Builder.CreateBitCast(Addr, ConvertType(E->getType())); +return Builder.CreatePointerBitCastOrAddrSpaceCast( +Addr, ConvertType(E->getType())); yaxunl wr

[PATCH] D37822: [OpenCL] Clean up and add missing fields for block struct

2017-09-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Could you please explain a bit more why the alignment have to be put explicitly in the struct? I am just not very convinced this is general enough. Comment at: lib/CodeGen/CGBlocks.cpp:314 assert(elementTypes.empty()); - elementTypes.push_back(

[PATCH] D37822: [OpenCL] Clean up and add missing fields for block struct

2017-09-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D37822#872446, @yaxunl wrote: > In https://reviews.llvm.org/D37822#872291, @Anastasia wrote: > > > Could you please explain a bit more why the alignment have to be put > > explicitly in the struct? I am just not very convinced this is genera

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

2017-09-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:957 -return Builder.CreateBitCast(Addr, ConvertType(E->getType())); +return Builder.CreatePointerBitCastOrAddrSpaceCast( +Addr, ConvertType(E->getType())); Anastasia

[PATCH] D38134: [OpenCL] Emit enqueued block as kernel

2017-09-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Now if we have a block which is being called and enqueued at the same time, will we generate 2 functions for it? Could we add such test case btw? I feel it would be much simpler if we could always generate the kernel metadata for blocks. A lot of special case code wou

[PATCH] D38113: OpenCL: Assume functions are convergent

2017-09-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. The problem of adding this attribute conservatively for all functions is that it prevents some optimizations to happen. I agree to commit this as a temporary fix to guarantee correctness of generated code. But if we ask to add the `convergent` attribute into the spec

[PATCH] D37822: [OpenCL] Clean up and add missing fields for block struct

2017-09-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D37822#877572, @yaxunl wrote: > In https://reviews.llvm.org/D37822#873876, @Anastasia wrote: > > > In https://reviews.llvm.org/D37822#872446, @yaxunl wrote: > > > > > In https://reviews.llvm.org/D37822#872291, @Anastasia wrote: > > > > > > >

[PATCH] D38134: [OpenCL] Emit enqueued block as kernel

2017-09-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. >> I feel it would be much simpler if we could always generate the kernel >> metadata for blocks. A lot of special case code would be removed if we do >> this. OpenCL doesn't prevent kernel functions to be used just as normal >> functions (6.7.1) so it should be a per

[PATCH] D38113: OpenCL: Assume functions are convergent

2017-09-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D38113#877906, @jlebar wrote: > > The problem of adding this attribute conservatively for all functions is > > that it prevents some optimizations to happen. > > function-attrs removes the convergent attribute from anything it can prove > d

[PATCH] D38113: OpenCL: Assume functions are convergent

2017-09-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/convergent.cl:130 +// CHECK: attributes #0 = { noinline norecurse nounwind " +// CHECK: attributes #1 = { {{[^}]*}}convergent{{[^}]*}} } +// CHECK: attributes #2 = { {{[^}]*}}convergent{{[^}]*}} } We

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

2017-09-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 116345. Anastasia added a comment. Created BitCast or AddrSpaceCast conditionally. https://reviews.llvm.org/D37804 Files: lib/CodeGen/CGBuilder.h lib/CodeGen/CGExpr.cpp test/CodeGenOpenCL/vectorLoadStore.cl Index: test/CodeGenOpenCL/vectorLoadStor

[PATCH] D62580: [OpenCL] Use long instead of long long in x86 builtins

2019-05-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Do you think it's possible to add a test? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62580/new/ https://reviews.llvm.org/D62580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D62657: [OpenCL] Fix OpenCL/SPIR version metadata

2019-05-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: svenvh. Herald added subscribers: ebevhan, yaxunl. C++ is derived from OpenCL v2.0 therefore set the versions to the same. In the future we might need to add extra version for CXX. https://reviews.llvm.org/D62657 Files: lib/CodeGen

[PATCH] D62156: [Sema][PR41730] Diagnose addr space mismatch while constructing objects

2019-05-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 202193. Anastasia marked 3 inline comments as done. Anastasia added a comment. - Improved diagnostic - Added more comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62156/new/ https://reviews.llvm.org/D62156 Files: include/clang/Basic/Diagn

[PATCH] D62156: [Sema][PR41730] Diagnose addr space mismatch while constructing objects

2019-05-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 4 inline comments as done. Anastasia added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:8229 + if (FTI.hasMethodTypeCVRUQualifiers()) { +FTI.MethodQualifiers->forEachCVRUQualifier( [&](DeclSpec::TQ TypeQual, StringRef QualName, SourceLocati

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

2019-05-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1017 + let LangOpts = [SYCL]; + let Documentation = [Undocumented]; +} Undocumented -> SYCLKernelDocs Comment at: clang/include/clang/Basic/AttrDocs.td:269 + + us

[PATCH] D62574: Initial draft of target-configurable address spaces.

2019-05-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > This patch does not address the issue with the accessors > on Qualifiers (isAddressSpaceSupersetOf, compatiblyIncludes), > because I don't know how to solve it without breaking a ton of > rather nice encapsulation. Either, every mention of compatiblyIncludes > must

[PATCH] D62580: [OpenCL] Use long instead of long long in x86 builtins

2019-06-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62580/new/ https://reviews.llvm.org/D62580 ___ cfe-commits mailing list cfe-comm

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

2019-06-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenSYCL/device-functions.cpp:24 +} +// CHECK: define spir_func void @{{.*}}foo +// CHECK: define linkonce_odr spir_func i32 @{{.*}}bar Fznamznon wrote: > Anastasia wrote: > > I can't see where the SPIR c

[PATCH] D62156: [Sema][PR41730] Diagnose addr space mismatch while constructing objects

2019-06-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 202690. Anastasia marked an inline comment as done. Anastasia added a comment. Changed FIXME to a regular comment, modified wording. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62156/new/ https://reviews.llvm.org/D62156 Files: include/clang/B

[PATCH] D62156: [Sema][PR41730] Diagnose addr space mismatch while constructing objects

2019-06-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: lib/Sema/SemaOverload.cpp:6095 +// Check that addr space of an object being constructed is convertible to +// the one ctor qualified with. +if (!Qualifiers::isAddressSpaceSuperset

[PATCH] D62413: [OpenCL][PR41727] Prevent ICE on global dtors

2019-06-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 202708. Anastasia added a comment. - Guard OpenCL specific IR generation under OpenCL lang mode CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62413/new/ https://reviews.llvm.org/D62413 Files: lib/CodeGen/CGDeclCXX.cpp lib/CodeGen/CodeGenModul

[PATCH] D62413: [OpenCL][PR41727] Prevent ICE on global dtors

2019-06-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/CodeGen/CGDeclCXX.cpp:132 + Argument = CGM.getTargetCodeGenInfo().performAddrSpaceCast( + CGM, Addr.getPointer(), SrcAS, LangAS::opencl_global, DestTy); r

[PATCH] D62591: [OpenCL][PR42031] Prevent deducing addr space in type alias.

2019-06-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 202721. Anastasia added a comment. - Exclude pointee from early return in addr space deduction - Improved testing: added FileCheck and avoid testing unnecessary bits CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62591/new/ https://reviews.llvm.org

[PATCH] D62591: [OpenCL][PR42031] Prevent deducing addr space in type alias.

2019-06-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. @mantognini Good spot! Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62591/new/ https://reviews.llvm.org/D62591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

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

2019-06-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenSYCL/device-functions.cpp:24 +} +// CHECK: define spir_func void @{{.*}}foo +// CHECK: define linkonce_odr spir_func i32 @{{.*}}bar Fznamznon wrote: > Anastasia wrote: > > Fznamznon wrote: > > > Anast

[PATCH] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-06-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 202753. Anastasia retitled this revision from "[OpenCL][PR42033] Deducing addr space of pointer/reference with template parameter types" to "[OpenCL][PR42033] Deducing addr space with template parameter types". Anastasia edited the summary of this revision.

[PATCH] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-06-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D62584#1522438 , @rjmccall wrote: > I think the right approach here is probably to make sure you're applying > deduction during instantiation as well. I agree I think we might need to extend the template instantiation logic

[PATCH] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-06-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/TreeTransform.h:5363 +if (ResultType.getAddressSpace() != LangAS::Default && +(ResultType.getAddressSpace() != LangAS::opencl_private)) { SemaRef.Diag(TL.getReturn

[PATCH] D62574: Initial draft of target-configurable address spaces.

2019-06-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D62574#1527126 , @ebevhan wrote: > In D62574#1523835 , @Anastasia wrote: > > > > This patch does not address the issue with the accessors > > > on Qualifiers (isAddressSpaceSupersetOf,

[PATCH] D58060: Fix diagnostic for addr spaces in reference binding

2019-06-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia abandoned this revision. Anastasia added a comment. Due to my recent commits I had to changed this slightly so it is now under a new review: https://reviews.llvm.org/D62914 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58060/new/ https://reviews.llvm.org/D58060 ___

[PATCH] D62914: [Sema] Fix diagnostic for addr spaces in reference binding

2019-06-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added subscribers: ebevhan, javed.absar. Extend reference binding behavior to account for address spaces. This change also fixes the diagnostic wording (for qualifier mismatch in reference binding) and simplifies it by

[PATCH] D60193: [OpenCL] Added addrspace_cast operator

2019-06-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Ping! I would appreciate any feedback to this change please. Thanks you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60193/new/ https://reviews.llvm.org/D60193 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D54258: [Clang] Fix pretty printing of CUDA address spaces

2019-06-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D54258#1528872 , @richardmembarth wrote: > Merging in two weeks is fine for me. No worries. I have just committed this. > My assumption was that accepted patches are merged into upstream in a timely > manner. > Maybe thi

[PATCH] D63561: [OpenCL] Improve diagnostic for placement new

2019-06-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63561/new/ https://reviews.llvm.org/D63561 ___

[PATCH] D62156: [Sema][PR41730] Diagnose addr space mismatch while constructing objects

2019-06-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: test/SemaCXX/address-space-ctor.cpp:11 +//expected-note@-6{{candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to 'MyType &&' for 1st argument}}

[PATCH] D62574: Initial draft of target-configurable address spaces.

2019-06-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D62574#1534159 , @ebevhan wrote: > >> I'll have to see if that's possible without breaking a few more > >> interfaces, since you can throw around Qualifiers and check for > >> compatibility without an ASTContext today. > >>

[PATCH] D64083: [OpenCL][Sema] Improve address space support for blocks

2019-07-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: cfe/trunk/lib/Sema/SemaExprCXX.cpp:4229 +LangAS AddrSpaceR = +RHSType->getAs()->getPointeeType().getAddressSpace(); +CastKind Kind = rjmccall wrote: > Anastasia wrote: > > rjmccall wrote: > > > Anastasi

[PATCH] D64569: [OpenCL] Improve destructor support in C++ for OpenCL

2019-07-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/CGExprCXX.cpp:117-118 + llvm::Type *NewType = CGM.getTypes().ConvertType(DstTy); + This = getTargetHooks().performAddrSpaceCast(*this, This, SrcAS, DstAS, +

[PATCH] D62413: [OpenCL][PR41727] Prevent ICE on global dtors

2019-07-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 209463. Anastasia added a comment. Generate NULL for pointer param of __cxa_atexit on mismatching addr spaces CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62413/new/ https://reviews.llvm.org/D62413 Files: lib/CodeGen/CGDeclCXX.cpp lib/CodeGe

[PATCH] D62413: [OpenCL][PR41727] Prevent ICE on global dtors

2019-07-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/CodeGen/CGDeclCXX.cpp:132 + Argument = CGM.getTargetCodeGenInfo().performAddrSpaceCast( + CGM, Addr.getPointer(), SrcAS, LangAS::opencl_global, DestTy); r

[PATCH] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-07-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/TreeTransform.h:5363 +if (ResultType.getAddressSpace() != LangAS::Default && +(ResultType.getAddressSpace() != LangAS::opencl_private)) { SemaRef.Diag(TL.getReturn

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D64400#1582142 , @rjmccall wrote: > There are some code paths that I think are common between the parser and > template instantiation, like `BuildPointerType` and `BuildReferenceType`, but > if you want to do context-sensiti

[PATCH] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-07-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D62584#1583340 , @rjmccall wrote: > Oh, yes, it definitely can't be done to class types. I suppose we should > just forget about it. Ok, regarding address space qualifiers in template instantiation - is it still ok that w

[PATCH] D64083: [OpenCL][Sema] Improve address space support for blocks

2019-07-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D64083#1583110 , @rjmccall wrote: > In D64083#1583109 , @rjmccall wrote: > > > Okay, so it sounds like *from the language perspective* all block pointers > > are actually pointers into

[PATCH] D59426: [PR41010][OpenCL] Allow OpenCL C style vector initialization in C++

2019-07-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. @rsmith, do you have any comments here? It would be quite useful to have this patch in Clang9. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59426/new/ https://reviews.llvm.org/D59426 ___ cfe-commits mailing list

[PATCH] D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode

2019-07-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: docs/LanguageExtensions.rst:1772 +``@_GLOBAL__sub_I_test.cl`` kernel to be enqueued. + + I think I should add something about dtors too. CHANGES SINCE LAST ACTION https:/

[PATCH] D64608: [OpenCL] Make TableGen'd builtin tables and helper functions static

2019-07-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia 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/D64608/new/ https://reviews.llvm.org/D64608

[PATCH] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-07-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D62584#1586640 , @rjmccall wrote: > In D62584#1585091 , @Anastasia wrote: > > > In D62584#1583340 , @rjmccall > > wrote: > > > > > Oh, yes, it

[PATCH] D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode

2019-07-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 210064. Anastasia marked 5 inline comments as done. Anastasia added a comment. Addressed some review comments. Refs are still to be fixed! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64418/new/ https://reviews.llvm.org/D64418 Files: docs/Lang

[PATCH] D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode

2019-07-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: docs/LanguageExtensions.rst:1673 + +All builtin operators will be available in the specific address spaces, thus no conversion +to generic is performed. mantognini wrote: > "specific" seems to imply to the user will h

[PATCH] D64791: [OpenCL] Fix sampler initialization for C++ mode

2019-07-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! I expect the example from the bug is going to compile now: https://bugs.llvm.org/show_bug.cgi?id=41009 Can you please close the bug after the commit. C

[PATCH] D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode

2019-07-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 210101. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64418/new/ https://reviews.llvm.org/D64418 Files: docs/LanguageExtensions.rst docs/UsersManual.rst Index: docs/UsersManual.rst ==

[PATCH] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-07-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 210277. Anastasia added a comment. Fixed typo in the comment CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62584/new/ https://reviews.llvm.org/D62584 Files: lib/Sema/SemaDecl.cpp lib/Sema/SemaType.cpp lib/Sema/TreeTransform.h test/SemaOpe

[PATCH] D64867: [OpenCL] Update comments/diagnostics to refer to C++ for OpenCL mode

2019-07-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: neil.hickey, svenvh. Herald added subscribers: ebevhan, yaxunl. https://reviews.llvm.org/D64867 Files: include/clang/Basic/DiagnosticCommonKinds.td include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/LangOptions.def i

[PATCH] D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode

2019-07-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D64418#1589401 , @kpet wrote: > Very useful to have all of this documented! Thanks! Would it be ok if I fix those in a separate commit? I would really like to commit the core part before the release branch is taken. CHANG

[PATCH] D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode

2019-07-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia reopened this revision. Anastasia added a comment. This revision is now accepted and ready to land. Reopening to continue reviews. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64418/new/ https://reviews.llvm.org/D64418 ___

[PATCH] D64867: [OpenCL] Update comments/diagnostics to refer to C++ for OpenCL mode

2019-07-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 210381. Anastasia edited the summary of this revision. Anastasia added a comment. - Updated comments - Added motivation CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64867/new/ https://reviews.llvm.org/D64867 Files: include/clang/Basic/Diagnost

[PATCH] D64867: [OpenCL] Update comments/diagnostics to refer to C++ for OpenCL mode

2019-07-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:414 else -llvm_unreachable("Unsupported OpenCL C++ version"); +llvm_unreachable("Unsupported C++ version for OpenCL"); Builder.

[PATCH] D64569: [OpenCL] Improve destructor support in C++ for OpenCL

2019-07-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia 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/D64569/new/ https://reviews.llvm.org/D64569

[PATCH] D59426: [PR41010][OpenCL] Allow OpenCL C style vector initialization in C++

2019-07-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. ping! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59426/new/ https://reviews.llvm.org/D59426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D64569: [OpenCL] Improve destructor support in C++ for OpenCL

2019-07-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. The commit has been reverted due to issues with libc++: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190715/279833.html However, without this change dtors are largely not usable in OpenCL due to ICE on wrong IR. I would like to be able to fix this on the

[PATCH] D65102: [OpenCL] Rename lang mode flag for C++ mode

2019-07-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, neil.hickey, kpet. Herald added subscribers: ebevhan, yaxunl. This suggestion was made in https://reviews.llvm.org/D64418?id=210101#inline-579453 but I am changing this standalone here. I see two benefits for this rename: - Al

[PATCH] D65102: [OpenCL] Rename lang mode flag for C++ mode

2019-07-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 211315. Anastasia added a comment. - Fixed `LANGSTANDARD_ALIAS_DEPR` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65102/new/ https://reviews.llvm.org/D65102 Files: include/clang/Driver/Options.td include/clang/Frontend/LangStandards.def li

[PATCH] D65102: [OpenCL] Rename lang mode flag for C++ mode

2019-07-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: include/clang/Frontend/LangStandards.def:177 LANGSTANDARD_ALIAS_DEPR(opencl20, "CL2.0") +LANGSTANDARD_ALIAS_DEPR(opencl20, "CLC++") kpet wrote: > Shouldn't this be `opencl

[PATCH] D65102: [OpenCL] Rename lang mode flag for C++ mode

2019-07-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 211320. Anastasia added a comment. Use -cl-std=CLC++ spelling for test/CodeGenOpenCLCXX/addrspace-with-class.cl CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65102/new/ https://reviews.llvm.org/D65102 Files: include/clang/Driver/Options.td in

[PATCH] D65102: [OpenCL] Rename lang mode flag for C++ mode

2019-07-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D65102#1597651 , @kpet wrote: > Hmm, maybe we need to make sure that one of the tests is using a C++ feature > and building with `CLC++`. This would have caught the mistake. That's right! The only test we had wasn't using a

[PATCH] D65102: [OpenCL] Rename lang mode flag for C++ mode

2019-07-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: include/clang/Frontend/LangStandards.def:177 LANGSTANDARD_ALIAS_DEPR(opencl20, "CL2.0") +LANGSTANDARD_ALIAS_DEPR(openclcpp, "CLC++") svenvh wrote: > It surprised me that t

[PATCH] D65286: [OpenCL] Allow OpenCL C style vector initialization in C++

2019-07-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, rsmith, mantognini. Herald added subscribers: ebevhan, yaxunl. I am recreating the review from https://reviews.llvm.org/D59426 that seem to get lost somehow. The idea is to be able to allow creating vector literals from other

[PATCH] D59426: [PR41010][OpenCL] Allow OpenCL C style vector initialization in C++

2019-07-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia abandoned this revision. Anastasia added a comment. Created a follow up review in https://reviews.llvm.org/D65286 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59426/new/ https://reviews.llvm.org/D59426 ___ cfe-commits mailing lis

[PATCH] D65294: Make the CXXABIs respect the target's default calling convention.

2019-07-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! This should probably go to release 9.0? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65294/new/ https://reviews.llvm.org/D65294 __

[PATCH] D65286: [OpenCL] Allow OpenCL C style vector initialization in C++

2019-07-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D65286#1601404 , @rjmccall wrote: > Wait, plain C++? Do we currently allow this syntax outside of OpenCL? Ok I looked into this again and it seems apparently vector initialization and literals in C++ have different syntax.

[PATCH] D65286: [OpenCL] Allow OpenCL C style vector initialization in C++

2019-07-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 212350. Anastasia added a comment. - Merged test/CodeGenOpenCL/vector_literals_nested.cl into test/CodeGenOpenCL/vector_literals_valid.cl - Added negative test case for C++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65286/new/ https://reviews.

[PATCH] D65286: [OpenCL] Allow OpenCL C style vector initialization in C++

2019-07-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D65286#1606071 , @mantognini wrote: > In `vector_literals_nested.cl`, we have tests for (global) constants. Do you > think it would be worth testing those as well in C++ mode? Maybe the two > files (`vector_literals_nested.c

[PATCH] D65286: [OpenCL] Allow OpenCL C style vector initialization in C++

2019-07-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 212358. Anastasia added a comment. - Removed another duplicate file and added testing of constant program scope initializers into vector_literals_nested.cl CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65286/new/ https://reviews.llvm.org/D65286

[PATCH] D62574: Initial draft of target-configurable address spaces.

2019-07-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/AST/ASTContext.h:2598 + /// Returns true if address space A overlaps with B. + bool isAddressSpaceOverlapping(LangAS A, LangAS B) const { +// A overlaps with B if either is a superset of the other.

[PATCH] D65456: [OpenCL] Add generic type handling for builtin functions

2019-08-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/OpenCLBuiltins.td:51 -// Helper class to store type access qualifiers (volatile, const, ...). -class Qualifier { - string QualName = _QualName; Are the qualifiers added elsewhere? Com

[PATCH] D65286: [OpenCL] Allow OpenCL C style vector initialization in C++

2019-08-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D65286#1614239 , @ebrevnov wrote: > Please be aware about build bot failure > (http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-full-sh/builds/2185) > most likely caused by this change. Thanks! I believe it is now fix

[PATCH] D65744: [PR42707][OpenCL] Fix addr space deduction for auto

2019-08-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added subscribers: ebevhan, yaxunl. A regression was introduced in D64400 because auto is using the same logic as templates. However, deduction of addr spaces wasn't working correctly

[PATCH] D65941: [OpenCL] Fix lang mode predefined macros for C++ mode

2019-08-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: svenvh. Herald added subscribers: ebevhan, yaxunl. We should only avoid adding `__OPENCL_C_VERSION__`, all other predefined macros about the language mode are still valid. This change also fixes the language version check in the header

[PATCH] D66080: [OpenCL] Ignore parentheses for sampler initialization

2019-08-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66080/new/ https://reviews.llvm.org/D66080 ___

[PATCH] D66137: [OpenCL][PR42385] Improve addr space deduction for pointers/references to arrays

2019-08-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, rjmccall. Herald added subscribers: ebevhan, yaxunl. Anastasia retitled this revision from "[OpenCL][PR42385]Improve addr space deduction for pointers/references to arrays" to "[OpenCL][PR42385] Improve addr space deduction for p

<    1   2   3   4   5   6   7   8   9   10   >