[PATCH] D48419: [OpenCL] Fixed parsing of address spaces for C++

2018-06-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D48419#1139799, @yaxunl wrote: > In https://reviews.llvm.org/D48419#1139749, @Anastasia wrote: > > > In https://reviews.llvm.org/D48419#1139601, @yaxunl wrote: > > > > > Did you notice the bug that C++ silently allows implicit casting of a >

[PATCH] D52292: [Sema][OpenCL] Improve diagnostics for not viable overloadable function candidates

2018-10-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! https://reviews.llvm.org/D52292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D51402: [OpenCL] Adding cl_intel_planar_yuv extension

2018-10-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D51402#1252619, @sidorovd wrote: > @Anastasia , since there is a problem I described, wouldn't you mind if I > stay with the first iteration of the patch (adding the extension to > OpenCLExtensions.def) and after we'll investigate what is w

[PATCH] D51484: [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension

2018-10-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. It would be good to test your `CIndex` changes in `test/Index/opencl-types.cl`. Comment at: test/SemaOpenCL/intel-subgroup-avc-ext-types.cl:26 + char4 c4, event_t e, struct st ss) { + intel_sub_group_avc_mce_payload_t payload_mce = 0; // No z

[PATCH] D52598: [OpenCL] Fixed address space cast in C style cast of C++ parsing

2018-10-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in r344148. The review link was forgotten and therefore didn't get closed automatically. https://reviews.llvm.org/D52598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D52654: [OpenCL][NFC] Unify ZeroToOCL* cast types

2018-10-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! https://reviews.llvm.org/D52654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D53200: [OpenCL] Fix serialization of OpenCLExtensionDecls

2018-10-19 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: test/Headers/opencl-pragma-extension-begin.cl:1 +// RUN: rm -rf %t +// RUN: mkdir -p %t I think the tests in this folder are for standa

[PATCH] D51402: [OpenCL] Adding cl_intel_planar_yuv extension

2018-10-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! https://reviews.llvm.org/D51402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D51484: [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension

2018-10-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Headers/opencl-c.h:16197 +#ifdef cl_intel_device_side_avc_motion_estimation +#pragma OPENCL EXTENSION cl_intel_device_side_avc_motion_estimation : enable + Anastasia wrote: > Should we be using: > #pragma OPENCL

[PATCH] D53295: Mark store and load of block invoke function as invariant.group

2018-10-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Btw, blocks w/o captures are already optimized into regular calls? https://reviews.llvm.org/D53295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53200: [OpenCL] Fix serialization of OpenCLExtensionDecls

2018-10-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! Comment at: test/SemaOpenCL/extension-begin.cl:43 g(0); // expected-error {{no matching function for call to 'g'}} -// expected-note@-26 {{cand

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-10-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, yaxunl. I first enabled AS deduction for references that allowed to inherit the right conversion diagnostics based on qualification conversion rules implemented earlier for the pointer type. Then in order to tests the deducti

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-10-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/Expr.cpp:1609 case CK_AddressSpaceConversion: -assert(getType()->isPointerType() || getType()->isBlockPointerType()); -assert(getSubExpr()->getType()->isPointerType() || - getSubExpr()->getType()->isBlockPo

[PATCH] D51484: [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension

2018-10-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! Comment at: test/SemaOpenCL/intel-subgroup-avc-ext-types.cl:5 + +// All intel_sub_group_avc_* types can only be used as argument or return value +// of bu

[PATCH] D53200: [OpenCL] Fix serialization of OpenCLExtensionDecls

2018-10-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/extension-begin.cl:43 g(0); // expected-error {{no matching function for call to 'g'}} -// expected-note@-26 {{candidate unavailable as it requires OpenCL extension 'my_ext' to be disabled}} -// expe

[PATCH] D53705: [OpenCL] Postpone PSV address space diagnostic

2018-10-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D53705#1279086, @rjmccall wrote: > In https://reviews.llvm.org/D53705#1279068, @svenvh wrote: > > > Unlikely, since address spaces are provided in a different way in OpenCL > > C++ vs OpenCL C. > > > > OpenCL C provides qualifiers such as `g

[PATCH] D53809: Fix invalid address space generation for clk_event_t

2018-10-30 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! Could you please add prefix `[OpenCL]` in the final commit title. Repository: rC Clang https://reviews.llvm.org/D53809 ___

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

2018-10-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D43783#1272001, @AlexeySotkin wrote: > In https://reviews.llvm.org/D43783#1215573, @Anastasia wrote: > > > In https://reviews.llvm.org/D43783#1212485, @yaxunl wrote: > > > > > In https://reviews.llvm.org/D43783#1204353, @svenvh wrote: > > > >

[PATCH] D53705: [OpenCL] Postpone PSV address space diagnostic

2018-10-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. FYI, I have created a bug to the OpenCL C++ spec: https://github.com/KhronosGroup/OpenCL-Docs/issues/13. Gladly, we now moved into discussing the issues publicly. So anyone can create bugs and also participate in discussions. I would like to feed all of the suggestio

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

2019-01-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 181256. Anastasia added a comment. - Set correctly value kind of address space conversion after materializing the temporary - Removed changes in various places including CodeGen for address space conversion that became unnecessary after the AST is generate

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

2019-01-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 6 inline comments as done. Anastasia added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:813 + case CK_AddressSpaceConversion: { +Visit(E->getSubExpr()); +break; rjmccall wrote: > If there's a `Dest`, you might need to reverse-c

[PATCH] D56646: [OpenCL] opencl-c.h: read_image*(): sampler-less, and image{1, 2}d_array_t variants are OpenCL-1.2+, mark them as such

2019-01-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! Overall I feel we need to find some way to test the header better... Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56646/new/ https://reviews.llvm.

[PATCH] D56735: [OpenCL] Fix overloading ranking rules to work correctly for address space coversions

2019-01-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added a subscriber: yaxunl. This bug was pointed out in https://reviews.llvm.org/D55850#inline-496966 https://reviews.llvm.org/D56735 Files: lib/Sema/SemaOverload.cpp test/SemaOpenCLCXX/address_space_overloading.c

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

2019-01-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 181825. Anastasia added a comment. Rebased on top of recent related changes and addressed remaining review comments. This now depends on: https://reviews.llvm.org/D56735 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55850/new/ https://reviews.ll

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

2019-01-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 3 inline comments as done. Anastasia added inline comments. Comment at: lib/Sema/SemaOverload.cpp:9279 +(CandAS1 != LangAS::opencl_generic && CandAS1 != LangAS::Default)) + return true; + } rjmccall wrote: > Anastasia wrote: > > rjm

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

2019-01-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added a comment. In D55850#1358812 , @rjmccall wrote: > Okay, so is this ready to re-review independently? Yes, please. It should be fine to review on its own. Thanks! CHANGES SINCE LAST ACTION ht

[PATCH] D56735: [OpenCL] Fix overloading ranking rules to work correctly for address space coversions

2019-01-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D56735#1358222 , @rjmccall wrote: > Is there a reason not to just do `T1.getQualifiers() == T2.getQualifiers()`? I tried this but it causes ObjC test to fail test/SemaObjCXX/arc-overloading.mm. 38 // Simple overloading

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

2019-01-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 182012. Anastasia added a comment. Fixed wording on the comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55850/new/ https://reviews.llvm.org/D55850 Files: include/clang/Sema/ParsedAttr.h lib/Parse/ParseDecl.cpp lib/Sema/SemaOverload.c

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

2019-01-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments 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] D56792: Rename getTypeQualifiers to getMethodQualifiers

2019-01-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added subscribers: arphaman, eraman. Use more descriptive name for the method qualifiers getter. This change was suggested in https://reviews.llvm.org/D56066?id=179477#inline-496961 https://reviews.llvm.org/D56792 F

[PATCH] D56735: [OpenCL] Fix overloading ranking rules to work correctly for address space conversions

2019-01-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 182084. Anastasia added a comment. - Changed the condition to use all qualifiers except for ObjC ownership ones. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56735/new/ https://reviews.llvm.org/D56735 Files: lib/Sema/SemaOverload.cpp test/Se

[PATCH] D56735: [OpenCL] Fix overloading ranking rules to work correctly for address space conversions

2019-01-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 182245. Anastasia added a comment. Improved test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56735/new/ https://reviews.llvm.org/D56735 Files: lib/Sema/SemaOverload.cpp test/SemaOpenCLCXX/address_space_overloading.cl Index: test/SemaOpen

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

2019-01-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 182281. Anastasia marked an inline comment as done. Anastasia added a comment. - Removed else case in DiagnoseMultipleAddrSpaceAttributes - Added extra test to check correctness of addr space for 'this' when statically used in a class scope. CHANGES SINCE

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

2019-01-17 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:6170 + } +} + } rjmccall wrote: > Does this not need to diagnose redundant qualifiers? Why is this path > required in addition

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

