File tree Expand file tree Collapse file tree 2 files changed +4
-15
lines changed
include/swift/SILOptimizer/Utils Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,6 @@ class CanonicalizeOSSALifetime final {
472
472
void findExtendedBoundary (PrunedLivenessBoundary const &originalBoundary,
473
473
PrunedLivenessBoundary &boundary);
474
474
475
- void findDestroysOutsideBoundary (SmallVectorImpl<SILInstruction *> &destroys);
476
475
void extendLivenessToDeinitBarriers ();
477
476
478
477
void extendUnconsumedLiveness (PrunedLivenessBoundary const &boundary);
Original file line number Diff line number Diff line change @@ -252,26 +252,16 @@ bool CanonicalizeOSSALifetime::computeCanonicalLiveness() {
252
252
return true ;
253
253
}
254
254
255
- void CanonicalizeOSSALifetime::findDestroysOutsideBoundary (
256
- SmallVectorImpl<SILInstruction *> &outsideDestroys) {
257
- for (auto destroy : destroys) {
258
- if (liveness->isWithinBoundary (destroy))
259
- continue ;
260
- outsideDestroys.push_back (destroy);
261
- }
262
- }
263
-
264
255
void CanonicalizeOSSALifetime::extendLivenessToDeinitBarriers () {
265
- SmallVector<SILInstruction *, 4 > outsideDestroys;
266
- findDestroysOutsideBoundary (outsideDestroys);
267
-
268
256
// OSSALifetimeCompletion: With complete lifetimes, creating completeLiveness
269
257
// and using it to visit unreachable lifetime ends should be deleted.
270
258
SmallVector<SILBasicBlock *, 32 > discoveredBlocks (this ->discoveredBlocks );
271
259
SSAPrunedLiveness completeLiveness (*liveness, &discoveredBlocks);
272
260
273
- for (auto *end : outsideDestroys) {
274
- completeLiveness.updateForUse (end, /* lifetimeEnding*/ true );
261
+ for (auto destroy : destroys) {
262
+ if (liveness->isWithinBoundary (destroy))
263
+ continue ;
264
+ completeLiveness.updateForUse (destroy, /* lifetimeEnding*/ true );
275
265
}
276
266
277
267
OSSALifetimeCompletion::visitAvailabilityBoundary (
You can’t perform that action at this time.
0 commit comments