mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29921 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -109,8 +109,8 @@ namespace {
|
||||
}
|
||||
};
|
||||
|
||||
RegisterAnalysis<CFGPrinter> P1("print-cfg",
|
||||
"Print CFG of function to 'dot' file");
|
||||
RegisterPass<CFGPrinter> P1("print-cfg",
|
||||
"Print CFG of function to 'dot' file");
|
||||
|
||||
struct CFGOnlyPrinter : public CFGPrinter {
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
@@ -127,7 +127,7 @@ namespace {
|
||||
}
|
||||
};
|
||||
|
||||
RegisterAnalysis<CFGOnlyPrinter>
|
||||
RegisterPass<CFGOnlyPrinter>
|
||||
P2("print-cfg-only",
|
||||
"Print CFG of function to 'dot' file (with no function bodies)");
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace {
|
||||
UpdateGlobals("budatastructures-update-from-globals",
|
||||
cl::desc("Update local graph from global graph when processing function"));
|
||||
|
||||
RegisterAnalysis<BUDataStructures>
|
||||
RegisterPass<BUDataStructures>
|
||||
X("budatastructure", "Bottom-up Data Structure Analysis");
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace {
|
||||
Statistic<> CompleteInd("calltarget", "Number of complete indirect calls");
|
||||
Statistic<> CompleteEmpty("calltarget", "Number of complete empty calls");
|
||||
|
||||
RegisterAnalysis<CallTargetFinder> X("calltarget", "Find Call Targets (uses DSA)");
|
||||
RegisterPass<CallTargetFinder> X("calltarget","Find Call Targets (uses DSA)");
|
||||
}
|
||||
|
||||
void CallTargetFinder::findIndTargets(Module &M)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
RegisterAnalysis<CompleteBUDataStructures>
|
||||
RegisterPass<CompleteBUDataStructures>
|
||||
X("cbudatastructure", "'Complete' Bottom-up Data Structure Analysis");
|
||||
Statistic<> NumCBUInlines("cbudatastructures", "Number of graphs inlined");
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace {
|
||||
void print(std::ostream &O, const Module* = 0) const { }
|
||||
};
|
||||
|
||||
static RegisterAnalysis<DSGraphStats> Z("dsstats", "DS Graph Statistics");
|
||||
static RegisterPass<DSGraphStats> Z("dsstats", "DS Graph Statistics");
|
||||
}
|
||||
|
||||
FunctionPass *llvm::createDataStructureStatsPass() {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
RegisterAnalysis<EquivClassGraphs> X("eqdatastructure",
|
||||
RegisterPass<EquivClassGraphs> X("eqdatastructure",
|
||||
"Equivalence-class Bottom-up Data Structure Analysis");
|
||||
Statistic<> NumEquivBUInlines("equivdatastructures",
|
||||
"Number of graphs inlined");
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace {
|
||||
void verify(const DSGraph &G);
|
||||
};
|
||||
|
||||
RegisterAnalysis<DSGC> X("datastructure-gc", "DSA Graph Checking Pass");
|
||||
RegisterPass<DSGC> X("datastructure-gc", "DSA Graph Checking Pass");
|
||||
}
|
||||
|
||||
FunctionPass *llvm::createDataStructureGraphCheckerPass() {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
static RegisterAnalysis<LocalDataStructures>
|
||||
static RegisterPass<LocalDataStructures>
|
||||
X("datastructure", "Local Data Structure Analysis");
|
||||
|
||||
static cl::opt<bool>
|
||||
|
||||
@@ -32,7 +32,7 @@ using namespace llvm;
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
RegisterAnalysis<TDDataStructures> // Register the pass
|
||||
RegisterPass<TDDataStructures> // Register the pass
|
||||
Y("tddatastructure", "Top-down Data Structure Analysis");
|
||||
|
||||
Statistic<> NumTDInlines("tddatastructures", "Number of graphs inlined");
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "llvm/Support/InstIterator.h"
|
||||
using namespace llvm;
|
||||
|
||||
static RegisterAnalysis<FindUsedTypes>
|
||||
static RegisterPass<FindUsedTypes>
|
||||
X("printusedtypes", "Find Used Types");
|
||||
|
||||
// IncorporateType - Incorporate one type and all of its subtypes into the
|
||||
|
||||
@@ -55,8 +55,8 @@ namespace {
|
||||
|
||||
};
|
||||
|
||||
RegisterAnalysis<InstCount> X("instcount",
|
||||
"Counts the various types of Instructions");
|
||||
RegisterPass<InstCount> X("instcount",
|
||||
"Counts the various types of Instructions");
|
||||
}
|
||||
|
||||
FunctionPass *llvm::createInstCountPass() { return new InstCount(); }
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "llvm/Analysis/IntervalIterator.h"
|
||||
using namespace llvm;
|
||||
|
||||
static RegisterAnalysis<IntervalPartition>
|
||||
static RegisterPass<IntervalPartition>
|
||||
X("intervals", "Interval Partition Construction", true);
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <iostream>
|
||||
using namespace llvm;
|
||||
|
||||
static RegisterAnalysis<LoopInfo>
|
||||
static RegisterPass<LoopInfo>
|
||||
X("loops", "Natural Loop Construction", true);
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@@ -23,7 +23,7 @@ using namespace llvm;
|
||||
// ImmediatePostDominators Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static RegisterAnalysis<ImmediatePostDominators>
|
||||
static RegisterPass<ImmediatePostDominators>
|
||||
D("postidom", "Immediate Post-Dominators Construction", true);
|
||||
|
||||
unsigned ImmediatePostDominators::DFSPass(BasicBlock *V, InfoRec &VInfo,
|
||||
@@ -145,7 +145,7 @@ bool ImmediatePostDominators::runOnFunction(Function &F) {
|
||||
// PostDominatorSet Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static RegisterAnalysis<PostDominatorSet>
|
||||
static RegisterPass<PostDominatorSet>
|
||||
B("postdomset", "Post-Dominator Set Construction", true);
|
||||
|
||||
// Postdominator set construction. This converts the specified function to only
|
||||
@@ -212,7 +212,7 @@ bool PostDominatorSet::runOnFunction(Function &F) {
|
||||
// PostDominatorTree Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static RegisterAnalysis<PostDominatorTree>
|
||||
static RegisterPass<PostDominatorTree>
|
||||
F("postdomtree", "Post-Dominator Tree Construction", true);
|
||||
|
||||
DominatorTreeBase::Node *PostDominatorTree::getNodeForBlock(BasicBlock *BB) {
|
||||
@@ -258,7 +258,7 @@ void PostDominatorTree::calculate(const ImmediatePostDominators &IPD) {
|
||||
// PostETForest Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static RegisterAnalysis<PostETForest>
|
||||
static RegisterPass<PostETForest>
|
||||
G("postetforest", "Post-ET-Forest Construction", true);
|
||||
|
||||
ETNode *PostETForest::getNodeForBlock(BasicBlock *BB) {
|
||||
@@ -322,7 +322,7 @@ void PostETForest::calculate(const ImmediatePostDominators &ID) {
|
||||
// PostDominanceFrontier Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static RegisterAnalysis<PostDominanceFrontier>
|
||||
static RegisterPass<PostDominanceFrontier>
|
||||
H("postdomfrontier", "Post-Dominance Frontier Construction", true);
|
||||
|
||||
const DominanceFrontier::DomSetType &
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
RegisterAnalysis<ScalarEvolution>
|
||||
RegisterPass<ScalarEvolution>
|
||||
R("scalar-evolution", "Scalar Evolution Analysis");
|
||||
|
||||
Statistic<>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
RegisterAnalysis<LiveIntervals> X("liveintervals", "Live Interval Analysis");
|
||||
RegisterPass<LiveIntervals> X("liveintervals", "Live Interval Analysis");
|
||||
|
||||
static Statistic<> numIntervals
|
||||
("liveintervals", "Number of original intervals");
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <iostream>
|
||||
using namespace llvm;
|
||||
|
||||
static RegisterAnalysis<LiveVariables> X("livevars", "Live Variable Analysis");
|
||||
static RegisterPass<LiveVariables> X("livevars", "Live Variable Analysis");
|
||||
|
||||
void LiveVariables::VarInfo::dump() const {
|
||||
std::cerr << "Register Defined by: ";
|
||||
|
||||
@@ -44,7 +44,7 @@ using namespace llvm;
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static RegisterAnalysis<ImmediateDominators>
|
||||
static RegisterPass<ImmediateDominators>
|
||||
C("idom", "Immediate Dominators Construction", true);
|
||||
|
||||
unsigned ImmediateDominators::DFSPass(BasicBlock *V, InfoRec &VInfo,
|
||||
@@ -243,7 +243,7 @@ void ImmediateDominatorsBase::print(std::ostream &o, const Module* ) const {
|
||||
// DominatorSet Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static RegisterAnalysis<DominatorSet>
|
||||
static RegisterPass<DominatorSet>
|
||||
B("domset", "Dominator Set Construction", true);
|
||||
|
||||
// dominates - Return true if A dominates B. This performs the special checks
|
||||
@@ -343,7 +343,7 @@ void DominatorSetBase::print(std::ostream &o, const Module* ) const {
|
||||
// DominatorTree Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static RegisterAnalysis<DominatorTree>
|
||||
static RegisterPass<DominatorTree>
|
||||
E("domtree", "Dominator Tree Construction", true);
|
||||
|
||||
// DominatorTreeBase::reset - Free all of the tree node memory.
|
||||
@@ -434,7 +434,7 @@ void DominatorTreeBase::print(std::ostream &o, const Module* ) const {
|
||||
// DominanceFrontier Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static RegisterAnalysis<DominanceFrontier>
|
||||
static RegisterPass<DominanceFrontier>
|
||||
G("domfrontier", "Dominance Frontier Construction", true);
|
||||
|
||||
const DominanceFrontier::DomSetType &
|
||||
@@ -813,7 +813,7 @@ ETNode *ETNode::NCA(ETNode *other) {
|
||||
// ETForest implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static RegisterAnalysis<ETForest>
|
||||
static RegisterPass<ETForest>
|
||||
D("etforest", "ET Forest Construction", true);
|
||||
|
||||
void ETForestBase::reset() {
|
||||
|
||||
Reference in New Issue
Block a user