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

2019-04-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > SYCL is similar to OpenMP 5 for C++, where you use only C++ classes instead > of #pragma. So it is quite C++-friendlier than OpenMP. I am not sure what you mean by friendlier? OpenMP concept is very clear to be - a program written in C/C++ or Fortran can be complime

[PATCH] D60764: Add clang cc1 option to generate OpenCL builtin functions

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

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-04-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added a comment. In D60763#1478672 , @Pierre wrote: > I also think we could reduce the size of the tables. > To sum up how this is working right now: > > 1. The isOpenCLBuiltin(char* functionName) func

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

2019-04-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I think potentially reusing OpenCL features is desirable since the device code of SYCL is largely OpenCL. However I don't think we are clear enough about the overall device compilation flow of SYCL and I can easily suggest a number of different approaches including th

[PATCH] D61304: [OpenCL][PR41609] Deduce static data members to __global addr space

2019-04-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, rjmccall. Herald added subscribers: ebevhan, yaxunl. Similarly to static variables in OpenCL, static class data members should be deduced to `__global` addr space. https://reviews.llvm.org/D61304 Files: lib/Sema/SemaType.cpp

[PATCH] D61274: [Sema][AST] Explicit visibility for OpenCL/CUDA kernels/variables

2019-04-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Seems reasonable for OpenCL kernels. You might want to add an AST dump test to check that the visibility is being set correctly in case it's being printed in AST. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61274/new/ https://review

[PATCH] D61318: [Sema] Prevent binding references with mismatching address spaces to temporaries

2019-04-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, ebevhan. This is a straw-man idea for solving binding references with address spaces to temporaries. If the logic below makes sense I will apply it elsewhere in similar checks. Arbitrary address space references can't be boun

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

2019-04-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. @rjmccall or @ebevhan do you have any more feedback for this patch? Btw, it has now dependency with https://reviews.llvm.org/D61318 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58060/new/ https://reviews.llvm.org/D58060 ___

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I would suggest an IR test, especially since what you want to achieve is addrspacecast in IR output. We use AST dump only if there is no other good way to test something. In fact we already have a test with similar logic that tests various OpenCL address spaces: test/

[PATCH] D61318: [Sema] Prevent binding references with mismatching address spaces to temporaries

