[PATCH] D125052: [HLSL] Enable vector types for hlsl.

2022-05-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 Please make sure to reflect in your commit message that you are adding the clang internal headers too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D124753: [HLSL] Set main as default entry.

2022-06-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D124753#3546608 , @python3kgae wrote: > In D124753#3545779 , @Anastasia > wrote: > >> From the current change it seems to me that what you need to be testing is a >> just that the

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-06-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124752/new/ https://reviews.llvm.org/D124752 _

[PATCH] D126660: [OpenCL] Reword unknown extension pragma diagnostic

2022-06-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. Ok, makes sense! Thanks! Btw I was thinking we should provide some way for developers to know what extensions are being supported either through documentation or by querying clang someh

[PATCH] D124753: [HLSL] Set main as default entry.

2022-06-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D124753#3550670 , @python3kgae wrote: > In D124753#3550337 , @Anastasia > wrote: > >> In D124753#3546608 , @python3kgae >> wrote: >> >>> I

[PATCH] D126857: [HLSL] Add WaveActiveCountBits as Langugage builtin function for HLSL

2022-06-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. ok, so the reason you are adding this to clang is that it needs to be mapped into a target intrinsic? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126857/new/ https://reviews.llvm.org/D126857 __

[PATCH] D126857: [HLSL] Add WaveActiveCountBits as Langugage builtin function for HLSL

2022-06-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:1697 +// HLSL +LANGBUILTIN(WaveActiveCountBits, "Uib", "nc", HLSL_LANG) + FYI we most of time try to add a builtin name using a reserved identifier which is not part of the langu

[PATCH] D126857: [HLSL] Add WaveActiveCountBits as Langugage builtin function for HLSL

2022-06-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:1697 +// HLSL +LANGBUILTIN(WaveActiveCountBits, "Uib", "nc", HLSL_LANG) + python3kgae wrote: > Anastasia wrote: > > FYI we most of time try to add a builtin name using a reserved

[PATCH] D126857: [HLSL] Add WaveActiveCountBits as Langugage builtin function for HLSL

2022-06-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: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126857/new/ https://reviews.llvm.org/D126857 _

[PATCH] D155978: [SPIRV] Add SPIR-V logical triple.

2023-08-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: llvm/unittests/TargetParser/TripleTest.cpp:1307 + EXPECT_TRUE(T.isSPIRV()); + T.setArch(Triple::spirv32); pmatos wrote: > Keenuts wrote: > > pmatos wrote: > > > I am not well-versed in SPIRV for gfx but if we are u

[PATCH] D156816: [Clang] Make generic aliases to OpenCL address spaces

2023-08-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D156816#4551357 , @jhuber6 wrote: > In D156816#4551338 , @yaxunl wrote: > >>> FFI isn't the reason you'd use these, it's for generic access to the actual >>> backend. E.g. an `addrsp

[PATCH] D156816: [Clang] Make generic aliases to OpenCL address spaces

