Inherit CallGraphSCCPass directly from Pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33514 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2007-01-26 00:47:38 +00:00
parent a65f5fd21b
commit c71ca3cdd2
5 changed files with 8 additions and 7 deletions

View File

@@ -29,7 +29,7 @@ class CallGraphNode;
class CallGraph; class CallGraph;
class PMStack; class PMStack;
struct CallGraphSCCPass : public ModulePass { struct CallGraphSCCPass : public Pass {
/// doInitialization - This method is called before the SCC's of the program /// doInitialization - This method is called before the SCC's of the program
/// has been processed, allowing the pass to do initialization as necessary. /// has been processed, allowing the pass to do initialization as necessary.

View File

@@ -21,6 +21,7 @@ namespace llvm {
class FunctionPass; class FunctionPass;
class ModulePass; class ModulePass;
class Pass;
class Function; class Function;
class BasicBlock; class BasicBlock;
@@ -101,13 +102,13 @@ ModulePass *createFunctionResolvingPass();
/// createFunctionInliningPass - Return a new pass object that uses a heuristic /// createFunctionInliningPass - Return a new pass object that uses a heuristic
/// to inline direct function calls to small functions. /// to inline direct function calls to small functions.
/// ///
ModulePass *createFunctionInliningPass(); Pass *createFunctionInliningPass();
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// createPruneEHPass - Return a new pass object which transforms invoke /// createPruneEHPass - Return a new pass object which transforms invoke
/// instructions into calls, if the callee can _not_ unwind the stack. /// instructions into calls, if the callee can _not_ unwind the stack.
/// ///
ModulePass *createPruneEHPass(); Pass *createPruneEHPass();
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// createInternalizePass - This pass loops over all of the functions in the /// createInternalizePass - This pass loops over all of the functions in the
@@ -134,7 +135,7 @@ ModulePass *createDeadArgHackingPass();
/// createArgumentPromotionPass - This pass promotes "by reference" arguments to /// createArgumentPromotionPass - This pass promotes "by reference" arguments to
/// be passed by value. /// be passed by value.
/// ///
ModulePass *createArgumentPromotionPass(); Pass *createArgumentPromotionPass();
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// createIPConstantPropagationPass - This pass propagates constants from call /// createIPConstantPropagationPass - This pass propagates constants from call

View File

@@ -72,7 +72,7 @@ namespace {
"Promote 'by reference' arguments to scalars"); "Promote 'by reference' arguments to scalars");
} }
ModulePass *llvm::createArgumentPromotionPass() { Pass *llvm::createArgumentPromotionPass() {
return new ArgPromotion(); return new ArgPromotion();
} }

View File

@@ -58,7 +58,7 @@ namespace {
RegisterPass<SimpleInliner> X("inline", "Function Integration/Inlining"); RegisterPass<SimpleInliner> X("inline", "Function Integration/Inlining");
} }
ModulePass *llvm::createFunctionInliningPass() { return new SimpleInliner(); } Pass *llvm::createFunctionInliningPass() { return new SimpleInliner(); }
// CountCodeReductionForConstant - Figure out an approximation for how many // CountCodeReductionForConstant - Figure out an approximation for how many
// instructions will be constant folded if the specified value is constant. // instructions will be constant folded if the specified value is constant.

View File

@@ -50,7 +50,7 @@ namespace {
RegisterPass<PruneEH> X("prune-eh", "Remove unused exception handling info"); RegisterPass<PruneEH> X("prune-eh", "Remove unused exception handling info");
} }
ModulePass *llvm::createPruneEHPass() { return new PruneEH(); } Pass *llvm::createPruneEHPass() { return new PruneEH(); }
bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) { bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) {