2019-05-01 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:4836 + if (T1Quals.hasAddressSpace()) { +if (!T1Quals.isAddressSpaceSupersetOf(cv1T1IgnoreAS.getQualifiers())) { + Sequence.SetFailed( rjmccal

[PATCH] D61304: [OpenCL][PR41609] Deduce static data members to __global addr space

2019-05-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D61304#1485125 , @rjmccall wrote: > Presumably a similar rule would apply to thread-locals if you supported them. We don't support them in OpenCL. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61304/new/ https://r

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCLCXX/addrspace-of-this.cl:94 // Test the address space of 'this' when invoking a method that is declared in the file contex. -// COMMON: %call1 = call i32 @_ZNU3AS41C7outsideEv(%class.C addrspace(4)* addrspacecast (

[PATCH] D61274: [Sema][AST] Explicit visibility for OpenCL/CUDA kernels/variables

2019-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/Decl.cpp:738 + (isa(D) && D->hasAttr()) || + (isa(D) && D->hasAttr())) { +Visibility Vis = LV.getVisibility(); yaxunl wrote: > we also need this for `__constant__` variables. And what about `__glo

[PATCH] D61318: [Sema] Prevent binding references with mismatching address spaces to temporaries

2019-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 197769. Anastasia added a comment. Added extra overload for `isAddressSpaceSupersetOf`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61318/new/ https://reviews.llvm.org/D61318 Files: include/clang/AST/Type.h include/clang/Basic/DiagnosticIDs

[PATCH] D60454: [OpenCL] Prevent mangling kernel functions

2019-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 197791. Anastasia added a comment. Extended `FunctionDecl` exten C logic to take kernel function into account. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60454/new/ https://reviews.llvm.org/D60454 Files: include/clang/Basic/DiagnosticSemaKin

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-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! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61319/new/ https://reviews.llvm.org/D61319 ___

[PATCH] D60454: [OpenCL] Prevent mangling kernel functions

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 197934. Anastasia marked an inline comment as done. Anastasia added a comment. Removed redundant C linkage checks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60454/new/ https://reviews.llvm.org/D60454 Files: include/clang/Basic/DiagnosticSem

[PATCH] D60454: [OpenCL] Prevent mangling kernel functions

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D60454#1488348 , @rjmccall wrote: > I think it would be more reasonable to just change `getDeclLanguageLinkage` > to check for a kernel function. I tried to change `getDeclLanguageLinkage` only but Sema calls `isInExternCC

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

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D57464#1462342 , @ebevhan wrote: > In D57464#1438213 , @Anastasia wrote: > > > > I think I would lean towards the latter since it means less fudging > > > around with a whole bunch of

[PATCH] D61318: [Sema] Prevent binding references with mismatching address spaces to temporaries

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 197940. Anastasia added a comment. Updated comments! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61318/new/ https://reviews.llvm.org/D61318 Files: include/clang/AST/Type.h include/clang/Basic/DiagnosticIDs.h include/clang/Basic/Diagnostic

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: kpet, rjmccall. Herald added subscribers: ebevhan, yaxunl. We need to be able to enqueue internal function that initializes global constructors on the host side. Therefore it has to be converted to a kernel. Note, supporting destruction

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:1231 + assert(((FD && CGF) || (!FD && !CGF)) && + "Incorrect use - FD and CFG should either be both null or not!"); + // Create MDNodes that represent

[PATCH] D61506: [OpenCL] Switch to C++17

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: kpet. Herald added subscribers: ebevhan, yaxunl. Caused test update as frontend now produces better IR due to copy elision. https://reviews.llvm.org/D61506 Files: include/clang/Frontend/LangStandards.def test/CodeGenOpenCLCXX/addr

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

2019-05-03 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] D60379: Make precompiled headers reproducible

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Can this be closed now due to commit r358674? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60379/new/ https://reviews.llvm.org/D60379 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D61506: [OpenCL] Switch to C++17

2019-05-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added a comment. In D61506#1490555 , @rsmith wrote: > Per the OpenCL C++ 1.0 specification, section 2: > > > The OpenCL C++ programming language is based on the ISO/IEC JTC1 SC22 WG21 > > N 3690 langua

[PATCH] D61639: Add Triple::isSPIR() to simplify code

2019-05-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. LGTM! Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61639/new/ https://reviews.llvm.org/D61639

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

2019-05-07 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] D61506: [OpenCL] Switch to C++17

2019-05-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D61506#1493953 , @keryell wrote: > In D61506#1490555 , @rsmith wrote: > > > Per the OpenCL C++ 1.0 specification, section 2: > > > > > The OpenCL C++ programming language is based on th

[PATCH] D58236: Make address space conversions a bit stricter.

2019-05-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D58236#1494722 , @ebevhan wrote: > This was accepted a while ago, but never landed. I don't have commit access; > could someone commit it? Sure! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58236/new/ https://re

[PATCH] D61506: [OpenCL] Switch to C++17

2019-05-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 198627. Anastasia added a comment. Added `HexFloat`! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61506/new/ https://reviews.llvm.org/D61506 Files: include/clang/Frontend/LangStandards.def test/CodeGenOpenCLCXX/addrspace-of-this.cl Index:

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 198678. Anastasia added a comment. - Improved comments - Switched to SPIR kernel CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61488/new/ https://reviews.llvm.org/D61488 Files: lib/CodeGen/CGDeclCXX.cpp lib/CodeGen/CodeGenFunction.cpp lib/C

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D61488#1496154 , @kpet wrote: > The comments could use a bit more polishing but nothing that justifies making > another iteration IMHO. LGTM! Sure, feel free to put up a patch if you like. :) Thanks! CHANGES SINCE LAST A

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

2018-09-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/OpenCLExtensionTypes.def:27 + +INTEL_SGAVC_TYPE(mce_payload_t, McePayload) +INTEL_SGAVC_TYPE(ime_payload_t, ImePayload) AlexeySotkin wrote: > Anastasia wrote: > > AlexeySachkov wrote: > > > Anastasi

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

2018-09-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Sema/Sema.h:8576 + + /// Find and extension in an extension map and return its name + template and extension -> an extension ? Comment at: lib/Sema/Sema.cpp:1856 +std::string Sema::

[PATCH] D51402: [OpenCL] Adding cl_intel_planar_yuv extension

2018-09-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Headers/opencl-c.h:26 +#if __OPENCL_C_VERSION__ >= CL_VERSION_1_2 +#ifndef cl_intel_planar_yuv +#define cl_intel_planar_yuv Anastasia wrote: > @yaxunl, do you think we need to add some kind of architecture guard fo

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

2018-09-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/Sema.cpp:1856 +std::string Sema::getOpenCLExtensionsFromDeclExtMap(FunctionDecl *FD) { + if (!OpenCLDeclExtMap.empty()) sidorovd wrote: > Anastasia wrote: > > Is this function to be used for both `OpenCLDec

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

2018-09-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/AST/OperationKinds.def:325 // Convert a zero value for OpenCL queue_t initialization. CAST_OPERATION(ZeroToOCLQueue) I am wondering if we could potentially unify all of those ZeroToOCL* into one cast

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

2018-09-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D43783#1235126, @yaxunl wrote: > In https://reviews.llvm.org/D43783#1235090, @Anastasia wrote: > > > Ping! Do you still plan to do this? :) > > > Sorry I caught up in something else. Since there are some subsequent commits, > it may take som

[PATCH] D52020: [OpenCL] Improve extension-version.cl and to_addr_builtin.cl tests

2018-09-25 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/D52020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D51727: [OpenCL] Allow zero assignment and comparisons between queue_t type variables

2018-09-25 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/D51727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

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

2018-09-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, yaxunl. C style cast in OpenCL C++ was ignoring the address space conversions from OpenCL C and as a result accepting incorrect code to compile. This commit adds correctness checking for address spaces. This makes all OpenCL C

[PATCH] D52412: OpenCL: Mark printf format string argument

2018-10-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! Sorry I missed this somehow. https://reviews.llvm.org/D52412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

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

2018-10-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaInit.cpp:5286 -static bool TryOCLZeroQueueInitialization(Sema &S, - InitializationSequence &Sequence, - QualType DestType, -

[PATCH] D52658: [OpenCL] Remove PIPE_RESERVE_ID_VALID_BIT from opencl-c.h

2018-10-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Does it mean we should close https://reviews.llvm.org/D32896? Would it make sense to keep this value as Clang implementation and if vendors need to change this they can `undef` it and redefine a new value. Would this work? Repository: rC Clang https://reviews.llv

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

2018-10-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaCast.cpp:2283 + const QualType &SrcType, + const QualType &DestType) { + // OpenCL v1 s6.5: Casting a pointer to address space A to a pointer to --

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

2018-10-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 168471. Anastasia added a comment. Change AS checking function to be a method of `CastOperation`. https://reviews.llvm.org/D52598 Files: lib/Sema/SemaCast.cpp test/SemaOpenCL/address-spaces-conversions-cl2.0.cl test/SemaOpenCL/address-spaces.cl In

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

2018-10-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaCast.cpp:2288 + SrcType->isPointerType()) { +const PointerType *DestPtr = DestType->getAs(); +if (!DestPtr->isAddressSpaceOverlapping(*SrcType->getAs())) { Anastasia wrote: > rjmccall wrote: >

[PATCH] D52658: [OpenCL] Remove PIPE_RESERVE_ID_VALID_BIT from opencl-c.h

2018-10-05 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! Repository: rC Clang https://reviews.llvm.org/D52658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D52873: Remove unwanted signedness conversion from tests

2018-10-05 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! Repository: rC Clang https://reviews.llvm.org/D52873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

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

2018-10-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. LGTM from OpenCL side! Repository: rC Clang https://reviews.llvm.org/D52879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-10-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 168633. Anastasia added a comment. - Changed to pass `QualType` by value. - Improved description of new method. - Added a comment about the OpenCL rules. https://reviews.llvm.org/D52598 Files: lib/Sema/SemaCast.cpp test/SemaOpenCL/address-spaces-conve

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

2018-10-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaCast.cpp:2288 + SrcType->isPointerType()) { +const PointerType *DestPtr = DestType->getAs(); +if (!DestPtr->isAddressSpaceOverlapping(*SrcType->getAs())) { rjmccall wrote: > Anastasia wrote: >

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

2018-10-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaCast.cpp:2288 + SrcType->isPointerType()) { +const PointerType *DestPtr = DestType->getAs(); +if (!DestPtr->isAddressSpaceOverlapping(*SrcType->getAs())) { rjmccall wrote: > Anastasia wrote: >

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

2019-02-01 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:4693 +T2Quals.addAddressSpace(AS2); + QualType WithAScv1T4 = S.Context.getQualifiedType(IgnoreAScv2T2, T1Quals); + Sequence.AddQualificationConversion

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

2019-02-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2313 +} + } ebevhan wrote: > Anastasia wrote: > > Anastasia wrote: > > > ebevhan wrote: > > > > Is there a reason that the attributes are pa

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

2019-02-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 185024. Anastasia added a comment. - Renamed variables and made other changes to improve readability. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57524/new/ https://reviews.llvm.org/D57524 Files: lib/Sema/SemaInit.cpp test/SemaOpenCLCXX/add

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

2019-02-04 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 +} + } ebevhan wrote: > Anastasia wrote: > > ebevhan wrote: > > > Anastasia wrote: > > > > Anastasia wrote: > > > > > ebevhan wrote: >

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

2019-02-05 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 +} + } ebevhan wrote: > Anastasia wrote: > > ebevhan wrote: > > > Anastasia wrote: > > > > ebevhan wrote: > > > > > Anastasia wrote: >

[PATCH] D57768: [SYCL] Add SYCL device compilation flow.

2019-02-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added subscribers: rjmccall, rsmith. Anastasia added a comment. In D57768#1386791 , @bader wrote: > In D57768#1386754 , @Naghasan wrote: > > > LGTM > > > > Side note: might be good to also involve @Anastas

[PATCH] D57824: [OpenCL][PR40603] Align the use of extensions in C++ to be backwards compatible with OpenCL C v2.0

2019-02-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, rjmccall. Herald added subscribers: ebevhan, jfb, yaxunl. One of the goal of C++ mode for OpenCL is to preserve backwards compatibility with OpenCL C v2.0! This patch aligns extensions! https://reviews.llvm.org/D57824 Files:

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

2019-02-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added a comment. Btw, if we would implement something like this: http://lists.llvm.org/pipermail/cfe-dev/2019-January/060798.html Would it allow you to switch to more generic address space attributes and therefore help to decrease diverging f

[PATCH] D57824: [OpenCL][PR40603] Align the use of extensions in C++ to be backwards compatible with OpenCL C v2.0

2019-02-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:1063 +auto OpenCLVersion = +LangOpts.OpenCLCPlusPlus ? 200 : LangOpts.OpenCLVersion; +#define OPENCLEXT(Ext)

[PATCH] D57824: [OpenCL][PR40603] In C++ preserve backwards compatibility with OpenCL C v2.0

2019-02-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 185774. Anastasia retitled this revision from "[OpenCL][PR40603] Align the use of extensions in C++ to be backwards compatible with OpenCL C v2.0" to "[OpenCL][PR40603] In C++ preserve backwards compatibility with OpenCL C v2.0". Anastasia edited the summar

[PATCH] D57946: [libclang] Add attribute support for 'convergent'.

2019-02-08 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/D57946/new/ https://reviews.llvm.org/D57946 ___

[PATCH] D58060: Fix diagnostic for addr spaces in static_cast

2019-02-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added a subscriber: ebevhan. When we diagnose `static_cast` we should prevent accidental address space conversions unless the conversion is safe (i.e. converting to an address space that is a super set is safe!). Some

[PATCH] D58179: [OpenCL][PR40707] Allow OpenCL C types in C++ mode

2019-02-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: svenvh. Herald added subscribers: ebevhan, yaxunl. Allow all OpenCL types to be parsed in C++ mode. I plan to enable more tests but they are currently failing for different reasons. This commit makes sure images can be used as they are

[PATCH] D58060: Fix diagnostic for addr spaces in static_cast

2019-02-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D58060#1396416 , @ebevhan wrote: > So static_cast permits conversions from AS1 to AS2 where that conversion is > implicitly allowed, and the new addrspace_cast would permit conversions from > AS1 to AS2 where it is explicitl

[PATCH] D58060: Fix diagnostic for addr spaces in static_cast

2019-02-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 186699. Anastasia added a comment. Herald added a subscriber: javed.absar. - Changed the diagnostic for binding reference and combined with existing similar one. That affected more tests however. - Changed comment explaining address space behavior in the re

[PATCH] D57768: [SYCL] Add SYCL device compilation flow.

2019-02-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Herald added a subscriber: jdoerfert. In D57768#1389012 , @rjmccall wrote: > In D57768#1386862 , @Anastasia wrote: > > > - SYCL seem to require adding tight dependencies from the standard

[PATCH] D58346: [Sema] Change addr space diagnostics in casts to follow C++ style

2019-02-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, ebevhan. Herald added a subscriber: jdoerfert. This patch adds a new diagnostic for mismatching address spaces to be used for C++ casts (TODO: only enabled in C style cast for now, the rest will follow!). This change extends C

[PATCH] D58236: Make address space conversions a bit stricter.

2019-02-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6996 + "|%diff{casting $ to type $|casting between types}0,1}2" + " changes address space of nested pointer">; def err_typecheck_incompatible_ownership : Error< I am wonder

[PATCH] D58277: [OpenCL] Change type of block pointer for OpenCL

2019-02-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! This totally makes sense! I think we inherited that from ObjC but never adapted fully. This change has low risk of breaking backwards compatibility but might need some mino

[PATCH] D57978: [CodeGen] Generate follow-up metadata for loops with more than one transformation.

2019-02-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia resigned from this revision. Anastasia added a comment. This seems like an interesting change. So far in OpenCL we have actively used only unroll. I will let others to assess in more details. Comment at: lib/CodeGen/CGLoopInfo.cpp:107 + FollowupLoopProperties.push_b

[PATCH] D58236: Make address space conversions a bit stricter.

2019-02-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a subscriber: arsenm. Anastasia added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6996 + "|%diff{casting $ to type $|casting between types}0,1}2" + " changes address space of nested pointer">; def err_typecheck_incompatible_ownership

[PATCH] D58346: [Sema] Change addr space diagnostics in casts to follow C++ style

2019-02-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: lib/Sema/SemaCast.cpp:2224 + } else if (IsLValueCast) { Kind = CK_LValueBitCast; } else if (DestType->isObjCObjectPointerType()) { ebevhan wrote: > This might not be

[PATCH] D58346: [Sema] Change addr space diagnostics in casts to follow C++ style

2019-02-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaCast.cpp:2224 + } else if (IsLValueCast) { Kind = CK_LValueBitCast; } else if (DestType->isObjCObjectPointerType()) { ebevhan wrote: > Anastasia wrote:

[PATCH] D58179: [OpenCL][PR40707] Allow OpenCL C types in C++ mode

2019-02-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in r354121. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58179/new/ https://reviews.llvm.org/D58179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D58346: [Sema] Change addr space diagnostics in casts to follow C++ style

2019-02-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaCast.cpp:2309 +auto DestPointeeTypeWithoutAS = Self.Context.removeAddrSpaceQualType( +DestPointeeType.getCanonicalType()); +return Self.Context.hasSameType(SrcPoi

[PATCH] D58388: [OpenCL] Simplify LLVM IR generated for OpenCL blocks

2019-02-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1275 +// We *can* call the block directly unless it is a function argument. +if (!isa(E->getCalleeDecl())) + Func = CGM.getOpenCLRuntime().getInvokeFunction(E->getCallee()); I thin

[PATCH] D58236: Make address space conversions a bit stricter.

2019-02-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:7795 +if (lhq.getAddressSpace() != rhq.getAddressSpace()) + return Sema::IncompatibleNestedPointerDiscardsQualifiers; + I am wondering since the behavior is so specialized for the

[PATCH] D58346: [Sema] Change addr space diagnostics in casts to follow C++ style

2019-02-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaCast.cpp:2224 + } else if (IsLValueCast) { Kind = CK_LValueBitCast; } else if (DestType->isObjCObjectPointerType()) { Anastasia wrote: > ebevhan wrote:

[PATCH] D58346: [Sema] Change addr space diagnostics in casts to follow C++ style

2019-02-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaCast.cpp:2224 + } else if (IsLValueCast) { Kind = CK_LValueBitCast; } else if (DestType->isObjCObjectPointerType()) { ebevhan wrote: > Anastasia wrote:

[PATCH] D58346: [Sema] Change addr space diagnostics in casts to follow C++ style

2019-02-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 187573. Anastasia added a comment. Added a CodeGen test to cover address space of reference in `reinterpret_cast`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58346/new/ https://reviews.llvm.org/D58346 Files: include/clang/Basic/DiagnosticSem

[PATCH] D58388: [OpenCL] Simplify LLVM IR generated for OpenCL blocks

2019-02-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! Great! Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58388/new/ https://reviews.llvm.org/D58388 ___ cfe-commits mail

[PATCH] D58504: [OpenCL][8.0.0 Release] Notes for OpenCL

2019-02-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: AlexeySotkin, hans. Herald added subscribers: jdoerfert, ebevhan, yaxunl. https://reviews.llvm.org/D58504 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst === -

[PATCH] D58504: [OpenCL][8.0.0 Release] Notes for OpenCL

2019-02-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added a subscriber: ABataev. Anastasia added inline comments. Comment at: docs/ReleaseNotes.rst:14 -This document contains the release notes for the Clang C/C++/Objective-C +This document contains the release notes for the C

[PATCH] D58504: [OpenCL][8.0.0 Release] Notes for OpenCL

2019-02-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: docs/ReleaseNotes.rst:14 -This document contains the release notes for the Clang C/C++/Objective-C +This document contains the release notes for the Clang C/C++/Objective-C/OpenCL frontend

[PATCH] D58504: [OpenCL][8.0.0 Release] Notes for OpenCL

2019-02-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: docs/ReleaseNotes.rst:14 -This document contains the release notes for the Clang C/C++/Objective-C +This document contains the release notes for the Clang C/C++/Objective-C/OpenCL frontend

[PATCH] D58504: [OpenCL][8.0.0 Release] Notes for OpenCL

2019-02-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: docs/ReleaseNotes.rst:228 -OpenCL C Language Changes in Clang +OpenCL Language Changes in Clang -- AlexeySotkin wrote: > AlexeySotkin wrote

[PATCH] D16351: [FIX] Bug 25404 - Crash on typedef in OpenCL 2.0

2019-02-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia commandeered this revision. Anastasia added a reviewer: ichesnokov. Anastasia added a comment. Herald added a subscriber: ebevhan. I just closed the bug because it's no longer failing on the master branch. So I don't think this is needed. CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D16351: [FIX] Bug 25404 - Crash on typedef in OpenCL 2.0

2019-02-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia abandoned this revision. Anastasia added a comment. I just took the ownership of this to be able to close it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D16351/new/ https://reviews.llvm.org/D16351 ___ cfe-commits mailing list cf

[PATCH] D58571: [libclang] Fix a trivial error introduced in D57946.

2019-02-25 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. Herald added a subscriber: Charusso. LGTM! Thanks! I guess we are missing a python test? No idea why we are not testing it though... Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D58570: [libclang] Expose warn_unused and warn_unused_result attributes.

2019-02-25 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! Although for consistency we could add this into python bindings too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58570/new/ https:

[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]", Should it not return unde

[PATCH] D58504: [OpenCL][8.0.0 Release] Notes for OpenCL

2019-02-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 188122. Anastasia added a comment. Updated the section title! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58504/new/ https://reviews.llvm.org/D58504 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst =

[PATCH] D58504: [OpenCL][8.0.0 Release] Notes for OpenCL

2019-02-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: docs/ReleaseNotes.rst:228 -OpenCL C Language Changes in Clang +OpenCL Language Changes in Clang -- Anastasia wrote: > AlexeySotkin wrote: >

[PATCH] D58504: [OpenCL][8.0.0 Release] Notes for OpenCL

2019-02-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Committed to the release branch r354799. FYI, I did a couple of formatting changes and typo fixes. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58504/new/ https://reviews.llvm.org/D58504 _

[PATCH] D58634: [PR40778] Generate address space conversion when binding reference to a temporary value in different address space

2019-02-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, ebevhan. This is fixing one of the issues reported in the bug: https://bugs.llvm.org/show_bug.cgi?id=40778 https://reviews.llvm.org/D58634 Files: lib/CodeGen/CGCall.cpp test/CodeGenOpenCLCXX/addrspace-references.cl Inde

[PATCH] D58634: [PR40778] Generate address space conversion when binding reference to a temporary value in different address space

2019-02-25 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:4067 + IRFuncTy->getParamType(FirstIRArg)->isPointerTy()) +V = Builder.CreatePointerBitCastOrAddrSpaceCast( +V, IRFuncTy->getPa

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