2019-01-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 182282. Anastasia added a comment. - Fixed typo in FIXME CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55850/new/ https://reviews.llvm.org/D55850 Files: include/clang/AST/Type.h include/clang/Sema/ParsedAttr.h lib/Parse/ParseDecl.cpp lib/

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

2019-01-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 182496. Anastasia added a comment. Added a comment explaining when multiple address spaces are diagnosed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55850/new/ https://reviews.llvm.org/D55850 Files: include/clang/AST/Type.h include/clang/S

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

2019-01-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. After rebase I had to modify the following test: Index: test/SemaOpenCLCXX/address_space_overloading.cl === --- test/SemaOpenCLCXX/address_space_overloading.cl (revision 351746) +++ test/SemaOpenC

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

2019-01-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D55850#1365437 , @ebevhan wrote: > I'm a bit late to the party here, it was an older patch so I wasn't watching > this one. > > I get a bit miffed when address space related features get locked behind > langoptions that aren

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

2019-01-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D55850#1366094 , @ebevhan wrote: > Okay, sounds good! I'm not a C++ expert, but I'd be happy to look at the > patches when they're up. Haven't done much serious testing on my end so far, > but from what I've seen the patches

[PATCH] D57101: [AST] Fix addr space of result type for dereference operator

2019-01-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. When we dereference a pointer the result of the dereference operation is no longer in the address space of its pointee i.e. __attribute__((address_space(1))) int * a; (*a);// the expression is in the default addr space a

