[PATCH] D109609: [C++4OpenCL] Add support for multiple address spaced destructors

2021-09-17 Thread Ronan Keryell via Phabricator via cfe-commits
keryell added a comment. In D109609#3006225 , @olestrohm wrote: > > re: @keryell > This might work, though I have no idea how that `SomeAPIReturningAddrSpace` > would work, since at this point the variable would likely be cast to be in > __generic

[PATCH] D109609: [C++4OpenCL] Add support for multiple address spaced destructors

2021-09-17 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm updated this revision to Diff 373225. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109609/new/ https://reviews.llvm.org/D109609 Files: clang/include/clang/AST/DeclCXX.h clang/include/clang/Sema/Sema.h clang/lib/AST/DeclCXX.cpp clang/lib/Sema/SemaDeclCXX.cpp clang/lib

[PATCH] D109609: [C++4OpenCL] Add support for multiple address spaced destructors

2021-09-17 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm marked 2 inline comments as done. olestrohm added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:3082 ID.AddInteger(VolatileThis); + ID.AddInteger((unsigned)AS); Anastasia wrote: > Btw ctors and assignments don't seem to need this but

[PATCH] D109609: [C++4OpenCL] Add support for multiple address spaced destructors

2021-09-17 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm updated this revision to Diff 373218. olestrohm added a comment. I made the implicit destructor always be created in __generic address space. I couldn't manage to properly figure a case that would trigger `LookupSpecialMember`, so I couldn't figure out how or if address spaces are hand

[PATCH] D109609: [C++4OpenCL] Add support for multiple address spaced destructors

2021-09-13 Thread Ronan Keryell via Phabricator via cfe-commits
keryell added a comment. While it might be possible to extend arbitrarily C++, I have the feeling that having just 1 destructor and have a different code path-code according the address space would not be enough. It is possible to write: ~MyDestructor() { if constexpr (SomeAPIReturningAdd

[PATCH] D109609: [C++4OpenCL] Add support for multiple address spaced destructors

2021-09-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > The feature is also C++ for OpenCL specific to let the fast path remain when > not utilizing the > address spaces, as this new implementation will be slower than the bitfields > that C++ currently > uses, but I hope this can also be optimized in the future if it turn

[PATCH] D109609: [C++4OpenCL] Add support for multiple address spaced destructors

2021-09-10 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm created this revision. olestrohm added reviewers: Anastasia, svenvh, rjmccall. olestrohm added a project: clang. Herald added subscribers: ldrumm, yaxunl. olestrohm requested review of this revision. Herald added a subscriber: cfe-commits. This patch aims to add initial support for multi