Skip to content

Commit 646dc13

Browse files
committed
[CopyPropagation] Note ShrinkBorrowScope changes.
Use the result returned from shrinkgBorrowScope to update the changed flag.
1 parent 1ed3ce3 commit 646dc13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/Transforms/CopyPropagation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ void CopyPropagation::run() {
438438
// blocks and pushing begin_borrows as we see them and then popping them
439439
// off the end will result in shrinking inner borrow scopes first.
440440
while (auto *bbi = beginBorrowsToShrink.pop()) {
441-
shrinkBorrowScope(bbi, deleter);
441+
changed |= shrinkBorrowScope(bbi, deleter);
442442
}
443443

444444
// canonicalizer performs all modifications through deleter's callbacks, so we

0 commit comments

Comments
 (0)