[llvm-commits] CVS: llvm/include/llvm/Pass.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Feb 26 13:11:02 PST 2003
Changes in directory llvm/include/llvm:
Pass.h updated: 1.29 -> 1.30
---
Log message:
* Un "protect" the getAnalysis<> functions
* Add a new initializePass() method to ImmutablePass
---
Diffs of the changes:
Index: llvm/include/llvm/Pass.h
diff -u llvm/include/llvm/Pass.h:1.29 llvm/include/llvm/Pass.h:1.30
--- llvm/include/llvm/Pass.h:1.29 Wed Sep 25 16:59:09 2002
+++ llvm/include/llvm/Pass.h Wed Feb 26 13:10:28 2003
@@ -142,8 +142,6 @@
return dynamic_cast<AnalysisType*>(Resolver->getAnalysisToUpdate(PI));
}
-protected:
-
/// getAnalysis<AnalysisType>() - This function is used by subclasses to get
/// to the analysis information that they claim to use by overriding the
/// getAnalysisUsage function.
@@ -203,8 +201,16 @@
/// "basic" versions of AnalysisGroups.
///
struct ImmutablePass : public Pass {
+ /// initializePass - This method may be overriden by immutable passes to allow
+ /// them to perform various initialization actions they require. This is
+ /// primarily because an ImmutablePass can "require" another ImmutablePass,
+ /// and if it does, the overloaded version of initializePass may get access to
+ /// these passes with getAnalysis<>.
+ ///
+ virtual void initializePass() {}
- // ImmutablePasses are never run.
+ /// ImmutablePasses are never run.
+ ///
virtual bool run(Module &M) { return false; }
private:
More information about the llvm-commits
mailing list