[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++
Bevin Hansson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 22 07:45:22 PDT 2023
ebevhan added a comment.
In D151087#4360743 <https://reviews.llvm.org/D151087#4360743>, @jhuber6 wrote:
> The problem is we don't have `addrspace_cast` in freestanding C++, so as it stands we currently have no way to perform this operation in C++ which is preventing me from implementing things in the LLVM LibC port for GPUs I'm working on.
By "freestanding C++" I assume you mean "C++ without the OpenCL C++ extension" and not "C++ without extensions at all", because in the latter case, you don't have address spaces either.
This is what I meant in D58346 <https://reviews.llvm.org/D58346> by "There's many places in the codebase where OpenCL flags restrict generic address space behavior." Isn't the solution here to allow addrspace_cast even when OpenCL C++ isn't turned on, as a more generic extension?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151087/new/
https://reviews.llvm.org/D151087
More information about the cfe-commits
mailing list