[clang] [CIR] Pointer and vptr width from a CIR-native data-layout entry (PR #204185)
Akshay K via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 3 09:35:50 PDT 2026
kumarak wrote:
@andykaylor Thanks for the review. I've updated the PR to introduce a CIR-native `PtrSpecAttr`, plus a few more changes since your pass:
- CIR data-layout emission now uses `#cir.ptr_spec`, a CIR-native attribute modeled after `ptr::SpecAttr`.
- Datalayout spec emission is refactored into a shared `cir::setMLIRDataLayout`, so `CIRGen` and `cir-translate` go through the same path.
- `DataMemberType` is now sized from the pointer index width (ptrdiff_t under Itanium) instead of a hardcoded value. This was missing from the earlier commit.
Regarding mixing pointer sizes in a single module, the entry is keyed by pointer type, so per-address-space specs fit the design. The current implementation is gated with a default address space, and this can be updated in the follow-up PRs.
https://github.com/llvm/llvm-project/pull/204185
More information about the cfe-commits
mailing list