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

2019-08-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D65744#1626563 , @rjmccall wrote: > Isn't the general rule for template argument deduction (which this devolves > to) just to ignore top-level qualifiers? And then you can substitute in the > substituted type and end up wit

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

2019-08-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/OpenCLBuiltins.td:222 +// GenType definitions. +def FGenTypeN : GenericType<"FGenTypeN", TLFloat, VecAndScalar>; +// Generate basic GenTypes. Names are like: GenTypeFloatVecAndScalar. svenvh wrote: >

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

2019-08-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D65744#1627589 , @rjmccall wrote: > I see. Is the deduction rule recursive or something, where a pointer to > pointer is inferred to point to the same address space as the pointee? It is recursive indeed and we currently d

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

2019-08-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 215106. Anastasia marked 26 inline comments as done. Anastasia added a comment. Addressed various comments from Kevin. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64418/new/ https://reviews.llvm.org/D64418 Files: docs/LanguageExtensions.rst

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

2019-08-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 12 inline comments as done and 2 inline comments as done. Anastasia added inline comments. Comment at: docs/LanguageExtensions.rst:327 +.. _languageextensions-builtin-macros: + FYI, this is not part of my change. It was just hard to produce com

[PATCH] D66294: [Docs][OpenCL] Release 9.0 notes for OpenCL

2019-08-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, mantognini, hans. Herald added subscribers: ebevhan, jfb, yaxunl. https://reviews.llvm.org/D66294 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst === --

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

2019-08-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: docs/UsersManual.rst:2771 + +There are only a few restrictions on allowed C++ features. For detailed information +please refer to documentation on Extensions (:doc:`LanguageExtensions`). svenvh wrote: > Anastasia wrot

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

2019-08-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 215562. Anastasia marked an inline comment as done and 2 inline comments as not done. Anastasia added a comment. - Addressed comments from Sven. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64418/new/ https://reviews.llvm.org/D64418 Files: doc

[PATCH] D66294: [Docs][OpenCL] Release 9.0 notes for OpenCL

2019-08-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 215591. Anastasia marked 5 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66294/new/ https://reviews.llvm.org/D66294 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst ==

[PATCH] D66294: [Docs][OpenCL] Release 9.0 notes for OpenCL

2019-08-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: docs/ReleaseNotes.rst:173 + +- Added initial support for implicitly including OpenCL BIFs using + efficient trie lookup generated by TableGen. A corresponding svenvh wrote: > mantognini wrote: > > If the BIF acronym w

[PATCH] D66294: [Docs][OpenCL] Release 9.0 notes for OpenCL

2019-08-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 215598. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66294/new/ https://reviews.llvm.org/D66294 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst === --- docs/ReleaseNotes.

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

2019-08-19 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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65456/new/ https://reviews.llvm.org/D65456 ___ cfe-commits mailing lis

[PATCH] D66294: [Docs][OpenCL] Release 9.0 notes for OpenCL

2019-08-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 215894. Anastasia added a comment. - Added empty line and ; as requested on the review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66294/new/ https://reviews.llvm.org/D66294 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst

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

2019-08-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 215922. Anastasia added a comment. Added small corrections in various parts. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64418/new/ https://reviews.llvm.org/D64418 Files: docs/LanguageExtensions.rst docs/UsersManual.rst Index: docs/UsersMa

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

2019-06-21 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] D62413: [OpenCL][PR41727] Prevent ICE on global dtors

2019-06-21 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] D63710: [SYCL] Re-use OpenCL sampler in SYCL device mode

2019-07-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > For instance, OpenCL kernel in SYCL mode initializes lambda captures with > the kernel argument values. This initialization code for sampler emits > errors because OpenCL disallows sampler on the right hand side of the > binary operators - these are supposed to be u

[PATCH] D63876: [OpenCL] Define CLK_NULL_EVENT without cast

2019-07-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. btw, there seems to be the same issue with `reserve_id_t`? Comment at: lib/Headers/opencl-c-base.h:416 #define CLK_NULL_QUEUE 0 -#define CLK_NULL_EVENT (__builtin_astype(((void*)(__SIZE_MAX__)), clk_event_t)) +#define CLK

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

2019-07-02 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] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-07-02 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] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-07-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 207562. Anastasia added a comment. - Removed diagnostic for address space in return type in tree transforms CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62584/new/ https://reviews.llvm.org/D62584 Files: lib/Sema/SemaDecl.cpp lib/Sema/SemaTyp

[PATCH] D64074: [OpenCL][Sema] Fix builtin rewriting

