[PM] Teach the pass manager about locked analysis that should not be invalidated.

Swift SVN r26375
This commit is contained in:
Nadav Rotem
2015-03-20 22:53:08 +00:00
parent 141c0d8310
commit 5ad8aeef25
2 changed files with 16 additions and 3 deletions

View File

@@ -94,14 +94,17 @@ namespace swift {
/// \brief Broadcast the invalidation of the module to all analysis.
void invalidateAnalysis(SILAnalysis::InvalidationKind K) {
for (auto AP : Analysis)
AP->invalidate(K);
if (!AP->isLocked())
AP->invalidate(K);
}
/// \brief Broadcast the invalidation of the function to all analysis.
void invalidateAnalysis(SILFunction *F,
SILAnalysis::InvalidationKind K) {
// Invalidate the analysis (unless they are locked)
for (auto AP : Analysis)
AP->invalidate(F, K);
if (!AP->isLocked())
AP->invalidate(F, K);
}
/// \brief Reset the state of the pass manager and remove all transformation