[llvm-commits] [parallel] CVS: llvm/lib/VMCore/PassManagerT.h
Misha Brukman
brukman at cs.uiuc.edu
Thu Mar 11 18:46:02 PST 2004
Changes in directory llvm/lib/VMCore:
PassManagerT.h updated: 1.46.4.1 -> 1.46.4.2
---
Log message:
Implement keeping analyses alive transitively.
---
Diffs of the changes: (+10 -1)
Index: llvm/lib/VMCore/PassManagerT.h
diff -u llvm/lib/VMCore/PassManagerT.h:1.46.4.1 llvm/lib/VMCore/PassManagerT.h:1.46.4.2
--- llvm/lib/VMCore/PassManagerT.h:1.46.4.1 Mon Mar 1 17:58:16 2004
+++ llvm/lib/VMCore/PassManagerT.h Thu Mar 11 18:44:57 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.getRequiredLiveSet();
+ 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