Skip to content

Commit 69a96ae

Browse files
committed
add initialized attribute LangRef
1 parent 4bf50e0 commit 69a96ae

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

llvm/docs/LangRef.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,23 @@ Currently, only the following parameter attributes are defined:
15891589
``readonly`` or a ``memory`` attribute that does not contain
15901590
``argmem: write``.
15911591

1592+
``initialized((Lo1,Hi1),...)``
1593+
This attribute is a list of const ranges in ascending order with no
1594+
overlapping or continuous. It indicates that the function initializes the
1595+
memory through the pointer argument, [%p+LoN, %p+HiN), and there is no read
1596+
before initialization in the function. (even though it may read before
1597+
initializating the memory that the pointer points to).
1598+
1599+
The ``writable`` or ``dereferenceable`` attribute does not imply
1600+
``initialized`` attribute, however the ``initialized`` argument does imply
1601+
``writable`` and ``dereferenceable`` in the specified spaces.
1602+
1603+
The ``initialized`` attribute can combine with ``writeonly`` attribute, but
1604+
cannot be combined with ``readnone``, ``readonly`` or a memory attribute
1605+
that does not contain ``argmem: write``.
1606+
1607+
[TODO: unwind]
1608+
15921609
``dead_on_unwind``
15931610
At a high level, this attribute indicates that the pointer argument is dead
15941611
if the call unwinds, in the sense that the caller will not depend on the

0 commit comments

Comments
 (0)