[PATCH] D135158: [DataLayout] Introduce DataLayout::getPointerIntegralSize(AS)
David Chisnall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 11 13:42:05 PDT 2022
theraven added a comment.
In D135158#3836839 <https://reviews.llvm.org/D135158#3836839>, @jrtc27 wrote:
> Except then you can't do `unsigned long x = (unsigned long)&y` as intrinsics are not constant expressions. Non-integral pointers are too strict for CHERI as things stand, we want a subset of their behaviour.
You can; however, do it as a constant address-space cast, followed by a `ptrtoint`, which would make lowering easier in the back end because a constant address space cast of a global should give a non-capability relocation.
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