[PATCH] D22488: [IR] Introduce a non-integral pointer type

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 13:33:14 PDT 2016


sanjoy added inline comments.

================
Comment at: docs/LangRef.rst:559-561
@@ +558,5 @@
+via the :ref:```datalayout`` string<langref_datalayout>`.  Values of the
+non-integral pointer type represent pointers that don't have a *stable* bitwise
+representation; that is at runtime they may not be backed by a fixed unchanging
+pointer-width integer.
+
----------------
arsenm wrote:
> What consequence does the changing pointer value have on the optimizer? I'm interested in this for fat pointers which will not change value during runtime
That is the justification for disallowing integer <-> pointer conversions (directly via cast instructions or via memory).  If fat pointers have a stable bitwise representation, then why not represent them as normal pointers?



https://reviews.llvm.org/D22488





More information about the llvm-commits mailing list