2019-07-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I would say in the interest of saving testing time running one of those test in C++ mode should be enough. Comment at: clang/lib/Sema/SemaExpr.cpp:5411 OverloadParams, EPI); - DeclContext *Parent = Co

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

2019-07-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 207574. Anastasia added a comment. Added a target hook to query address spaces with the largest pointer width. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62413/new/ https://reviews.llvm.org/D62413 Files: lib/CodeGen/CGDeclCXX.cpp lib/CodeG

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

2019-07-02 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 would suggest to wait a day or two before committing just in case John has any feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D64074: [OpenCL][Sema] Fix builtin rewriting

2019-07-03 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! Comment at: clang/include/clang/Basic/Builtins.def:1516 // OpenCL v2.0 s6.13.9 - Address space qualifier functions. +// FIXME Pointer parameters of OpenC

[PATCH] D63876: [OpenCL] Define CLK_NULL_EVENT without cast

2019-07-03 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! If you like you can also change reserve_id_t. :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63876/new/ https://reviews.llvm.org/D63876

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

2019-07-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, mantognini. Herald added subscribers: ebevhan, yaxunl. Addr space of a template arg doesn't affect the `QualType` of template specialization. Therefore addr space of a template specialization can be deduced during parsing of

[PATCH] D64409: [libclang] Fix hang in release / assertion in debug when evaluating value-dependent types.

2019-07-09 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/D64409/new/ https://reviews.llvm.org/D64409

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

2019-07-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, mantognini, stuart, neil.hickey. Herald added subscribers: ebevhan, yaxunl. Added documentation of C++ for OpenCL mode into Clang User Manual and Language Extensions document. https://reviews.llvm.org/D64418 Files: docs/Lang

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

2019-07-10 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: > All of this can be much simpler: > > ``` > LangAS

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

2019-07-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 208993. Anastasia marked 2 inline comments as done. Anastasia added a comment. - Added handling of similar test case with `InjectedClassNameType` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64400/new/ https://reviews.llvm.org/D64400 Files: in

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

2019-07-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done and 2 inline comments as done. Anastasia added inline comments. Comment at: include/clang/AST/Type.h:6512 +inline bool Type::isTemplateSpecializationType() const { + return isa(this); +} rjmccall wrote: > This is a suga

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

2019-07-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/CodeGen/TargetInfo.h:274 +return LangAS::Default; + } + rjmccall wrote: > This target hook should just return the address space of the `__cxa_atexit` > argument, no

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

2019-07-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 209012. Anastasia added a comment. Changed API for target hook. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62413/new/ https://reviews.llvm.org/D62413 Files: lib/CodeGen/CGDeclCXX.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/ItaniumCXXAB

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

2019-07-10 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] D62413: [OpenCL][PR41727] Prevent ICE on global dtors

2019-07-11 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] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 209205. Anastasia added a comment. - Moved addr space inference of pointee type into template instantiation. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64400/new/ https://reviews.llvm.org/D64400 Files: lib/Sema/TreeTransform.h test/SemaOpe

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

2019-07-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:7421 + // - template specialization as addr space in template argument doesn't + // affect specialization. + (T->isDependentType() && (!T->isPointerType

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

2019-07-11 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: > > > All of t

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. The overall structure looks very clear now! I just have a couple of nitpicks! Thank you! Comment at: clang/include/clang/Basic/OpenCLBuiltins.td:11 +// +// This file contains data structures representing OpenCL builtin functions +// prototypes. In ca

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

2019-05-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 3 inline comments as done. Anastasia added inline comments. Comment at: lib/Sema/SemaInit.cpp:3771 else { - // C++ [over.match.copy]p1: - // - When initializing a temporary to be bound to the first parameter - // of a constructor [for ty

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

2019-05-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added a subscriber: ebevhan. Anastasia edited the summary of this revision. Anastasia marked 3 inline comments as done. Anastasia added inline comments. Comment at: lib/Sema/SemaInit.cpp:3771 else

[PATCH] D59988: [PR41276] Generate address space cast of 'this' for objects attributed by an address space in C++

2019-05-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: test/CodeGenCXX/address-space-of-this.cpp:9 +//CHECK: call void @_ZN6MyTypeC1Ei(%struct.MyType* addrspacecast (%struct.MyType addrspace(10)* @m to %struct.MyType*), i32 123) +MyType __attrib

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/include/clang/Basic/OpenCLBuiltins.td:243 +// == Builtin definitions == +// This section defines builtin functions found in the OpenCL 1.2 specification + Anastasia wrote: > found in -> from ping!

[PATCH] D62181: [OpenCL] Support pipe keyword in C++ mode

2019-05-21 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/D62181/new/ https://reviews.llvm.org/D62181 ___

[PATCH] D62208: [OpenCL] Enable queue_t and clk_event_t comparisons in C++ mode

2019-05-22 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/D62208/new/ https://reviews.llvm.org/D62208 ___

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

2019-05-22 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]; +} Ok, I thought the earlier request was not to add undocumented attributes with the spelling? Also did `__kerne

