Skip to content

Commit

Permalink
[LangRef] remove callbr references from Addresses of BasicBlock section
Browse files Browse the repository at this point in the history
Since D129288, we no longer use BlockAddress constants as operands of
callbr.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D138080
  • Loading branch information
nickdesaulniers committed Nov 16, 2022
1 parent ad3c91e commit 2d3d8c9
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions llvm/docs/LangRef.rst
Expand Up @@ -4286,14 +4286,13 @@ of the function containing ``%block`` (usually ``addrspace(0)``).
Taking the address of the entry block is illegal.

This value only has defined behavior when used as an operand to the
':ref:`indirectbr <i_indirectbr>`' or ':ref:`callbr <i_callbr>`'instruction, or
for comparisons against null. Pointer equality tests between labels addresses
results in undefined behavior --- though, again, comparison against null is ok,
and no label is equal to the null pointer. This may be passed around as an
opaque pointer sized value as long as the bits are not inspected. This
allows ``ptrtoint`` and arithmetic to be performed on these values so
long as the original value is reconstituted before the ``indirectbr`` or
``callbr`` instruction.
':ref:`indirectbr <i_indirectbr>`' or for comparisons against null. Pointer
equality tests between labels addresses results in undefined behavior ---
though, again, comparison against null is ok, and no label is equal to the null
pointer. This may be passed around as an opaque pointer sized value as long as
the bits are not inspected. This allows ``ptrtoint`` and arithmetic to be
performed on these values so long as the original value is reconstituted before
the ``indirectbr`` instruction.

Finally, some targets may provide defined semantics when using the value
as the operand to an inline assembly, but that is target specific.
Expand Down

0 comments on commit 2d3d8c9

Please sign in to comment.