Skip to content

Commit 9c12fd1

Browse files
authored
Merge pull request swiftlang#21363 from gottesmm/pr-eb302f1196c943be913dfde41bf571754efa96c8
2 parents 51bf7cc + d85012f commit 9c12fd1

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)