Skip to content

Commit e5a5674

Browse files
committed
[NFC] PrunedLiveness: Promote updateForUse variant
Allow users to add instructions to liveness in the same terms that liveness itself uses.
1 parent 794775b commit e5a5674

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/swift/SIL/PrunedLiveness.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,9 +613,10 @@ class PrunedLiveRange : public PrunedLiveness {
613613
ValueSet &visited,
614614
SILValue value);
615615

616-
void updateForUse(SILInstruction *user, LifetimeEnding lifetimeEnding);
617-
618616
public:
617+
/// Add \p inst to liveness which uses the def as indicated by \p usage.
618+
void updateForUse(SILInstruction *inst, LifetimeEnding usage);
619+
619620
/// For flexibility, \p lifetimeEnding is provided by the
620621
/// caller. PrunedLiveness makes no assumptions about the def-use
621622
/// relationships that generate liveness. For example, use->isLifetimeEnding()

0 commit comments

Comments
 (0)