mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Lock invalidations of the call graph during COWArrayOpt.
We already preserve the call graph, so we should not allow it to be invalidated. Swift SVN r27012
This commit is contained in:
@@ -1757,7 +1757,8 @@ class SwiftArrayOptPass : public SILFunctionTransform {
|
||||
DominanceAnalysis *DA = PM->getAnalysis<DominanceAnalysis>();
|
||||
SILLoopAnalysis *LA = PM->getAnalysis<SILLoopAnalysis>();
|
||||
SILLoopInfo *LI = LA->getLoopInfo(getFunction());
|
||||
CallGraph *CG = PM->getAnalysis<CallGraphAnalysis>()->getCallGraphOrNull();
|
||||
CallGraphAnalysis *CGA = PM->getAnalysis<CallGraphAnalysis>();
|
||||
CallGraph *CG = CGA->getCallGraphOrNull();
|
||||
|
||||
bool HasChanged = false;
|
||||
|
||||
@@ -1804,7 +1805,9 @@ class SwiftArrayOptPass : public SILFunctionTransform {
|
||||
if (HasChanged) {
|
||||
// We preserve the dominator tree. Let's invalidate everything else.
|
||||
DA->lockInvalidation();
|
||||
CGA->lockInvalidation();
|
||||
invalidateAnalysis(SILAnalysis::PreserveKind::Nothing);
|
||||
CGA->unlockInvalidation();
|
||||
DA->unlockInvalidation();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user