mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Optimizer: update borrowed-from instructions in some passes
Fixes verifier crashes (once the borrowed-from verifier is fixed).
This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
#include "swift/SILOptimizer/Utils/CanonicalizeBorrowScope.h"
|
||||
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
|
||||
#include "swift/SILOptimizer/Utils/InstOptUtils.h"
|
||||
#include "swift/SILOptimizer/Utils/OwnershipOptUtils.h"
|
||||
#include "llvm/ADT/SetVector.h"
|
||||
|
||||
using namespace swift;
|
||||
@@ -634,6 +635,7 @@ void CopyPropagation::run() {
|
||||
|
||||
// Invalidate analyses.
|
||||
if (changed || deleter.hadCallbackInvocation()) {
|
||||
updateBorrowedFrom(getPassManager(), getFunction());
|
||||
// Preserves NonLocalAccessBlockAnalysis.
|
||||
accessBlockAnalysis->lockInvalidation();
|
||||
invalidateAnalysis(SILAnalysis::InvalidationKind::Instructions);
|
||||
|
||||
Reference in New Issue
Block a user