[PATCH] D124382: [Clang] Recognize target address space in superset calculation

Jakub Chlanda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 28 04:58:51 PDT 2022

jchlanda added a comment.

In D124382#3472888 <https://reviews.llvm.org/D124382#3472888>, @Anastasia wrote:


> Can you provide an example of where it could be useful? Note that I feel that
> such functionality could be implemented on top of full implementation of
> target specific address space proposed in https://reviews.llvm.org/D62574.

The use case we had was when calling target builtin (that specifies address
space) from within OpenCL C. Currently this errors out, similarly, the explicit
type cast to address space yields an error
(`(__attribute__((address_space(3))) int *)&l_woof` in the example below). This
is important for libclc, which is implemented in OpenCL C and deals directly
with target builtins.

  __kernel void woof() {
    __local int l_woof;

I wasn't aware of that patch, sorry, I've not had a close look yet, but it
seems worryingly dated.

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list