File tree 1 file changed +3
-3
lines changed
lib/SILOptimizer/Transforms
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -419,15 +419,15 @@ void CopyPropagation::run() {
419
419
InstructionDeleter deleter (std::move (callbacks));
420
420
bool changed = false ;
421
421
422
- GraphNodeWorklist <BeginBorrowInst *, 16 > beginBorrowsToShrink;
422
+ StackList <BeginBorrowInst *> beginBorrowsToShrink (f) ;
423
423
424
424
// Driver: Find all copied or borrowed defs.
425
425
for (auto &bb : *f) {
426
426
for (auto &i : bb) {
427
427
if (auto *copy = dyn_cast<CopyValueInst>(&i)) {
428
428
defWorklist.updateForCopy (copy);
429
429
} else if (auto *borrow = dyn_cast<BeginBorrowInst>(&i)) {
430
- beginBorrowsToShrink.insert (borrow);
430
+ beginBorrowsToShrink.push_back (borrow);
431
431
} else if (canonicalizeAll) {
432
432
if (auto *destroy = dyn_cast<DestroyValueInst>(&i)) {
433
433
defWorklist.updateForCopy (destroy->getOperand ());
@@ -446,7 +446,7 @@ void CopyPropagation::run() {
446
446
// NOTE: We assume that the function is in reverse post order so visiting the
447
447
// blocks and pushing begin_borrows as we see them and then popping them
448
448
// off the end will result in shrinking inner borrow scopes first.
449
- while (auto *bbi = beginBorrowsToShrink. pop () ) {
449
+ for (auto *bbi : beginBorrowsToShrink) {
450
450
bool firstRun = true ;
451
451
// Run the sequence of utilities:
452
452
// - ShrinkBorrowScope
You can’t perform that action at this time.
0 commit comments