File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
include/swift/SILOptimizer/Utils Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ namespace swift {
37
37
// / Frontier implementation by adding a utility method that populates a vector
38
38
// / of insertion points based on this boundary, where each each
39
39
// / block-terminating lastUser adds an insertion point at each successor block.
40
+ // /
41
+ // / Note: A dead live range will have no last users and no boundary
42
+ // / edges. Always check if the definition passed to ValueLifetimeAnalysis is
43
+ // / dead before assuming that this boundary covers all points at which a value
44
+ // / must be destroyed. Normally, a live range with uses will have at least one
45
+ // / lastUser or boundaryEdge. But with infinite loops, it is possible for both
46
+ // / lastUsers and boundaryEdges to be empty even if there are uses within the
47
+ // / loop.
40
48
struct ValueLifetimeBoundary {
41
49
SmallVector<SILInstruction *, 8 > lastUsers;
42
50
SmallVector<SILBasicBlock *, 8 > boundaryEdges;
You can’t perform that action at this time.
0 commit comments