Skip to content

Commit 1cc04c8

Browse files
authored
Merge pull request #79118 from atrick/markdep-doc
[docs] mark_dependence description clarification
2 parents fc2ee36 + 840ad14 commit 1cc04c8

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

docs/SIL/Instructions.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,15 +2005,19 @@ Builtin.RawPointer or a struct containing the same.
20052005
`%base` may have either object or address type. In the latter case, the
20062006
dependency is on the current value stored in the address.
20072007

2008-
The optional `nonescaping` attribute indicates that no value derived from
2009-
`%value` escapes the lifetime of `%base`. As with escaping `mark_dependence`,
2010-
all values transitively forwarded from `%value` must be destroyed within the
2011-
lifetime of `base`. Unlike escaping`mark_dependence`, this must be statically
2012-
verifiable. Additionally, unlike escaping`mark_dependence`, derived values
2013-
include copies of`%value`and values transitively forwarded from those copies.
2014-
If`%base`must not be identical to`%value`. Unlike escaping`mark_dependence`,
2015-
no value derived from`%value`may have a bitwise escape (conversion to
2016-
UnsafePointer) or pointer escape (unknown use).
2008+
The optional `nonescaping` attribute indicates that no value derived
2009+
from `%value` escapes the lifetime of `%base`. As with escaping
2010+
`mark_dependence`, all values transitively forwarded from `%value`
2011+
must be destroyed within the lifetime of `base`. Unlike escaping
2012+
`mark_dependence`, this must be statically verifiable. Additionally,
2013+
unlike escaping `mark_dependence`, nonescaping `mark_dependence` may
2014+
produce a value of non-`Escapable` type. A non-`Escapable`
2015+
`mark_dependence` extends the lifetime of `%base` into copies of
2016+
`%value` and values transitively forwarded from those copies. If the
2017+
`mark_dependence` forwards an address, then it extends the lifetime
2018+
through loads from that address. Unlike escaping `mark_dependence`, no
2019+
value derived from `%value` may have a bitwise escape (conversion to
2020+
UnsafePointer) or pointer escape (unknown use).
20172021

20182022
### is_unique
20192023

0 commit comments

Comments
 (0)