[llvm-dev] Target specific named address spaces

Bevin Hansson via llvm-dev llvm-dev at lists.llvm.org
Thu Jun 25 01:27:10 PDT 2020


Hi Sebastien,

Clang does have support for numbered address spaces via the __attribute__((address_space(N))) syntax. These address spaces map down to addrspace() in LLVM IR, and addrspaces in LLVM IR have arbitrary semantics unknown to LLVM itself.

However, there is no way to define custom address space keywords without adding them explicitly to the lexing and parsing, and there is also no way for a target to express how its address spaces are supposed to be related (subspaces, conversions etc). I have an initial patch to add support for target AS compatibility here (https://reviews.llvm.org/D62574) but hit some snags and have not had the bandwidth to finish it. I don't think a lot of people really require this, so it's hard to justify working on it.

/ Bevin
________________________________
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Sebastien Le Duc via llvm-dev <llvm-dev at lists.llvm.org>
Sent: Wednesday, June 24, 2020 4:25 PM
To: 'llvm-dev' <llvm-dev at lists.llvm.org>
Subject: [llvm-dev] Target specific named address spaces

Hi,
Is there a way to implement named address spaces with clang/llvm as it is
possible with gcc ?

We would like to have our own named address space that would be recognized
by the frontend.

Thanks in advance!
Regards,
Sebastien



_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org
https://protect2.fireeye.com/v1/url?k=a0d845e1-fe699e81-a0d8057a-86e2237f51fb-f0cf30ff10e310fb&q=1&e=323d117c-3292-4e7a-a026-cd25d5184e09&u=https%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200625/6dc21372/attachment.html>


More information about the llvm-dev mailing list