File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
include/swift/SILOptimizer/Utils Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -472,6 +472,7 @@ class CanonicalizeOSSALifetime final {
472
472
void findExtendedBoundary (PrunedLivenessBoundary const &originalBoundary,
473
473
PrunedLivenessBoundary &boundary);
474
474
475
+ void extendLivenessToDeadEnds ();
475
476
void extendLivenessToDeinitBarriers ();
476
477
477
478
void extendUnconsumedLiveness (PrunedLivenessBoundary const &boundary);
Original file line number Diff line number Diff line change @@ -252,9 +252,9 @@ bool CanonicalizeOSSALifetime::computeCanonicalLiveness() {
252
252
return true ;
253
253
}
254
254
255
- void CanonicalizeOSSALifetime::extendLivenessToDeinitBarriers () {
256
- // OSSALifetimeCompletion: With complete lifetimes, creating completeLiveness
257
- // and using it to visit unreachable lifetime ends should be deleted .
255
+ void CanonicalizeOSSALifetime::extendLivenessToDeadEnds () {
256
+ // TODO: OSSALifetimeCompletion: Once lifetimes are always complete, delete
257
+ // this method .
258
258
SmallVector<SILBasicBlock *, 32 > discoveredBlocks (this ->discoveredBlocks );
259
259
SSAPrunedLiveness completeLiveness (*liveness, &discoveredBlocks);
260
260
@@ -274,7 +274,9 @@ void CanonicalizeOSSALifetime::extendLivenessToDeinitBarriers() {
274
274
return true ;
275
275
});
276
276
});
277
+ }
277
278
279
+ void CanonicalizeOSSALifetime::extendLivenessToDeinitBarriers () {
278
280
SmallVector<SILInstruction *, 8 > ends;
279
281
if (currentLexicalLifetimeEnds.size () > 0 ) {
280
282
visitExtendedUnconsumedBoundary (
@@ -1204,6 +1206,7 @@ bool CanonicalizeOSSALifetime::computeLiveness() {
1204
1206
return false ;
1205
1207
}
1206
1208
if (respectsDeinitBarriers ()) {
1209
+ extendLivenessToDeadEnds ();
1207
1210
extendLivenessToDeinitBarriers ();
1208
1211
}
1209
1212
if (accessBlockAnalysis) {
You can’t perform that action at this time.
0 commit comments