[PATCH] D57101: [AST] Fix addr space of result type for dereference operator

2019-01-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 183108. Anastasia added a comment. - Minot update to the comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57101/new/ https://reviews.llvm.org/D57101 Files: lib/Sema/SemaExpr.cpp test/SemaOpenCLCXX/address_space_overloading.cl Index: t

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

2019-01-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D55850#1366709 , @rjmccall wrote: > Most of the remaining OpenCL checks are for OpenCL-specific logic like > inferring the default address space, and yeah, we could probably make that a > target option or something. We hav

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

2019-01-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D55850#1369008 , @ebevhan wrote: > I think the code that comes to mind is mostly like in > `GetTypeSourceInfoForDeclarator`: > > LangAS AS = > (ASIdx == LangAS::Default ? LangAS::opencl_generic : ASIdx); > > > It's

[PATCH] D57101: [OpenCL] Add generic addr space to the return of implicit assingment

2019-01-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 184052. Anastasia retitled this revision from "[AST] Fix addr space of result type for dereference operator " to "[OpenCL] Add generic addr space to the return of implicit assingment ". Anastasia edited the summary of this revision. Anastasia added a commen

[PATCH] D57442: [OpenGL] Fix test on PPC after r352540

2019-01-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Thanks. Interesting, that test has been committed in Dec. Can you please fix the title in the commit message `[OpenGL]` -> `[OpenCL]`. We are not working on OpenGL yet. :) Repository: rL LLVM CHANGES SINCE LAST ACTION htt

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, ebevhan. Here is my attempt to generalize the earlier work on method overloading with address spaces https://reviews.llvm.org/D55850 to work in C++ mode (not just OpenCL!). This implementation doesn't apply yet to templated a

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 4 inline comments as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2309 + attr.getScopeName(), attr.getScopeLoc(), &AU, + attr.getNumArgs(), ParsedAttr::AS_GNU); +

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-31 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:2303 +auto &Function = DeclaratorInfo.getFunctionTypeInfo(); +auto &MQ = Function.getOrCreateMethodQualifiers(); +for (auto &attr : DeclaratorInfo.getAt

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-31 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:2313 +} + } Anastasia wrote: > ebevhan wrote: > > Is there a reason that the attributes are parsed here and not in > > `ParseFunctionDeclar

[PATCH] D57524: Fix ICE on attempt to add an addr space qual to a type qualified by an addr space

2019-01-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. If `cv2T2` has an address space and we are creating a qualified type `cv1T4` adding new addr space qualifier an ICE is triggered. To avoid this ICE we first create a duplicate of `cv2T2` omitting its original addr space. The

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 172109. Anastasia added a comment. Addressed comments from John. https://reviews.llvm.org/D53764 Files: include/clang/Sema/Sema.h lib/AST/Expr.cpp lib/CodeGen/CGExpr.cpp lib/Sema/DeclSpec.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaExprCXX.cpp li

[PATCH] D54152: [OpenCL] Fix diagnostic message about overload candidates

2018-11-06 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 https://reviews.llvm.org/D54152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D54162: OpenCL: Don't warn on v printf modifier

2018-11-06 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! Seems like a reasonable start. https://reviews.llvm.org/D54162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

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

2018-11-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Could this be tested using diagnostics that prints the type? Like in test/SemaOpenCL/address-spaces.cl. Repository: rC Clang https://reviews.llvm.org/D54258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

[PATCH] D54253: [OpenCL][NFC] Improve test coverage of test/Index/opencl-types.cl

2018-11-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Are these types represented differently wrt targets? Repository: rC Clang https://reviews.llvm.org/D54253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 173334. Anastasia added a comment. Changed the assert for address space conversion. https://reviews.llvm.org/D53764 Files: include/clang/Sema/Sema.h lib/AST/Expr.cpp lib/CodeGen/CGExpr.cpp lib/Sema/DeclSpec.cpp lib/Sema/SemaDecl.cpp lib/Sema/S

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 173693. Anastasia marked an inline comment as done. Anastasia added a comment. - Extended assert - Handled AS of ToType https://reviews.llvm.org/D53764 Files: include/clang/Sema/Sema.h lib/AST/Expr.cpp lib/CodeGen/CGExpr.cpp lib/Sema/DeclSpec.cp

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 173873. Anastasia added a comment. Rewrite how CastKind is set for reference and pointer type. https://reviews.llvm.org/D53764 Files: include/clang/Sema/Sema.h lib/AST/Expr.cpp lib/CodeGen/CGExpr.cpp lib/Sema/DeclSpec.cpp lib/Sema/SemaDecl.cpp

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4289 + /*BasePath=*/nullptr, CCK) + .get(); rjmccall wrote: > Okay. But if `ToType` *isn't* a reference type, this will never be an > address-space

[PATCH] D54253: [OpenCL][NFC] Improve test coverage of test/Index/opencl-types.cl

2018-11-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I am a bit confused about this testing since you are running OpenCL on architectures that aren't supposed to support it. Can you provide more details on why you are doing this? Repository: rC Clang https://reviews.llvm.org/D54253 ___

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

2018-11-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D54258#1296706, @richardmembarth wrote: > CUDA maps `__shared__` internally also to `__attribute__((shared))`: > > #define __annotate__(a) \ > __attribute__((a)) > #define __location__(a) \ > __annotate__(a) > ... >

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 174033. Anastasia added a comment. Fixed check for AS mismatch of pointer type and added missing test case https://reviews.llvm.org/D53764 Files: include/clang/Sema/Sema.h lib/AST/Expr.cpp lib/CodeGen/CGExpr.cpp lib/Sema/DeclSpec.cpp lib/Sema/Se

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4289 + /*BasePath=*/nullptr, CCK) + .get(); rjmccall wrote: > Anastasia wrote: > > rjmccall wrote: > > > Okay. But if `ToType` *isn't* a reference t

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4289 + /*BasePath=*/nullptr, CCK) + .get(); rjmccall wrote: > Anastasia wrote: > > rjmccall wrote: > > > Anastasia wrote: > > > > rjmccall wrote: > >

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 4 inline comments as done. Anastasia added a comment. Do you think there is anything else to do for this patch? Comment at: lib/Sema/SemaExprCXX.cpp:4289 + /*BasePath=*/nullptr, CCK) + .get(); rjmccal

[PATCH] D54253: [OpenCL][NFC] Improve test coverage of test/Index/opencl-types.cl

2018-11-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D54253#1300827, @AlexeySachkov wrote: > I'm running OpenCL on an x886 and everything is fine, but there are a lot of > build bots which build different targets on different architectures. Since > there are no `target` option specified, `c-i