[PATCH] D62299: [PR41567][Sema] Fixed cast kind in addr space conversions

2019-05-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added a subscriber: ebevhan. This change sets missing cast kind correctly in the address space conversion case. https://reviews.llvm.org/D62299 Files: lib/Sema/SemaCast.cpp test/CodeGenOpenCLCXX/addrspace-convers

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

2019-05-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. //**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 C++ i.e. using function pointers in kernel code is likely to cause issues? Also

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-23 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! Please address the minor nitpicks suggested here in your final commit. Comment at: clang/include/clang/Basic/OpenCLBuiltins.td:16 +// -Builtins.def, co

[PATCH] D62197: [OpenCL] Fix file-scope const sampler variable for 2.0

2019-05-23 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. Makes sense. LGTM! Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62197/new/ https://reviews.llvm.org/D62197 ___ cfe-commit

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

2019-05-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 201011. Anastasia added a comment. - Switched back to loop over all method qualifiers - Moved addr space check into `AddOverloadCandidate` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62156/new/ https://reviews.llvm.org/D62156 Files: include/c

[PATCH] D62335: [OpenCL][PR41963] Add overloads of old atomics with generic pointer type in C++ mode

2019-05-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: svenvh. Herald added subscribers: ebevhan, jfb, yaxunl. The direction is to allow it as an extension to the kernel language 2.0 and above. https://github.com/KhronosGroup/OpenCL-Docs/issues/66 For the published OpenCL C spec there mig

[PATCH] D62335: [OpenCL][PR41963] Add overloads of old atomics with generic pointer type in C++ mode

2019-05-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 201165. Anastasia added a comment. Fixed `atomic_max` and `atomic_min`. Thanks to David for pointing this out on the bug! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62335/new/ https://reviews.llvm.org/D62335 Files: lib/Headers/opencl-c.h

[PATCH] D62377: [OpenCL] Add support for the cl_arm_integer_dot_product extensions

2019-05-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. This deserves at least a link to the published spec in the description! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62377/new/ https://reviews.llvm.org/D62377 ___ cfe-commits mailing list

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

2019-05-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 201228. Anastasia marked an inline comment as done. Anastasia added a comment. - Added candidates as not viable - Added dedicated diagnostic note - Added assert CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62156/new/ https://reviews.llvm.org/D621

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