2023-08-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > We also are tied to OpenCL semantic of future versions. This is what I would like to avoid aliasing to OpenCL and then starting to change it in a way that is not conforming or documented. Maybe there is a need for something like an address space for the group of rel

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-08-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Headers/opencl-c-base.h:832 + +inline float __ovld __cnfn sqrt(float __x) { + return __builtin_elementwise_sqrt(__x); Is this a generic implementation enough? Would some targets not need to do something dif

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-08-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Headers/opencl-c-base.h:832 + +inline float __ovld __cnfn sqrt(float __x) { + return __builtin_elementwise_sqrt(__x); arsenm wrote: > svenvh wrote: > > Anastasia wrote: > > > Is this a generic implementation

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-09-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. If we think there are no better alternatives and implementation is generic enough for every vendor, LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156743/new/ https://revi

[PATCH] D137652: Remove mandatory define of optional features macros for OpenCL C 3.0

2022-11-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Are these features affecting the frontend functionality in any way? If not we should implement those in the headers and if headers are not flexible enough to condition out the addition of the new macros we should extend them (potentially by extending behaviour of `-cl

[PATCH] D137652: Remove mandatory define of optional features macros for OpenCL C 3.0

2022-11-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D137652#3957233 , @FMarno wrote: > @Anastasia I feel like I am following the guidance you quoted here. The > defines I've deleted in `opencl-c-base.h` are blocking the possibility of > `-cl-ext` working and would also get i

[PATCH] D137652: Remove mandatory define of optional features macros for OpenCL C 3.0

2022-12-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D137652#3957519 , @svenvh wrote: >> @svenvh I remember that we have also discussed the addition of a vendor >> specific header where such feature/extension macro definition can be added >> to avoid the macro pollution but I

[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.

2020-03-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Sorry for the delayed comments. It would be good to address those in a separate commit if possible. Comment at: clang/test/CodeGenOpenCL/pipe_types_mangling.cl:12 +// WINDOWS: define dso_local void @"?test1@@YAXU?$ocl_pipe@H$00@__clang@@@Z" +// UNMAN

[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.

2020-03-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenOpenCL/pipe_types_mangling.cl:12 +// WINDOWS: define dso_local void @"?test1@@YAXU?$ocl_pipe@H$00@__clang@@@Z" +// UNMANGLED: define {{.*}}void @test1( +} Anastasia wrote: > erichkeane wrote: > > Anas

[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.

2020-03-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenOpenCL/pipe_types_mangling.cl:12 +// WINDOWS: define dso_local void @"?test1@@YAXU?$ocl_pipe@H$00@__clang@@@Z" +// UNMANGLED: define {{.*}}void @test1( +} erichkeane wrote: > Anastasia wrote: > > eric

[PATCH] D74116: [Sema][C++] Propagate conversion type in order to specialize the diagnostics

2020-02-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:14829 +if (getLangOpts().CPlusPlus) + isInvalid = true; break; rjmccall wrote: > Could you hoist this up to the place where we pick

[PATCH] D74116: [Sema][C++] Propagate conversion type in order to specialize the diagnostics

2020-02-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 245647. Anastasia added a comment. - Always set `isInvalid` for all error cases. - Hoist setting `isInvalid` together with an error diagnostic. - Updated more tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74116/new/ https://reviews.llvm.org

[PATCH] D74116: [Sema][C++] Propagate conversion type in order to specialize the diagnostics

2020-02-25 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfa755d3e71ed: [Sema][C++] Propagate conversion kind to specialize the diagnostics (authored by Anastasia). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75125: [Docs][OpenCL] Release 10.0 notes for OpenCL

2020-02-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, AlexeySotkin. Herald added subscribers: ebevhan, jfb, yaxunl. https://reviews.llvm.org/D75125 Files: clang/docs/ReleaseNotes.rst Index: clang/docs/ReleaseNotes.rst =

[PATCH] D75125: [Docs][OpenCL] Release 10.0 notes for OpenCL

2020-02-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: clang/docs/ReleaseNotes.rst:305 +- Added support for function attributes. +FIXME: Add a sentence explaining current state? + @svenvh Do you think we should add a sentence to

[PATCH] D75125: [Docs][OpenCL] Release 10.0 notes for OpenCL

2020-02-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 246774. Anastasia added a comment. Addressed comments from Hans and Sven. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75125/new/ https://reviews.llvm.org/D75125 Files: clang/docs/ReleaseNotes.rst Index: clang/docs/ReleaseNotes.rst =

[PATCH] D75125: [Docs][OpenCL] Release 10.0 notes for OpenCL

2020-02-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. @hans, what is the current process for committing to the release branch? Would you be able to commit this or would you prefer that I commit myself? Thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75125/new/ https://reviews.llvm.org/D75125 ___

[PATCH] D75125: [Docs][OpenCL] Release 10.0 notes for OpenCL

2020-02-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > Thanks for writing notes! Go ahead and push directly to the branch when > you're ready. Sorry. Missed this somehow! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75125/new/ https://reviews.llvm.org/D75125 ___

[PATCH] D74910: [OpenCL] Remove spurious atomic_fetch_min/max builtins

2020-02-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I would say if we are not aware of any test that this change breaks, let's go ahead and commit this? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74910/new/ https://reviews.llvm.org/D74910 __

[PATCH] D75285: Mark restrict pointer or reference to const as invariant

2020-03-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D75285#1896610 , @rjmccall wrote: > Are you sure `restrict` alone isn't good enough? It doesn't directly tell > you that the memory is invariant, but it's usually simple to prove that the > memory isn't modified within the

[PATCH] D75285: Mark restrict pointer or reference to const as invariant

2020-03-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D75285#1903611 , @yaxunl wrote: > In D75285#1903444 , @rjmccall wrote: > > > That is not true for two reasons: first, `restrict` guarantees that the > > variable is not accessed throug

[PATCH] D69233: [OpenCL] Support -fdeclare-opencl-builtins in C++ mode

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

[PATCH] D69242: [Sema] Make helper in TreeTransform.h 'inline' instead of 'static'. NFC

2019-11-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. I agree. LGTM! Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69242/new/ https://reviews.llvm.org/D69242 ___

[PATCH] D69498: IR: Invert convergent attribute handling

2019-11-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D69498#1725692 , @kariddi wrote: > In D69498#1725528 , @rjmccall wrote: > > > It absolutely makes sense for Clang as a GPU-programming frontend to set > > attributes appropriately when

[PATCH] D68781: [OpenCL] Fix address space for const method call from nonconst

2019-11-04 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/D68781/new/ https://reviews.llvm.org/D68781 ___

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

2019-11-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 227841. Anastasia marked an inline comment as done. Anastasia added a comment. - Factored OpenCL diagnostics out in a separate helper function - Removed special case for ParenType CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65744/new/ https://re

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

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

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added subscribers: ebevhan, yaxunl. Since lambdas are represented by callable objects, we need to adjust addr space of implicit obj parameter. This patch suggests to use `__generic` for OpenCL mode. Then any lambda va

[PATCH] D69883: [OpenCL] Add math and common builtin functions

2019-11-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! I guess we need to think about testing quite soon. :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69883/new/ https://reviews.llvm.org/D6

[PATCH] D69901: [OpenCL] Add integer functions to builtin functions

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

[PATCH] D69908: [OpenCL] Add geometric and relational builtin functions

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

[PATCH] D69878: Consoldiate internal denormal flushing controls

2019-11-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > Stop emitting the denorms-are-zero attribute for the OpenCL flag. It > has no in-tree users. The meaning would also be target dependent, such > as the AMDGPU choice to treat this as only meaning allow flushing of > f32 and not f16 or f64. The naming is also potentia

[PATCH] D69810: [OpenCL] Fix address space for base method call (PR43145)

2019-11-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:4091 +V = Builder.CreatePointerBitCastOrAddrSpaceCast( +V, IRFuncTy->getParamType(FirstIRArg)); + else svenvh wrote: > @Anastasia pointed out that the A

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added a comment. In D69938#1737196 , @rjmccall wrote: > It does make logical sense to be able to qualify the call operator of a > lambda. The lambda always starts as a temporary, so presumably we want

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 228851. Anastasia added a comment. - Added missing handling of lambda w/o param list. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69938/new/ https://reviews.llvm.org/D69938 Files: clang/lib/Sema/SemaLambda.cpp clang/lib/Sema/SemaType.cpp

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D69938#1741713 , @rjmccall wrote: > In D69938#1741080 , @Anastasia wrote: > > > In D69938#1737196 , @rjmccall > > wrote: > > > > > It does make

[PATCH] D70242: [OpenCL] Allow addr space qualifiers on lambda call expressions

2019-11-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added subscribers: ebevhan, yaxunl. Anastasia edited the summary of this revision. The addr space qualifier can be added optionally for lambdas after the attributes. They will alter the default address space of lambda c

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D69938#1742354 , @rjmccall wrote: > In D69938#1742026 , @Anastasia wrote: > > > In D69938#1741713 , @rjmccall > > wrote: > > > > > In D69938#17

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 229308. Anastasia added a comment. - Added pointer to lambda test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69938/new/ https://reviews.llvm.org/D69938 Files: clang/lib/Sema/SemaLambda.cpp clang/lib/Sema/SemaType.cpp clang/test/Sem

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D69938#1745766 , @rjmccall wrote: > In D69938#1745737 , @Anastasia wrote: > > > In D69938#1742354 , @rjmccall > > wrote: > > > > > In D69938#17

[PATCH] D70242: [OpenCL] Allow addr space qualifiers on lambda call expressions

2019-11-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D70242#1748313 , @rjmccall wrote: > Well that was easy. > > Do we accept the address-space attribute in this position, or is that TBD? We accept the OpenCL one right at the end. I might need to test more in C++ though...

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D69938#1747735 , @rjmccall wrote: > > I was already planning to add this. I could look into it next and maybe > > just a add FIXME in the test for now. > > Sure. > > > Btw global lambda objects are in `__global` address space

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 230070. Anastasia added a comment. - Added FIXME to enhance testing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69938/new/ https://reviews.llvm.org/D69938 Files: clang/lib/Sema/SemaLambda.cpp clang/lib/Sema/SemaType.cpp clang/test/SemaOp

[PATCH] D69878: Consoldiate internal denormal flushing controls

2019-11-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:1775 -if (getLangOpts().OpenCL) - FuncAttrs.addAttribute("denorms-are-zero", - llvm::toStringRef(CodeGenOpts.FlushDenorm)); so where would `denorms-are-

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D69938#1752024 , @rjmccall wrote: > Yes, in that case copy-elision into the global variable is guaranteed. You > can write arbitrary expressions in global initializers, however, and those > can use temporary lambdas. I gu

[PATCH] D68388: [PR41008][OpenCL] Add OpenCL C compatibility mode to C++ for OpenCL

2019-11-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I think we should use `-fpermissive` rather than adding similar flag to Clang. At the end we might end up with other cases where we need similar mechanism it doesn't make sense to add a flag for each case. Also I am not sure that what you are doing here is really enab

[PATCH] D68388: [PR41008][OpenCL] Add OpenCL C compatibility mode to C++ for OpenCL

2019-11-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D68388#1756701 , @kpet wrote: > Thanks for the feedback. > > > I think we should use -fpermissive rather than adding similar flag to Clang. > > Could you point me at a use of `-fpermissive` for a similar case? Also it > seems

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D69938#1755709 , @rjmccall wrote: > In D69938#1754894 , @Anastasia wrote: > > > In D69938#1752024 , @rjmccall > > wrote: > > > > > Yes, in that

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:891 +if (getLangOpts().OpenCL) + EPI.TypeQuals.addAddressSpace(LangAS::opencl_generic); + rjmccall wrote: > This should probably check

[PATCH] D69878: Consoldiate internal denormal flushing controls

2019-11-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:1775 -if (getLangOpts().OpenCL) - FuncAttrs.addAttribute("denorms-are-zero", - llvm::toStringRef(CodeGenOpts.FlushDenorm)); arsenm wrote: > Anastasia wr

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

2019-11-27 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa29aa4710620: [OpenCL] Move addr space deduction to Sema. (authored by Anastasia). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D65744?vs=227841&id=231218#toc Reposi

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 231247. Anastasia added a comment. Added `getDefaultCXXMethodAddrSpace` helper to Sema CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69938/new/ https://reviews.llvm.org/D69938 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/Sema.cpp c

[PATCH] D60455: [SYCL] Add sycl_kernel attribute for accelerated code outlining

2019-11-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia resigned from this revision. Anastasia added a comment. This revision is now accepted and ready to land. Sorry, I don't have capacity currently to review this and I don't want to be blocking it either. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-11-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 231409. Anastasia added a comment. Switched to using `getAddrSpaceQualType` in the entire code base. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69938/new/ https://reviews.llvm.org/D69938 Files: clang/include/clang/Sema/Sema.h clang/lib/Sem

[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

2019-12-03 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG980133a2098c: [OpenCL] Use generic addr space for lambda call operator (authored by Anastasia). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D69938?vs=231409&id=23191

[PATCH] D70242: [OpenCL] Allow addr space qualifiers on lambda call expressions

2019-12-04 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe6522a96f56c: [OpenCL] Allow addr space qualifiers on lambda call expressions (authored by Anastasia). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D70242?vs=229305&i

[PATCH] D71005: [AST] Enable expression of OpenCL language address spaces an attribute

2019-12-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1123 def OpenCLPrivateAddressSpace : TypeAttr { - let Spellings = [Keyword<"__private">, Keyword<"private">]; + let Spellings = [Keyword<"__private">, Keyword<"private">, Clang<"ocl_private">];

[PATCH] D70981: [opencl] Fix address space deduction on array variables.

2019-12-04 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 comment in your final commit. Comment at: clang/lib/Sema/SemaDecl.cpp:6136 + if (!OrigTy.getQualifiers().hasAddressSpace() && Orig

[PATCH] D71005: [AST] Enable expression of OpenCL language address spaces an attribute

2019-12-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! Thanks! I presume OpenCL addr space logic won't apply in all cases in non-OpenCL compilations i.e. for example C++ because we enclose some of the logic under LangOpts checks. Re

[PATCH] D71015: [OpenCL] Handle address space conversions for constexpr (PR44177)

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

[PATCH] D71111: [Sema] Improve diagnostic about addr spaces for overload candidates

2019-12-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added a subscriber: ebevhan. As discussed in https://reviews.llvm.org/D69938#inline-629726 this commit improves the diagnostic of addr spaces. The approach is currently reusing diagnostic streaming of `Qualifiers`. Th

[PATCH] D71133: [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387)

2019-12-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:7057 + +if (Val.isVector()) { + SmallVector Indices; can Val not be vector at this point? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71133/new/ https://reviews.llvm

[PATCH] D69878: Consoldiate internal denormal flushing controls

2019-12-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:1775 -if (getLangOpts().OpenCL) - FuncAttrs.addAttribute("denorms-are-zero", - llvm::toStringRef(CodeGenOpts.FlushDenorm)); arsenm wrote: > Anastasia wr

[PATCH] D71111: [Sema] Improve diagnostic about addr spaces for overload candidates

2019-12-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 233424. Anastasia added a comment. - Allow sending address spaces into diagnostics - Change wording of diagnostics for address spaces in overloading CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7/new/ https://reviews.llvm.org/D7 Files:

[PATCH] D71133: [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387)

2019-12-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Comment at: clang/lib/AST/ExprConstant.cpp:7057 + +if (Val.isVector()) { + SmallVector Indices; svenvh wrote: > Anastasia wrote:

[PATCH] D71111: [Sema] Improve diagnostic about addr spaces for overload candidates

2019-12-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 233579. Anastasia marked an inline comment as done. Anastasia added a comment. - Moved "address space" printing into diagnostic engine - Moved `LangAS::Default` into switch/case statement. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7/new/ h

[PATCH] D71111: [Sema] Improve diagnostic about addr spaces for overload candidates

2019-12-13 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGed8dadb37c7e: [Sema] Improve diagnostic about addr spaces for overload candidates (authored by Anastasia). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D7?vs=2335

[PATCH] D71272: [OpenCL] Pretty print __private addr space

2019-12-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: clang/test/SemaOpenCL/access-qualifier.cl:28 kernel void k1(img1d_wo img) { - myRead(img); // expected-error {{passing 'img1d_wo' (aka '__write_only image1d_t') to parameter of incompatibl

[PATCH] D71476: [OpenCL] Add builtin function extension handling

2019-12-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Comment at: clang/lib/Sema/OpenCLBuiltins.td:51 +// Extension associated to a builtin function. +class FunctionExtension : AbstractExtension<_Ext>; +

[PATCH] D71460: [OpenCL] Fix support for cl_khr_mipmap_image_writes

2019-12-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Headers/opencl-c.h:14686 +#if defined(cl_khr_mipmap_image_writes) +#pragma OPENCL EXTENSION cl_khr_mipmap_image_writes : begin void __ovld write_imagef(write_only image1d_t image, int coord, int lod, float4 color);

[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.

2020-03-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:2956 + + mangleArtificialTagType(TTK_Struct, TemplateMangling, {"__clang"}); } We don't seem to add namespace for other OpenCL types, although I am not against it as I find it actua

[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

2020-03-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:1880 +// Check if Order is an unsigned +if (!Ty->isIntegerType()) { + Diag(ArgExpr->getExprLoc(), diag::err_typecheck_expect_uint) << Ty; JonChesterfield wrote: > isIntegerT

[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.

2020-03-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:2956 + + mangleArtificialTagType(TTK_Struct, TemplateMangling, {"__clang"}); } erichkeane wrote: > Anastasia wrote: > > We don't seem to add namespace for other OpenCL types, althoug

[PATCH] D73651: [OpenCL][CUDA][HIP][SYCL] Add norecurse

2020-02-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:914 + // + // OpenCL C++ 1.0 v2.1-11 s2.9: + // recursive function calls (ISO C++ Section 5.2.2, item 9) unless Can we remove reference to OpenCL C++ since it's not implemen

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-02-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D73360#1852147 , @rjmccall wrote: > If it's reasonable to persist the failure kind, that would probably be good, > but it might be a lot of work. I have looked at it earlier and it indeed affects a lot of Sema in C++ mode.

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-02-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 242312. Anastasia added a comment. Add warning into `IncompatiblePointerTypesDiscardsQualifiers` group. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73360/new/ https://reviews.llvm.org/D73360 Files: clang/include/clang/Basic/DiagnosticSemaKind

[PATCH] D73651: [OpenCL][CUDA][HIP][SYCL] Add norecurse

2020-02-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73651/new/ https://reviews.llvm.org/D73651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D74116: [Sema][C++] Strawman patch to propagate conversion type in order to specialize the diagnostics

2020-02-06 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. Currently in C++ we don't set/propagate what type of implicit conversions occurs on assignments/initializations/params/etc. Therefore the diagn

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-02-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D73360#1857073 , @rjmccall wrote: > Okay, we can go with this for now, since it does fix a bug. Thanks! Btw I uploaded straw-man patch for improving the diagnostics: https://reviews.llvm.org/D74116. CHANGES SINCE LAST ACT

[PATCH] D74116: [Sema][C++] Strawman patch to propagate conversion type in order to specialize the diagnostics

2020-02-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D74116#1863186 , @rjmccall wrote: > Hmm. The alternative approach, I suppose, would be to recognize that we're > about to emit a generic error and just recheck assignment constraints to > recompute the AssignConvertType.

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-02-07 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6064f426a183: [OpenCL] Restrict addr space conversions in nested pointers (authored by Anastasia). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D73360?vs=242312&id=24

[PATCH] D74116: [Sema][C++] Strawman patch to propagate conversion type in order to specialize the diagnostics

2020-02-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 244135. Anastasia added a comment. If I reuse the helper `checkPointerTypesForAssignment` I end up with lots of error turned into warnings, see example in test/SemaCXX/addr-of-overloaded-function.cpp I guess we don't want them to be warnings? Should we du

[PATCH] D74116: [Sema][C++] Strawman patch to propagate conversion type in order to specialize the diagnostics

2020-02-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 244691. Anastasia added a comment. Herald added a reviewer: jdoerfert. - Switched to using `CheckAssignmentConstraints` - Duplicated all extensions and warnings as errors for C++ mode - Added `IncompatibleFunctionPointer` CHANGES SINCE LAST ACTION https:

[PATCH] D74116: [Sema][C++] Strawman patch to propagate conversion type in order to specialize the diagnostics

2020-02-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > It looks like there's already some type analysis in > `DiagnoseAssignmentResult` to get a specialized diagnostic for certain cases > of function-pointer assignment. That could probably be easily moved into > `CheckAssignmentConstraints` by just adding a few more

[PATCH] D74116: [Sema][C++] Strawman patch to propagate conversion type in order to specialize the diagnostics

2020-02-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:3880 +ToType, From->getType(), From, Action); +// assert(Diagnosed && "failed to diagnose bad conversion"); +(void)Diagnosed; r

[PATCH] D74116: [Sema][C++] Propagate conversion type in order to specialize the diagnostics

2020-02-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 245164. Anastasia retitled this revision from "[Sema][C++] Strawman patch to propagate conversion type in order to specialize the diagnostics" to "[Sema][C++] Propagate conversion type in order to specialize the diagnostics". Anastasia added a comment. - U

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-01-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, jeroen.dobbelaere, bevinh. Herald added subscribers: ebevhan, yaxunl. This patch is fixing the issue reported in: http://lists.llvm.org/pipermail/cfe-dev/2020-January/064273.html and in the bug: https://bugs.llvm.org/show_bug.cg

[PATCH] D71460: [OpenCL] Fix support for cl_khr_mipmap_image_writes

2020-01-28 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/lib/Headers/opencl-c.h:14686 +#if defined(cl_khr_mipmap_image_writes) +#pragma OPENCL EXTENSION cl_khr_mipmap_image_writes : begin void

[PATCH] D71460: [OpenCL] Fix support for cl_khr_mipmap_image_writes

2020-01-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Adding @svenvh mainly to check if any fix is needed for the TableGen BIFs too? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71460/new/ https://reviews.llvm.org/D71460 ___ cfe-commits mailing list cfe-commits@list

<    8   9   10   11   12   13   14   15   16   17   >