[PATCH] D54634: [OpenCL] Fix address space deduction in template args

2018-11-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, yaxunl. Don't deduce address spaces for non-pointer-like types in template args. This fixes bug reported in https://bugs.llvm.org/show_bug.cgi?id=38603 and enables most of template functionality to work correctly. There is st

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

2018-11-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, yaxunl. When template instantiation leads to creation of invalid code patterns with address spaces compiler crashes with ICE. This patch fixes the template instantiation to provide correct diagnostics instead. https://revie

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

2018-11-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 175120. Anastasia added a comment. Removed FIXME from the test case that is being fixed. https://reviews.llvm.org/D54858 Files: lib/Sema/SemaDecl.cpp lib/Sema/TreeTransform.h test/CodeGenOpenCLCXX/template-address-spaces.cl test/SemaOpenCLCXX/addr

[PATCH] D52879: Derive builtin return type from its definition

2018-11-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! It looks reasonable small change! Repository: rC Clang https://reviews.llvm.org/D52879 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D54253: [OpenCL] Launch opencl-types.cl test only on x86

2018-11-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D54253#1306124, @asavonic wrote: > FWIW, I'd vote for the first revision of this patch. From my > understanding, the test verifies that libclang is able to parse OpenCL > code correctly. It doesn't do anything specific to x86: target for x8

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

