[llvm] [llubi] explain Byte.TagValue encoding trick (PR #201863)
Ralf Jung via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 5 08:57:57 PDT 2026
================
@@ -30,11 +30,20 @@ class AnyValue;
/// stores the concrete bit value. The tag mask bit indicates whether it is a
/// pointer bit, and the tag value bit is used for provenance tracking of
/// pointers.
+///
+/// Note that the idealized interpreter would store a full pointer tag for every
+/// single pointer bit, as well as the position of that bit in the pointer. The
+/// provenance is preserved as the bit is copied around, and when a sequence of
+/// bytes is eventually converted back to a pointer, all bits must be in the
+/// original order and have the same provenance. However, that would be
+/// prohibiticely expensive. So instead, we rely on randimized 64bit tags. This
----------------
RalfJung wrote:
Oh right, the 32bit version of this has a much higher chance of false negatives.^^
https://github.com/llvm/llvm-project/pull/201863
More information about the llvm-commits
mailing list