File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
lib/SILOptimizer/Transforms Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -419,15 +419,15 @@ void CopyPropagation::run() {
419419 InstructionDeleter deleter (std::move (callbacks));
420420 bool changed = false ;
421421
422- GraphNodeWorklist <BeginBorrowInst *, 16 > beginBorrowsToShrink;
422+ StackList <BeginBorrowInst *> beginBorrowsToShrink (f) ;
423423
424424 // Driver: Find all copied or borrowed defs.
425425 for (auto &bb : *f) {
426426 for (auto &i : bb) {
427427 if (auto *copy = dyn_cast<CopyValueInst>(&i)) {
428428 defWorklist.updateForCopy (copy);
429429 } else if (auto *borrow = dyn_cast<BeginBorrowInst>(&i)) {
430- beginBorrowsToShrink.insert (borrow);
430+ beginBorrowsToShrink.push_back (borrow);
431431 } else if (canonicalizeAll) {
432432 if (auto *destroy = dyn_cast<DestroyValueInst>(&i)) {
433433 defWorklist.updateForCopy (destroy->getOperand ());
@@ -446,7 +446,7 @@ void CopyPropagation::run() {
446446 // NOTE: We assume that the function is in reverse post order so visiting the
447447 // blocks and pushing begin_borrows as we see them and then popping them
448448 // off the end will result in shrinking inner borrow scopes first.
449- while (auto *bbi = beginBorrowsToShrink. pop () ) {
449+ for (auto *bbi : beginBorrowsToShrink) {
450450 bool firstRun = true ;
451451 // Run the sequence of utilities:
452452 // - ShrinkBorrowScope
You can’t perform that action at this time.
0 commit comments