2019-05-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:8229 + if (FTI.hasMethodTypeCVRUQualifiers()) { +FTI.MethodQualifiers->forEachCVRUQualifier( [&](DeclSpec::TQ TypeQual, StringRef QualName, SourceLocation SL) { rjmccall wrote: >

[PATCH] D62377: [OpenCL] Add support for the cl_arm_integer_dot_product extensions

2019-05-24 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/D62377/new/ https://reviews.llvm.org/D62377 ___

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

2019-05-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added subscribers: ebevhan, yaxunl. Preserve address spaces of global objects while generating 'atexit' stub. https://reviews.llvm.org/D62413 Files: lib/CodeGen/CGDeclCXX.cpp lib/CodeGen/CodeGenModule.cpp lib/Co

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

2019-05-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D60455#1518178 , @bader wrote: > In D60455#1513499 , @Anastasia wrote: > > > //**Design question**//: since you are not aware what functions are to be > > run on a device while parsing

[PATCH] D62584: [OpenCL][PR42033] Deducing addr space of pointer/reference with template parameter types

2019-05-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, mantognini. Herald added subscribers: ebevhan, yaxunl. If dependent types appear in pointers or references we have to allow the addr space deduction because the addr space in template argument will belong to the pointee and no

[PATCH] D62588: [OpenCL] Support logical vector operators in C++ mode

2019-05-29 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/D62588/new/ https://reviews.llvm.org/D62588 ___

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

2019-05-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, mantognini. Herald added subscribers: ebevhan, yaxunl. Similar to typedefs we shouldn't deduce addr space in type alias. https://reviews.llvm.org/D62591 Files: lib/Sema/SemaType.cpp test/SemaOpenCLCXX/address-space-deduct

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Apart from small improvement that can done before committing if it works at all. :) Comment at: lib/Sema/SemaType.cpp:5169 +TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S, +

[PATCH] D55656: [OpenCL] Address space for default class members

2018-12-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/ASTContext.cpp:2781 + + return getAddrSpaceQualType(NewT, Orig.getAddressSpace()); } rjmccall wrote: > You're trying to handle a method qualifier, not a type a functions that are > themselves in some non-sta

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added a subscriber: yaxunl. This patch allows qualifying methods with address spaces and extends some overloading rules to use those qualifiers. The main use case is to prevent conversions to generic/default address sp

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 178767. Anastasia added a comment. Removed FIXME that has been addressed CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55850/new/ https://reviews.llvm.org/D55850 Files: lib/Parse/ParseDecl.cpp lib/Sema/SemaOverload.cpp lib/Sema/SemaType.cpp

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaOverload.cpp:2828 // FIXME: OpenCL: Need to consider address spaces unsigned FromQuals = FromFunction->getTypeQuals().getCVRUQualifiers(); I am still mis

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 178904. Anastasia marked an inline comment as done. Anastasia added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55850/new/ https://reviews.llvm.org/D55850 Files: lib/Parse/ParseDecl.cpp lib/Sema/SemaOverl

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Parse/ParseDecl.cpp:6162 +} + } + rjmccall wrote: > This is enforcing a restriction that users write `const __private`, which > seems unreasonable. It looks like `ParseTypeQualifierList` takes a flag

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D55850#1335826 , @rjmccall wrote: > You're gating on OpenCL C++ in several places in this patch, but I don't > think you need to. This extension should be available to anyone using > address spaces and C++. Ok, I am happy

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2018-12-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added a subscriber: jfb. Rather than duplicating data fields, use DeclSpec directly to store qualifiers for the functions/methods. This change is discussed in the following comment: https://reviews.llvm.org/D55850#inli

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDecl.cpp:6162 +} + } + rjmccall wrote: > Anastasia wrote: > > rjmccall wrote: > > > This is enforcing a restriction that users write `const __priv

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2018-12-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 179469. Anastasia added a comment. - Changed to store DeclSpec only when quals are present. - Renamed to MethodQualifiers. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55948/new/ https://reviews.llvm.org/D55948 Files: include/clang/Sema/DeclSp

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2018-12-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 3 inline comments as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDecl.cpp:6129 + // create DeclSpec here to be populated later. + DS = new DeclSpec(AttrFactory); + rjmccall wrote: > Is it possible to just build int

[PATCH] D56066: [OpenCL] Address space for default class members

2018-12-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, ebevhan. Herald added a subscriber: yaxunl. Fixed several issues reported in https://reviews.llvm.org/D55656 and https://reviews.llvm.org/D54862 - mainly removed addr space from the `QualType` of the method itself. This shoul

[PATCH] D55656: [OpenCL] Address space for default class members

2018-12-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/ASTContext.cpp:2781 + + return getAddrSpaceQualType(NewT, Orig.getAddressSpace()); } ebevhan wrote: > rjmccall wrote: > > Anastasia wrote: > > > rjmccall wrote: > > > > You're trying to handle a method qualif

[PATCH] D55656: [OpenCL] Address space for default class members

2018-12-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia requested changes to this revision. Anastasia added a comment. This revision now requires changes to proceed. @mikael can you please close this review, because I opened another one to continue this: https://reviews.llvm.org/D56066. Thanks for your work! Repository: rC Clang CHANGE

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaOverload.cpp:9279 +(CandAS1 != LangAS::opencl_generic && CandAS1 != LangAS::Default)) + return true; + } rjmccall wrote: > rjmccall wrote: > > This

[PATCH] D56198: [Basic] Extend DiagnosticEngine to store and format Qualifiers

2019-01-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. This is a follow up patch from the following review comment: https://reviews.llvm.org/D55850?id=178767#inline-495051 https://reviews.llvm.org/D56198 Files: include/clang/AST/Type.h include/clang/Basic/Diagnostic.h inc

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2019-01-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaOverload.cpp:2828 // FIXME: OpenCL: Need to consider address spaces unsigned FromQuals = FromFunction->getTypeQuals().getCVRUQualifiers(); rjmccall wrote

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 179877. Anastasia marked an inline comment as done. Anastasia added a comment. Addressed review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55948/new/ https://reviews.llvm.org/D55948 Files: include/clang/Sema/DeclSpec.h lib/Parse/

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2368 } }; + DeclSpecCheck(DeclSpec::TQ_const, "const", DS.getConstSpecLoc()); rjmccall wrote: > Please remove this dead semico

[PATCH] D56198: [Basic] Extend DiagnosticEngine to store and format Qualifiers

2019-01-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 179887. Anastasia added a comment. Addressed review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56198/new/ https://reviews.llvm.org/D56198 Files: include/clang/AST/Type.h include/clang/Basic/Diagnostic.h include/clang/Basic/Diag

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: lib/Sema/DeclSpec.cpp:220 + + I.Fun.QualAttrFactory = nullptr; + rjmccall wrote: > Spacing? I am keeping the old formatting from the lines 195-204. But obviously it

[PATCH] D56066: [OpenCL] Address space for default class members

2019-01-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 179899. Anastasia added a comment. Addressed review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56066/new/ https://reviews.llvm.org/D56066 Files: include/clang/Sema/Sema.h lib/CodeGen/CGCall.cpp lib/Sema/SemaDecl.cpp lib/Sema/

[PATCH] D56066: [OpenCL] Address space for default class members

2019-01-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/CodeGen/CGCall.cpp:78 +RecTy = Context.getAddrSpaceQualType( +RecTy, MD->getTypeQualifiers().getAddressSpace()); return Context.getPointerType(CanQualType::CreateUnsafe(Rec

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:8175 DeclaratorChunk::FunctionTypeInfo &FTI = D.getFunctionTypeInfo(); - if (FTI.TypeQuals != 0) { -if (FTI.TypeQuals & Qualifiers::Const) - Diag(D.getId

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 180226. Anastasia marked an inline comment as done. Anastasia added a comment. - Added `forEachQualifiers` to `DeclSpec`. - Removed dead code. - Moved lambdas definition inline into the function parameters. CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:8175 DeclaratorChunk::FunctionTypeInfo &FTI = D.getFunctionTypeInfo(); - if (FTI.TypeQuals != 0) { -if (FTI.TypeQuals & Qualifiers::Const) - Diag(D.getIdentifierLoc(), diag::err_invalid_qualified_c

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 180464. Anastasia added a comment. Added `hasMethodTypeQualifiers` method. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55948/new/ https://reviews.llvm.org/D55948 Files: include/clang/Sema/DeclSpec.h lib/Parse/ParseDecl.cpp lib/Parse/Parse

[PATCH] D56066: [OpenCL] Address space for default class members

2019-01-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaInit.cpp:4539 + if (InitCategory.isPRValue() || InitCategory.isXValue()) +T1Quals.removeAddressSpace(); + rjmccall wrote: > ebevhan wrote: > > rjmccall wrot

[PATCH] D56066: [OpenCL] Address space for default class members

2019-01-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 181112. Anastasia added a comment. Modified conversion sequence to perform address space conversion after temporary materialization conversion. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56066/new/ https://reviews.llvm.org/D56066 Files: inc

[PATCH] D56066: [OpenCL] Address space for default class members

2019-01-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 181114. Anastasia added a comment. Removed FIXME that this patch fixes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56066/new/ https://reviews.llvm.org/D56066 Files: include/clang/Sema/Sema.h lib/AST/Expr.cpp lib/CodeGen/CGCall.cpp lib/

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

2019-09-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 219903. Anastasia added a comment. - Move addr space deduction to a later phase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65744/new/ https://reviews.llvm.org/D65744 Files: clang/include/clang/AST/Type.h clang/include/clang/Sema/Sema.h

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

2019-09-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:5998 +QualType Type = Var->getType(); +if (Type->isSamplerT() || Type->isVoidType()) + return; I don't seem to need a check for depen

[PATCH] D67713: [OpenCL] Add image query builtin functions

2019-09-24 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/D67713/new/ https://reviews.llvm.org/D67713 ___

[PATCH] D67714: [OpenCL] Add -Wconversion to fdeclare-opencl-builtins test

2019-09-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:102 // expected-error@-2{{implicit declaration of function 'get_sub_group_size' is invalid in OpenCL}} +// expected-error@-3{{implicit conversion changes signedness: 'int' to 'uint'

[PATCH] D67714: [OpenCL] Add -Wconversion to fdeclare-opencl-builtins test

2019-09-24 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! Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:102 // expected-error@-2{{implicit declaration of function 'get_sub_group_size' is invalid in Open

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

2019-09-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:6721 + if (getLangOpts().OpenCL) { + rjmccall wrote: > Since you're moving this code anyway, can this be split into its own > function? I'm n

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