[PATCH] D115274: [IR][RFC] Memory region declaration intrinsic
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 8 02:57:42 PST 2021
lebedev.ri marked an inline comment as done.
lebedev.ri added inline comments.
================
Comment at: llvm/docs/LangRef.rst:20418
+as the argument. The second argument specifies the offset to the pointer (the
+first argument) at which the memory region begins. The third argument specifies
+the offset to the pointer (the first argument) at which the memory region ends.
----------------
courbet wrote:
> Do we want to specify that `end_offset` > `begin_offset` ?
`end_offset` can not be required to be bigger than `begin_offset`.
E.g. consider the following 32-byte region: `[%ptr - 32, %ptr + 0]`,
where `%ptr` is the `end` pointer.
Likewise, i don't think we can specify that
the total region size is non-zero,
because then we can't declare empty memory regions,
where there only is a `end` pointer.
What i think is something that still needs to be better clarified,
is whether the `begin_offset` should specify the
offset from the beginning of the memory region to the pointer (i.e. be non-negative (`begin_offset s>= 0`)),
or the offset from the pointer to the beginning of the memory region (i.e. be non-positive (`begin_offset s<= 0`)),
I guess, given that `end_offset` specifies the offset from the pointer
to the `end` of the region, we want `begin_offset` to be symmetrical,
and specify the offset from the pointer to the beginning of the memory region
(i.e. be non-positive (`begin_offset s<= 0`)).
================
Comment at: llvm/docs/LangRef.rst:20445
+Given that pointer ``%ptr``, the only ``inbounds`` addresses can be computed
+by applying offsets that lie within ``[-8, 24]`` constraints, otherwise you get
+the :ref:`poison value <poisonvalues>`. (Provided that there actually is an
----------------
courbet wrote:
> Given the semantics above, 24 should be excluded: `[8,24)`
Hm, no, why? Is the `end` pointer not `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