2018-11-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGCall.cpp:80 +// used with the same version of generated operators. +RecTy = Context.getAddrSpaceQualType(RecTy, LangAS::opencl_generic); + rjmccall wrote: > I would suggest taking this opportunity

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

2018-11-27 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:4241 + if (SemaRef.getLangOpts().OpenCL && T.getType()->isTemplateTypeParmType()) +Quals.removeAddressSpace(); + rjmccall wrote: > When do you a

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

2018-11-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGCall.cpp:80 +// used with the same version of generated operators. +RecTy = Context.getAddrSpaceQualType(RecTy, LangAS::opencl_generic); + rjmccall wrote: > Anastasia wrote: > > rjmccall wrote: >

[PATCH] D54947: [OpenCL][CodeGen] Fix replacing memcpy with addrspacecast

2018-11-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGCall.cpp:3972 + // we don't want to perform address space cast for it, since that + // leads to casting __private * (default addr space in OpenCL) to + // __global * which is not valid. Create m

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

2018-11-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 175665. Anastasia added a comment. - Changing qualifiers while rebuilding types in TreeTransform is incorrect -> prevent deducing address space instead. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54858/new/ https://reviews.llvm.org/D54858 Fil

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

2018-11-28 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:4241 + if (SemaRef.getLangOpts().OpenCL && T.getType()->isTemplateTypeParmType()) +Quals.removeAddressSpace(); + Anastasia wrote: > rjmccall wro

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

2018-11-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 175698. Anastasia added a comment. Corrected a typo in comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54858/new/ https://reviews.llvm.org/D54858 Files: lib/Sema/SemaDecl.cpp lib/Sema/SemaType.cpp lib/Sema/TreeTransform.h test/Cod

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

2018-11-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 175699. Anastasia marked an inline comment as done. Anastasia added a comment. Removed commented code in the test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54858/new/ https://reviews.llvm.org/D54858 Files: lib/Sema/SemaDecl.cpp lib/Sema/

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

2018-11-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: lib/Sema/TreeTransform.h:5276 +// Return type cann't be qualified with an address space. +if (ResultType.getAddressSpace() != LangAS::Default) { bader wrote: > "can

[PATCH] D55021: Mark __builtin_shufflevector as using custom type checking

2018-11-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55021/new/ https://reviews.llvm.org/D55021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D55022: OpenCL: Extend argument promotion rules to vector types

