mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
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:
@@ -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.
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user