[PATCH] D135158: [DataLayout] Introduce DataLayout::getPointerIntegralSize(AS)
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 4 09:03:29 PDT 2022
jrtc27 added a comment.
CHERI capabilities aren't non-integral. Converting a capability to an integer gives you the address, discarding the metadata (which is also stable*), which is as well-defined as it is on normal architectures. Non-integral pointers are weird unstable things where ptrtoint on the same thing can give different results and so you can't introduce new instructions during optimisation (but so long as you know what you're doing it's fine to create them in the first place in the frontend).
- Technically not true when revocation is involved if you inspect the metadata of a capability referring to an object past the end of its lifetime, but that is highly UB and constrained in terms of what you can observe
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135158/new/
https://reviews.llvm.org/D135158
More information about the llvm-commits
mailing list