Skip to content

Commit d85012f

Browse files
committed
[semantic-arc-opts] Improve comment on isConsumed.
1 parent 51bf7cc commit d85012f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SILOptimizer/Mandatory/SemanticARCOpts.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ STATISTIC(NumEliminatedInsts, "number of removed instructions");
3232
// Utility
3333
//===----------------------------------------------------------------------===//
3434

35+
/// Return true if v only has invalidating uses that are destroy_value.
36+
///
37+
/// Semantically this implies that a value is never passed off as +1 to memory
38+
/// or another function implying it can be used everywhere at +0.
3539
static bool isConsumed(SILValue v,
3640
SmallVectorImpl<DestroyValueInst *> &destroys) {
3741
assert(v.getOwnershipKind() == ValueOwnershipKind::Owned);

0 commit comments

Comments
 (0)