2018-11-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > The spec is ambiguous on whether vector types are allowed to be > implicitly converted. The only legal context I think this can > be used for OpenCL is printf, where it seems necessary. s6.2.1, seems to say "Implicit conversions between built-in vector data types a

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/format-strings-fixit.cl:13 +void vector_fixits() { +// printf("%f", (int) 123); + printf("%v4f", (int4) 123); Does this not work yet? Comment at: test/SemaOpenCL/printf-format-strin

[PATCH] D55022: OpenCL: Extend argument promotion rules to vector types

2018-11-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! Apart from the test can be changed. Comment at: test/CodeGenOpenCL/printf.cl:2 +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -cl-std=CL1.2 -triple am

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/printf-format-strings.cl:65 +{ +printf("%v4f\n", arg); // expected-warning {{format specifies type 'double __attribute__((ext_vector_type(4)))' but the argument has type 'float2' (vector of 2 'float' values)}} }

[PATCH] D54947: [OpenCL][CodeGen] Fix replacing memcpy with addrspacecast

2018-11-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGCall.cpp:3972 + // we don't want to perform address space cast for it, since that + // leads to casting __private * (default addr space in OpenCL) to + // __global * which is not valid. Create m

[PATCH] D54253: [OpenCL] Launch opencl-types.cl test only on x86

2018-11-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D54253#1307752 , @asavonic wrote: > >> FWIW, I'd vote for the first revision of this patch. From my > >> > >> understanding, the test verifies that libclang is able to parse OpenCL > >> code correctly. It doesn't do anyth

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-30 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: test/SemaOpenCL/printf-format-strings.cl:65 +{ +printf("%v4f\n", arg); // expected-warning {{format specifies type 'double __attribute__(

[PATCH] D55127: [OpenCL] Diagnose conflicting address spaces between template definition and its instantiation

2018-11-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added a subscriber: yaxunl. Added new diagnostics when templates are instantiated with different address space from the one provided in definition. This also prevents deducing generic address space in pointer type of t

[PATCH] D55136: [OpenCL][Sema] Improve BuildResolvedCallExpr handling of builtins

2018-12-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:5556 // Extract the return type from the (builtin) function pointer type. -auto FnPtrTy = Context.getPointerType(FDecl->getType()); +// FIXME Several builtins still have setType in Sema::CheckBuiltin

[PATCH] D55127: [OpenCL] Diagnose conflicting address spaces between template definition and its instantiation

2018-12-03 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:7232 + if (D.getContext() == DeclaratorContext::TemplateArgContext) +// Do not deduce address space for non-pointee type in template arg. +; ---

[PATCH] D54947: [OpenCL][CodeGen] Fix replacing memcpy with addrspacecast

2018-12-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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54947/new/ https://reviews.llvm.org/D54947 ___ cfe-commits mailing lis

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

2018-12-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:4816 +// OpenCLCPlusPlus: A class member function has an address space. +if (state.getSema().getLangOpts().OpenCLCPlusPlus && +state.getDeclarator().getContext() == Can

[PATCH] D55127: [OpenCL] Diagnose conflicting address spaces between template definition and its instantiation

2018-12-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > Can you explain why the changes to `TreeTransform` are required? When address spaces of template parameter and argument are given explicitly they might mismatch. For example, `foo1` (in the test) is instantiated with `__local int` but the template parameter of `foo

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

2018-12-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:4816 +// OpenCLCPlusPlus: A class member function has an address space. +if (state.getSema().getLangOpts().OpenCLCPlusPlus && +state.getDeclarator().getContext() == mik

[PATCH] D55127: [OpenCL] Diagnose conflicting address spaces between template definition and its instantiation

2018-12-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 176793. Anastasia added a comment. Added last corrections before committing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55127/new/ https://reviews.llvm.org/D55127 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaType.cpp li

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

2018-12-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/ItaniumMangle.cpp:1507 +Qualifiers MethodQuals = Qualifiers::fromCVRUMask( +Method->getTypeQualifiers().getCVRUQualifiers()); // We do not consider restrict a distinguishing attribute for overloading --

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

2018-12-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaOverload.cpp:1146 +unsigned OldQuals = OldMethod->getTypeQualifiers().getCVRUQualifiers(); +unsigned NewQuals = NewMethod->getTypeQualifiers().getCVRUQualifiers(); if (!getLangOpts().CPlusPlus14 && NewMethod->

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

2018-12-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:3929 +static TypeSourceInfo * +GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, + TypeSourceInfo *TInfo, From the `state` you can use `getDeclara

[PATCH] D58666: [OpenCL] Undefine cl_intel_planar_yuv extension

2019-02-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/extension-begin.cl:26 + #ifndef IMPLICIT_INCLUDE #include "extension-begin.h" Can we also test that macro `my_ext` is not defined here but defined above? It seems we are not testing anything like thi

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