[llvm-commits] CVS: llvm/lib/VMCore/PassManagerT.h
Misha Brukman
brukman at cs.uiuc.edu
Fri Mar 12 00:17:01 PST 2004
Changes in directory llvm/lib/VMCore:
PassManagerT.h updated: 1.47 -> 1.48
---
Log message:
Keep transitively-required passes alive for queries to work after the initial
user pass is destroyed.
---
Diffs of the changes: (+10 -1)
Index: llvm/lib/VMCore/PassManagerT.h
diff -u llvm/lib/VMCore/PassManagerT.h:1.47 llvm/lib/VMCore/PassManagerT.h:1.48
--- llvm/lib/VMCore/PassManagerT.h:1.47 Sun Feb 29 16:37:04 2004
+++ llvm/lib/VMCore/PassManagerT.h Fri Mar 12 00:16:28 2004
@@ -208,7 +208,6 @@
E = LastUseOf.end(); I != E; ++I)
LastUserOf[I->second].push_back(I->first);
-
// Output debug information...
if (Parent == 0) PMDebug::PerformPassStartupStuff(this);
@@ -397,6 +396,16 @@
if (I != CurrentAnalyses.end()) {
LastUseOf[I->second] = User; // Local pass, extend the lifetime
+
+ // Prolong live range of analyses that are needed after an analysis pass
+ // is destroyed, for querying by subsequent passes
+ AnalysisUsage AnUsage;
+ I->second->getAnalysisUsage(AnUsage);
+ const std::vector<AnalysisID> &IDs = AnUsage.getRequiredTransitiveSet();
+ for (std::vector<AnalysisID>::const_iterator i = IDs.begin(),
+ e = IDs.end(); i != e; ++i)
+ markPassUsed(*i, User);
+
} else {
// Pass not in current available set, must be a higher level pass
// available to us, propagate to parent pass manager... We tell the
More information about the llvm-commits
mailing list