[PATCH] D115274: [IR][RFC] Memory region declaration intrinsic

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 2 12:13:20 PST 2022


lebedev.ri added inline comments.


================
Comment at: llvm/docs/LangRef.rst:20474
+However, there are **no** additional constraints imposed on the
+non-:ref:`inbounds <getelementptr_inbounds>` addresses for this memory region,
+
----------------
nikic wrote:
> Doesn't this sentence contradict the first sentence in "Semantics"? If you want to make a distinction between inbounds/non-inbounds, then I think you have to do that in terms of restricting the visible allocated object, rather than saying that any pointer based on it cannot be outside the range. That would mean that something like `%p = memory.region.decl(%p0, 8, 16)` would not be poison, though dereferencing it would be and doing an inbounds gep would be, while doing a non-inbounds gep by 8 and then dereferencing would be legal.
Hmm, i do not remember why i've added that footprint here.
I believe we don't want to make a distinction between inbounds/non-inbounds.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115274/new/

https://reviews.llvm.org/D115274



More information about the llvm-commits mailing list