Skip to content

Commit 218f33e

Browse files
committed
Add a FIXME to remove PrunedLiveness::nonLifetimeEndingUsesInLiveOut
Looks like it was added as a bootstrapping hack but doesn't belong here and won't work in general.
1 parent 8f20da7 commit 218f33e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/SIL/Utils/PrunedLiveness.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ void PrunedLiveness::updateForUse(SILInstruction *user, bool lifetimeEnding) {
7979
auto useBlockLive = liveBlocks.updateForUse(user);
8080
// Record all uses of blocks on the liveness boundary. For blocks marked
8181
// LiveWithin, the boundary is considered to be the last use in the block.
82+
//
83+
// FIXME: Why is nonLifetimeEndingUsesInLiveOut inside PrunedLiveness, and
84+
// what does it mean? Blocks may transition to LiveOut later. Or they may
85+
// already be LiveOut from a previous use. After computing liveness, clients
86+
// should check uses that are in PrunedLivenessBoundary.
8287
if (!lifetimeEnding && useBlockLive == PrunedLiveBlocks::LiveOut) {
8388
if (nonLifetimeEndingUsesInLiveOut)
8489
nonLifetimeEndingUsesInLiveOut->insert(user);

0 commit comments

Comments
 (0)