[clang] [libcxx] [clang & libcxx] constexpr pointer tagging (DO NOT MERGE) (PR #111861)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 10 12:10:42 PDT 2024
efriedma-quic wrote:
> Intention is to allow to use any bits in pointer for tagging and give freedom
Hmm, so needs to somehow allow accessing bits that aren't low bits?
As a general comment not specific to this patch, I'd prefer to build around llvm.ptrmask and geps as much as possible, as opposed to relying on ptrtoint.
> In ExprConstant.cpp the comparison of tags is happening at the end of comparing pointers, where they were compared based on offsets (calculated out of LValue's path) so they should be same, but they can differ in tag.
Oh, hmm, I guess the cases where comparisons are actually legal is pretty restrictive; maybe you're mostly okay here. Maybe less so if the constexpr restrictions on pointer casts ever get relaxed...
https://github.com/llvm/llvm-project/pull/111861
More information about the cfe-commits
mailing list