[Mlir-commits] [clang] [lld] [llvm] [mlir] [IR] Introduce `U<address space>` to `DataLayout` to represent undesirable address space if a target has it (PR #108786)

Matt Arsenault llvmlistbot at llvm.org
Mon Oct 21 15:37:09 PDT 2024


arsenm wrote:

> So your solution here is to simply "infect" every language with full address space awareness? 

It's similar to, but a simpler version of the ABI emission problem. The frontend has to know properties of the target to emit the IR for it. It's infeasible to encode all of the possible address space information in a simple datalayout string. 

> 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?

Where is the datalayout providing semantics in clang? The clang usage of the datalayout should be limited to computing type sizes and other low level ABI details (not semantics) 

https://github.com/llvm/llvm-project/pull/108786


More information about the Mlir-commits mailing list