[clang] [lld] [llvm] [mlir] [IR] Introduce `U<address space>` to `DataLayout` to represent undesirable address space if a target has it (PR #108786)
Alex Voicu via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 21 03:48:31 PDT 2024
AlexVlx wrote:
> > More specifically, how do you expect Clang to figure this out when e.g. compiling C++ for some AS rich target that decided to default to something odd
>
> I do not expect clang to be using the datalayout to decide anything. That is not really the purpose of the datalayout. It does not provide semantic information to the frontend. The frontend needs to directly understand the source language semantics and the address spaces of the target.
So your solution here is to simply "infect" every language with full address space awareness? Seems problematic. Furthermore, this stance on DataLayout is somewhat curious, considering we do use it precisely for that, in Clang, around things like globals and `alloca`s. What's your suggestion there?
https://github.com/llvm/llvm-project/pull/108786
More information about the llvm-commits
mailing list