mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-07 16:42:07 +00:00
Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9869413802
commit
081c34b725
@ -717,6 +717,7 @@ public:
|
||||
DominatorTreeBase<BasicBlock>* DT;
|
||||
|
||||
DominatorTree() : FunctionPass(ID) {
|
||||
initializeDominatorTreePass(*PassRegistry::getPassRegistry());
|
||||
DT = new DominatorTreeBase<BasicBlock>(false);
|
||||
}
|
||||
|
||||
@ -1028,7 +1029,9 @@ class DominanceFrontier : public DominanceFrontierBase {
|
||||
public:
|
||||
static char ID; // Pass ID, replacement for typeid
|
||||
DominanceFrontier() :
|
||||
DominanceFrontierBase(ID, false) {}
|
||||
DominanceFrontierBase(ID, false) {
|
||||
initializeDominanceFrontierPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
BasicBlock *getRoot() const {
|
||||
assert(Roots.size() == 1 && "Should always have entry node!");
|
||||
|
@ -26,7 +26,9 @@ class FindUsedTypes : public ModulePass {
|
||||
std::set<const Type *> UsedTypes;
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
FindUsedTypes() : ModulePass(ID) {}
|
||||
FindUsedTypes() : ModulePass(ID) {
|
||||
initializeFindUsedTypesPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
/// getTypes - After the pass has been run, return the set containing all of
|
||||
/// the types used in the module.
|
||||
|
@ -48,7 +48,9 @@ class IntervalPartition : public FunctionPass {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
|
||||
IntervalPartition() : FunctionPass(ID), RootInterval(0) {}
|
||||
IntervalPartition() : FunctionPass(ID), RootInterval(0) {
|
||||
initializeIntervalPartitionPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
// run - Calculate the interval partition for this function
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
@ -31,7 +31,9 @@ class LazyValueInfo : public FunctionPass {
|
||||
void operator=(const LazyValueInfo&); // DO NOT IMPLEMENT.
|
||||
public:
|
||||
static char ID;
|
||||
LazyValueInfo() : FunctionPass(ID), PImpl(0) {}
|
||||
LazyValueInfo() : FunctionPass(ID), PImpl(0) {
|
||||
initializeLazyValueInfoPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
~LazyValueInfo() { assert(PImpl == 0 && "releaseMemory not called"); }
|
||||
|
||||
/// Tristate - This is used to return true/false/dunno results.
|
||||
|
@ -28,10 +28,12 @@ namespace llvm {
|
||||
LibCallInfo *LCI;
|
||||
|
||||
explicit LibCallAliasAnalysis(LibCallInfo *LC = 0)
|
||||
: FunctionPass(ID), LCI(LC) {
|
||||
: FunctionPass(ID), LCI(LC) {
|
||||
initializeLibCallAliasAnalysisPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
explicit LibCallAliasAnalysis(char &ID, LibCallInfo *LC)
|
||||
: FunctionPass(ID), LCI(LC) {
|
||||
: FunctionPass(ID), LCI(LC) {
|
||||
initializeLibCallAliasAnalysisPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
~LibCallAliasAnalysis();
|
||||
|
||||
|
@ -91,7 +91,9 @@ class LoopDependenceAnalysis : public LoopPass {
|
||||
|
||||
public:
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
LoopDependenceAnalysis() : LoopPass(ID) {}
|
||||
LoopDependenceAnalysis() : LoopPass(ID) {
|
||||
initializeLoopDependenceAnalysisPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
/// isDependencePair - Check whether two values can possibly give rise to
|
||||
/// a data dependence: that is the case if both are instructions accessing
|
||||
|
@ -939,7 +939,9 @@ class LoopInfo : public FunctionPass {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
|
||||
LoopInfo() : FunctionPass(ID) {}
|
||||
LoopInfo() : FunctionPass(ID) {
|
||||
initializeLoopInfoPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
LoopInfoBase<BasicBlock, Loop>& getBase() { return LI; }
|
||||
|
||||
|
@ -26,6 +26,7 @@ struct PostDominatorTree : public FunctionPass {
|
||||
DominatorTreeBase<BasicBlock>* DT;
|
||||
|
||||
PostDominatorTree() : FunctionPass(ID) {
|
||||
initializePostDominatorTreePass(*PassRegistry::getPassRegistry());
|
||||
DT = new DominatorTreeBase<BasicBlock>(true);
|
||||
}
|
||||
|
||||
@ -106,7 +107,9 @@ template <> struct GraphTraits<PostDominatorTree*>
|
||||
struct PostDominanceFrontier : public DominanceFrontierBase {
|
||||
static char ID;
|
||||
PostDominanceFrontier()
|
||||
: DominanceFrontierBase(ID, true) {}
|
||||
: DominanceFrontierBase(ID, true) {
|
||||
initializePostDominanceFrontierPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function &) {
|
||||
Frontiers.clear();
|
||||
|
@ -48,7 +48,9 @@ namespace llvm {
|
||||
public:
|
||||
static char ID;
|
||||
|
||||
CalculateSpillWeights() : MachineFunctionPass(ID) {}
|
||||
CalculateSpillWeights() : MachineFunctionPass(ID) {
|
||||
initializeCalculateSpillWeightsPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &au) const;
|
||||
|
||||
|
@ -68,7 +68,9 @@ namespace llvm {
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
LiveIntervals() : MachineFunctionPass(ID) {}
|
||||
LiveIntervals() : MachineFunctionPass(ID) {
|
||||
initializeLiveIntervalsPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
// Calculate the spill weight to assign to a single instruction.
|
||||
static float getSpillWeight(bool isDef, bool isUse, unsigned loopDepth);
|
||||
|
@ -39,7 +39,9 @@ namespace llvm {
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
LiveStacks() : MachineFunctionPass(ID) {}
|
||||
LiveStacks() : MachineFunctionPass(ID) {
|
||||
initializeLiveStacksPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
typedef SS2IntervalMap::iterator iterator;
|
||||
typedef SS2IntervalMap::const_iterator const_iterator;
|
||||
|
@ -46,7 +46,9 @@ class TargetRegisterInfo;
|
||||
class LiveVariables : public MachineFunctionPass {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
LiveVariables() : MachineFunctionPass(ID) {}
|
||||
LiveVariables() : MachineFunctionPass(ID) {
|
||||
initializeLiveVariablesPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
/// VarInfo - This represents the regions where a virtual register is live in
|
||||
/// the program. We represent this with three different pieces of
|
||||
|
@ -67,7 +67,9 @@ class MachineLoopInfo : public MachineFunctionPass {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
|
||||
MachineLoopInfo() : MachineFunctionPass(ID) {}
|
||||
MachineLoopInfo() : MachineFunctionPass(ID) {
|
||||
initializeMachineLoopInfoPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
LoopInfoBase<MachineBasicBlock, MachineLoop>& getBase() { return LI; }
|
||||
|
||||
|
@ -31,7 +31,9 @@ namespace llvm {
|
||||
public:
|
||||
static char ID;
|
||||
|
||||
ProcessImplicitDefs() : MachineFunctionPass(ID) {}
|
||||
ProcessImplicitDefs() : MachineFunctionPass(ID) {
|
||||
initializeProcessImplicitDefsPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &au) const;
|
||||
|
||||
|
@ -469,7 +469,9 @@ namespace llvm {
|
||||
public:
|
||||
static char ID;
|
||||
|
||||
SlotIndexes() : MachineFunctionPass(ID), indexListHead(0) {}
|
||||
SlotIndexes() : MachineFunctionPass(ID), indexListHead(0) {
|
||||
initializeSlotIndexesPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &au) const;
|
||||
virtual void releaseMemory();
|
||||
|
@ -132,6 +132,7 @@ void initializeLoopStrengthReducePass(PassRegistry&);
|
||||
void initializeLoopUnrollPass(PassRegistry&);
|
||||
void initializeLoopUnswitchPass(PassRegistry&);
|
||||
void initializeLowerAtomicPass(PassRegistry&);
|
||||
void initializeLowerIntrinsicsPass(PassRegistry&);
|
||||
void initializeLowerInvokePass(PassRegistry&);
|
||||
void initializeLowerSetJmpPass(PassRegistry&);
|
||||
void initializeLowerSwitchPass(PassRegistry&);
|
||||
|
@ -151,8 +151,7 @@ private:
|
||||
sys::MemoryFence(); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis);
|
||||
}
|
||||
|
||||
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis) \
|
||||
static void* initialize##passName##PassOnce(PassRegistry &Registry) {
|
||||
@ -183,8 +182,7 @@ private:
|
||||
sys::MemoryFence(); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis);
|
||||
}
|
||||
|
||||
template<typename PassName>
|
||||
Pass *callDefaultCtor() { return new PassName(); }
|
||||
@ -282,12 +280,12 @@ struct RegisterAnalysisGroup : public RegisterAGBase {
|
||||
sys::MemoryFence(); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
static RegisterAnalysisGroup<agName> agName##_info (name);
|
||||
}
|
||||
|
||||
|
||||
#define INITIALIZE_AG_PASS(passName, agName, arg, name, cfg, analysis, def) \
|
||||
static void* initialize##passName##PassOnce(PassRegistry &Registry) { \
|
||||
if (!def) initialize##agName##AnalysisGroup(Registry); \
|
||||
PassInfo *PI = new PassInfo(name, arg, & passName ::ID, \
|
||||
PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
|
||||
Registry.registerPass(*PI); \
|
||||
@ -311,13 +309,12 @@ struct RegisterAnalysisGroup : public RegisterAGBase {
|
||||
sys::MemoryFence(); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis); \
|
||||
static RegisterAnalysisGroup<agName, def> passName ## _ag(passName ## _info);
|
||||
}
|
||||
|
||||
|
||||
#define INITIALIZE_AG_PASS_BEGIN(passName, agName, arg, n, cfg, analysis, def) \
|
||||
static void* initialize##passName##PassOnce(PassRegistry &Registry) {
|
||||
static void* initialize##passName##PassOnce(PassRegistry &Registry) { \
|
||||
if (!def) initialize##agName##AnalysisGroup(Registry);
|
||||
|
||||
#define INITIALIZE_AG_PASS_END(passName, agName, arg, n, cfg, analysis, def) \
|
||||
PassInfo *PI = new PassInfo(n, arg, & passName ::ID, \
|
||||
@ -343,9 +340,7 @@ struct RegisterAnalysisGroup : public RegisterAGBase {
|
||||
sys::MemoryFence(); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
static RegisterPass<passName> passName ## _info(arg, n, cfg, analysis); \
|
||||
static RegisterAnalysisGroup<agName, def> passName ## _ag(passName ## _info);
|
||||
}
|
||||
|
||||
//===---------------------------------------------------------------------------
|
||||
/// PassRegistrationListener class - This class is meant to be derived from by
|
||||
|
@ -27,7 +27,9 @@ struct UnifyFunctionExitNodes : public FunctionPass {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
UnifyFunctionExitNodes() : FunctionPass(ID),
|
||||
ReturnBlock(0), UnwindBlock(0) {}
|
||||
ReturnBlock(0), UnwindBlock(0) {
|
||||
initializeUnifyFunctionExitNodesPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
// We can preserve non-critical-edgeness when we unify function exit nodes
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
|
||||
|
@ -36,7 +36,7 @@
|
||||
using namespace llvm;
|
||||
|
||||
// Register the AliasAnalysis interface, providing a nice name to refer to.
|
||||
INITIALIZE_ANALYSIS_GROUP(AliasAnalysis, "Alias Analysis", BasicAliasAnalysis)
|
||||
INITIALIZE_ANALYSIS_GROUP(AliasAnalysis, "Alias Analysis", NoAA)
|
||||
char AliasAnalysis::ID = 0;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -35,6 +35,7 @@ namespace {
|
||||
public:
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
AliasAnalysisCounter() : ModulePass(ID) {
|
||||
initializeAliasAnalysisCounterPass(*PassRegistry::getPassRegistry());
|
||||
No = May = Must = 0;
|
||||
NoMR = JustRef = JustMod = MR = 0;
|
||||
}
|
||||
|
@ -50,7 +50,9 @@ namespace {
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
AAEval() : FunctionPass(ID) {}
|
||||
AAEval() : FunctionPass(ID) {
|
||||
initializeAAEvalPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<AliasAnalysis>();
|
||||
|
@ -39,7 +39,9 @@ namespace {
|
||||
|
||||
public:
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
AliasDebugger() : ModulePass(ID) {}
|
||||
AliasDebugger() : ModulePass(ID) {
|
||||
initializeAliasDebuggerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
bool runOnModule(Module &M) {
|
||||
InitializeAliasAnalysis(this); // set up super class
|
||||
|
@ -614,7 +614,9 @@ namespace {
|
||||
AliasSetTracker *Tracker;
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
AliasSetPrinter() : FunctionPass(ID) {}
|
||||
AliasSetPrinter() : FunctionPass(ID) {
|
||||
initializeAliasSetPrinterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesAll();
|
||||
|
@ -140,8 +140,10 @@ namespace {
|
||||
///
|
||||
struct NoAA : public ImmutablePass, public AliasAnalysis {
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
NoAA() : ImmutablePass(ID) {}
|
||||
explicit NoAA(char &PID) : ImmutablePass(PID) { }
|
||||
NoAA() : ImmutablePass(ID) {
|
||||
initializeNoAAPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
explicit NoAA(char &PID) : ImmutablePass(PID) {}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
}
|
||||
@ -490,7 +492,9 @@ namespace {
|
||||
/// derives from the NoAA class.
|
||||
struct BasicAliasAnalysis : public NoAA {
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
BasicAliasAnalysis() : NoAA(ID) {}
|
||||
BasicAliasAnalysis() : NoAA(ID) {
|
||||
initializeBasicAliasAnalysisPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void initializePass() {
|
||||
InitializeAliasAnalysis(this);
|
||||
|
@ -25,7 +25,9 @@ using namespace llvm;
|
||||
namespace {
|
||||
struct CFGViewer : public FunctionPass {
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
CFGViewer() : FunctionPass(ID) {}
|
||||
CFGViewer() : FunctionPass(ID) {
|
||||
initializeCFGOnlyViewerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
F.viewCFG();
|
||||
@ -46,7 +48,9 @@ INITIALIZE_PASS(CFGViewer, "view-cfg", "View CFG of function", false, true)
|
||||
namespace {
|
||||
struct CFGOnlyViewer : public FunctionPass {
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
CFGOnlyViewer() : FunctionPass(ID) {}
|
||||
CFGOnlyViewer() : FunctionPass(ID) {
|
||||
initializeCFGOnlyViewerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
F.viewCFGOnly();
|
||||
@ -68,7 +72,9 @@ INITIALIZE_PASS(CFGOnlyViewer, "view-cfg-only",
|
||||
namespace {
|
||||
struct CFGPrinter : public FunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
CFGPrinter() : FunctionPass(ID) {}
|
||||
CFGPrinter() : FunctionPass(ID) {
|
||||
initializeCFGPrinterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
std::string Filename = "cfg." + F.getNameStr() + ".dot";
|
||||
@ -100,7 +106,10 @@ INITIALIZE_PASS(CFGPrinter, "dot-cfg", "Print CFG of function to 'dot' file",
|
||||
namespace {
|
||||
struct CFGOnlyPrinter : public FunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
CFGOnlyPrinter() : FunctionPass(ID) {}
|
||||
CFGOnlyPrinter() : FunctionPass(ID) {
|
||||
initializeCFGOnlyPrinterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
std::string Filename = "cfg." + F.getNameStr() + ".dot";
|
||||
errs() << "Writing '" << Filename << "'...";
|
||||
|
@ -40,7 +40,9 @@ namespace {
|
||||
void printVariableDeclaration(const Value *V);
|
||||
public:
|
||||
static char ID; // Pass identification
|
||||
PrintDbgInfo() : FunctionPass(ID), Out(errs()) {}
|
||||
PrintDbgInfo() : FunctionPass(ID), Out(errs()) {
|
||||
initializePrintDbgInfoPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function &F);
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
|
@ -86,27 +86,35 @@ namespace {
|
||||
struct DomViewer
|
||||
: public DOTGraphTraitsViewer<DominatorTree, false> {
|
||||
static char ID;
|
||||
DomViewer() : DOTGraphTraitsViewer<DominatorTree, false>("dom", ID){}
|
||||
DomViewer() : DOTGraphTraitsViewer<DominatorTree, false>("dom", ID){
|
||||
initializeDomViewerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
|
||||
struct DomOnlyViewer
|
||||
: public DOTGraphTraitsViewer<DominatorTree, true> {
|
||||
static char ID;
|
||||
DomOnlyViewer() : DOTGraphTraitsViewer<DominatorTree, true>("domonly", ID){}
|
||||
DomOnlyViewer() : DOTGraphTraitsViewer<DominatorTree, true>("domonly", ID){
|
||||
initializeDomOnlyViewerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
|
||||
struct PostDomViewer
|
||||
: public DOTGraphTraitsViewer<PostDominatorTree, false> {
|
||||
static char ID;
|
||||
PostDomViewer() :
|
||||
DOTGraphTraitsViewer<PostDominatorTree, false>("postdom", ID){}
|
||||
DOTGraphTraitsViewer<PostDominatorTree, false>("postdom", ID){
|
||||
initializePostDomViewerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
|
||||
struct PostDomOnlyViewer
|
||||
: public DOTGraphTraitsViewer<PostDominatorTree, true> {
|
||||
static char ID;
|
||||
PostDomOnlyViewer() :
|
||||
DOTGraphTraitsViewer<PostDominatorTree, true>("postdomonly", ID){}
|
||||
DOTGraphTraitsViewer<PostDominatorTree, true>("postdomonly", ID){
|
||||
initializePostDomOnlyViewerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
@ -133,27 +141,35 @@ namespace {
|
||||
struct DomPrinter
|
||||
: public DOTGraphTraitsPrinter<DominatorTree, false> {
|
||||
static char ID;
|
||||
DomPrinter() : DOTGraphTraitsPrinter<DominatorTree, false>("dom", ID) {}
|
||||
DomPrinter() : DOTGraphTraitsPrinter<DominatorTree, false>("dom", ID) {
|
||||
initializeDomPrinterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
|
||||
struct DomOnlyPrinter
|
||||
: public DOTGraphTraitsPrinter<DominatorTree, true> {
|
||||
static char ID;
|
||||
DomOnlyPrinter() : DOTGraphTraitsPrinter<DominatorTree, true>("domonly", ID) {}
|
||||
DomOnlyPrinter() : DOTGraphTraitsPrinter<DominatorTree, true>("domonly", ID) {
|
||||
initializeDomOnlyPrinterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
|
||||
struct PostDomPrinter
|
||||
: public DOTGraphTraitsPrinter<PostDominatorTree, false> {
|
||||
static char ID;
|
||||
PostDomPrinter() :
|
||||
DOTGraphTraitsPrinter<PostDominatorTree, false>("postdom", ID) {}
|
||||
DOTGraphTraitsPrinter<PostDominatorTree, false>("postdom", ID) {
|
||||
initializePostDomPrinterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
|
||||
struct PostDomOnlyPrinter
|
||||
: public DOTGraphTraitsPrinter<PostDominatorTree, true> {
|
||||
static char ID;
|
||||
PostDomOnlyPrinter() :
|
||||
DOTGraphTraitsPrinter<PostDominatorTree, true>("postdomonly", ID) {}
|
||||
DOTGraphTraitsPrinter<PostDominatorTree, true>("postdomonly", ID) {
|
||||
initializePostDomOnlyPrinterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
|
@ -43,7 +43,9 @@ class BasicCallGraph : public ModulePass, public CallGraph {
|
||||
public:
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
BasicCallGraph() : ModulePass(ID), Root(0),
|
||||
ExternalCallingNode(0), CallsExternalNode(0) {}
|
||||
ExternalCallingNode(0), CallsExternalNode(0) {
|
||||
initializeBasicCallGraphPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
// runOnModule - Compute the call graph for the specified module.
|
||||
virtual bool runOnModule(Module &M) {
|
||||
|
@ -88,7 +88,9 @@ namespace {
|
||||
|
||||
public:
|
||||
static char ID;
|
||||
GlobalsModRef() : ModulePass(ID) {}
|
||||
GlobalsModRef() : ModulePass(ID) {
|
||||
initializeGlobalsModRefPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
bool runOnModule(Module &M) {
|
||||
InitializeAliasAnalysis(this); // set up super class
|
||||
|
@ -149,7 +149,8 @@ IVStrideUse &IVUsers::AddUser(Instruction *User, Value *Operand) {
|
||||
}
|
||||
|
||||
IVUsers::IVUsers()
|
||||
: LoopPass(ID) {
|
||||
: LoopPass(ID) {
|
||||
initializeIVUsersPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
void IVUsers::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
|
@ -51,7 +51,9 @@ namespace {
|
||||
}
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
InstCount() : FunctionPass(ID) {}
|
||||
InstCount() : FunctionPass(ID) {
|
||||
initializeInstCountPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
||||
|
@ -108,7 +108,9 @@ namespace {
|
||||
raw_string_ostream MessagesStr;
|
||||
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
Lint() : FunctionPass(ID), MessagesStr(Messages) {}
|
||||
Lint() : FunctionPass(ID), MessagesStr(Messages) {
|
||||
initializeLintPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
||||
|
@ -29,7 +29,9 @@ INITIALIZE_PASS_DEPENDENCY(LoopInfo)
|
||||
INITIALIZE_PASS_END(LiveValues, "live-values",
|
||||
"Value Liveness Analysis", false, true)
|
||||
|
||||
LiveValues::LiveValues() : FunctionPass(ID) {}
|
||||
LiveValues::LiveValues() : FunctionPass(ID) {
|
||||
initializeLiveValuesPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
void LiveValues::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<DominatorTree>();
|
||||
|
@ -31,7 +31,9 @@ namespace {
|
||||
DepSetMap Deps;
|
||||
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
MemDepPrinter() : FunctionPass(ID) {}
|
||||
MemDepPrinter() : FunctionPass(ID) {
|
||||
initializeMemDepPrinterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
||||
|
@ -55,6 +55,7 @@ INITIALIZE_PASS_END(MemoryDependenceAnalysis, "memdep",
|
||||
|
||||
MemoryDependenceAnalysis::MemoryDependenceAnalysis()
|
||||
: FunctionPass(ID), PredCache(0) {
|
||||
initializeMemoryDependenceAnalysisPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
MemoryDependenceAnalysis::~MemoryDependenceAnalysis() {
|
||||
}
|
||||
|
@ -30,7 +30,9 @@ namespace {
|
||||
DebugInfoFinder Finder;
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
ModuleDebugInfoPrinter() : ModulePass(ID) {}
|
||||
ModuleDebugInfoPrinter() : ModulePass(ID) {
|
||||
initializeModuleDebugInfoPrinterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnModule(Module &M);
|
||||
|
||||
|
@ -39,7 +39,8 @@ namespace {
|
||||
public:
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
explicit ProfileEstimatorPass(const double execcount = 0)
|
||||
: FunctionPass(ID), ExecCount(execcount) {
|
||||
: FunctionPass(ID), ExecCount(execcount) {
|
||||
initializeProfileEstimatorPassPass(*PassRegistry::getPassRegistry());
|
||||
if (execcount == 0) ExecCount = LoopWeight;
|
||||
}
|
||||
|
||||
|
@ -1077,7 +1077,9 @@ raw_ostream& operator<<(raw_ostream &O, std::pair<const MachineBasicBlock *, con
|
||||
namespace {
|
||||
struct NoProfileInfo : public ImmutablePass, public ProfileInfo {
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
NoProfileInfo() : ImmutablePass(ID) {}
|
||||
NoProfileInfo() : ImmutablePass(ID) {
|
||||
initializeNoProfileInfoPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
/// getAdjustedAnalysisPointer - This method is used when a pass implements
|
||||
/// an analysis interface through multiple inheritance. If needed, it
|
||||
|
@ -46,6 +46,7 @@ namespace {
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
explicit LoaderPass(const std::string &filename = "")
|
||||
: ModulePass(ID), Filename(filename) {
|
||||
initializeLoaderPassPass(*PassRegistry::getPassRegistry());
|
||||
if (filename.empty()) Filename = ProfileInfoFilename;
|
||||
}
|
||||
|
||||
|
@ -60,10 +60,12 @@ namespace llvm {
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
|
||||
explicit ProfileVerifierPassT () : FunctionPass(ID) {
|
||||
initializeProfileVerifierPassPass(*PassRegistry::getPassRegistry());
|
||||
DisableAssertions = ProfileVerifierDisableAssertions;
|
||||
}
|
||||
explicit ProfileVerifierPassT (bool da) : FunctionPass(ID),
|
||||
DisableAssertions(da) {
|
||||
initializeProfileVerifierPassPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
|
@ -662,6 +662,7 @@ void RegionInfo::releaseMemory() {
|
||||
}
|
||||
|
||||
RegionInfo::RegionInfo() : FunctionPass(ID) {
|
||||
initializeRegionInfoPass(*PassRegistry::getPassRegistry());
|
||||
TopLevelRegion = 0;
|
||||
}
|
||||
|
||||
|
@ -121,14 +121,18 @@ namespace {
|
||||
struct RegionViewer
|
||||
: public DOTGraphTraitsViewer<RegionInfo, false> {
|
||||
static char ID;
|
||||
RegionViewer() : DOTGraphTraitsViewer<RegionInfo, false>("reg", ID){}
|
||||
RegionViewer() : DOTGraphTraitsViewer<RegionInfo, false>("reg", ID){
|
||||
initializeRegionViewerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
char RegionViewer::ID = 0;
|
||||
|
||||
struct RegionOnlyViewer
|
||||
: public DOTGraphTraitsViewer<RegionInfo, true> {
|
||||
static char ID;
|
||||
RegionOnlyViewer() : DOTGraphTraitsViewer<RegionInfo, true>("regonly", ID){}
|
||||
RegionOnlyViewer() : DOTGraphTraitsViewer<RegionInfo, true>("regonly", ID) {
|
||||
initializeRegionOnlyViewerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
char RegionOnlyViewer::ID = 0;
|
||||
|
||||
@ -136,7 +140,9 @@ struct RegionPrinter
|
||||
: public DOTGraphTraitsPrinter<RegionInfo, false> {
|
||||
static char ID;
|
||||
RegionPrinter() :
|
||||
DOTGraphTraitsPrinter<RegionInfo, false>("reg", ID) {}
|
||||
DOTGraphTraitsPrinter<RegionInfo, false>("reg", ID) {
|
||||
initializeRegionPrinterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
char RegionPrinter::ID = 0;
|
||||
} //end anonymous namespace
|
||||
@ -157,7 +163,9 @@ struct RegionOnlyPrinter
|
||||
: public DOTGraphTraitsPrinter<RegionInfo, true> {
|
||||
static char ID;
|
||||
RegionOnlyPrinter() :
|
||||
DOTGraphTraitsPrinter<RegionInfo, true>("reg", ID) {}
|
||||
DOTGraphTraitsPrinter<RegionInfo, true>("reg", ID) {
|
||||
initializeRegionOnlyPrinterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -5835,6 +5835,7 @@ ScalarEvolution::SCEVCallbackVH::SCEVCallbackVH(Value *V, ScalarEvolution *se)
|
||||
|
||||
ScalarEvolution::ScalarEvolution()
|
||||
: FunctionPass(ID), FirstUnknown(0) {
|
||||
initializeScalarEvolutionPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
bool ScalarEvolution::runOnFunction(Function &F) {
|
||||
|
@ -34,7 +34,10 @@ namespace {
|
||||
|
||||
public:
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
ScalarEvolutionAliasAnalysis() : FunctionPass(ID), SE(0) {}
|
||||
ScalarEvolutionAliasAnalysis() : FunctionPass(ID), SE(0) {
|
||||
initializeScalarEvolutionAliasAnalysisPass(
|
||||
*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
/// getAdjustedAnalysisPointer - This method is used when a pass implements
|
||||
/// an analysis interface through multiple inheritance. If needed, it
|
||||
|
@ -85,7 +85,9 @@ namespace {
|
||||
public AliasAnalysis {
|
||||
public:
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
TypeBasedAliasAnalysis() : ImmutablePass(ID) {}
|
||||
TypeBasedAliasAnalysis() : ImmutablePass(ID) {
|
||||
initializeTypeBasedAliasAnalysisPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void initializePass() {
|
||||
InitializeAliasAnalysis(this);
|
||||
|
@ -52,6 +52,7 @@ void llvm::initializeCodeGen(PassRegistry &Registry) {
|
||||
initializeUnreachableBlockElimPass(Registry);
|
||||
initializeUnreachableMachineBlockElimPass(Registry);
|
||||
initializeVirtRegMapPass(Registry);
|
||||
initializeLowerIntrinsicsPass(Registry);
|
||||
}
|
||||
|
||||
void LLVMInitializeCodeGen(LLVMPassRegistryRef R) {
|
||||
|
@ -36,7 +36,9 @@ namespace {
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
DeadMachineInstructionElim() : MachineFunctionPass(ID) {}
|
||||
DeadMachineInstructionElim() : MachineFunctionPass(ID) {
|
||||
initializeDeadMachineInstructionElimPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
private:
|
||||
bool isDead(const MachineInstr *MI) const;
|
||||
|
@ -100,7 +100,9 @@ namespace {
|
||||
DwarfEHPrepare(const TargetMachine *tm) :
|
||||
FunctionPass(ID), TM(tm), TLI(TM->getTargetLowering()),
|
||||
ExceptionValueIntrinsic(0), SelectorIntrinsic(0),
|
||||
URoR(0), EHCatchAllValue(0), RewindFunction(0) {}
|
||||
URoR(0), EHCatchAllValue(0), RewindFunction(0) {
|
||||
initializeDominatorTreePass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function &Fn);
|
||||
|
||||
|
@ -69,7 +69,9 @@ GCFunctionInfo::~GCFunctionInfo() {}
|
||||
char GCModuleInfo::ID = 0;
|
||||
|
||||
GCModuleInfo::GCModuleInfo()
|
||||
: ImmutablePass(ID) {}
|
||||
: ImmutablePass(ID) {
|
||||
initializeGCModuleInfoPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
GCModuleInfo::~GCModuleInfo() {
|
||||
clear();
|
||||
|
@ -123,6 +123,11 @@ GCFunctionInfo *GCStrategy::insertFunctionInfo(const Function &F) {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
INITIALIZE_PASS_BEGIN(LowerIntrinsics, "gc-lowering", "GC Lowering",
|
||||
false, false)
|
||||
INITIALIZE_PASS_DEPENDENCY(GCModuleInfo)
|
||||
INITIALIZE_PASS_END(LowerIntrinsics, "gc-lowering", "GC Lowering", false, false)
|
||||
|
||||
FunctionPass *llvm::createGCLoweringPass() {
|
||||
return new LowerIntrinsics();
|
||||
}
|
||||
@ -130,7 +135,9 @@ FunctionPass *llvm::createGCLoweringPass() {
|
||||
char LowerIntrinsics::ID = 0;
|
||||
|
||||
LowerIntrinsics::LowerIntrinsics()
|
||||
: FunctionPass(ID) {}
|
||||
: FunctionPass(ID) {
|
||||
initializeLowerIntrinsicsPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
const char *LowerIntrinsics::getPassName() const {
|
||||
return "Lower Garbage Collection Instructions";
|
||||
|
@ -158,7 +158,9 @@ namespace {
|
||||
int FnNum;
|
||||
public:
|
||||
static char ID;
|
||||
IfConverter() : MachineFunctionPass(ID), FnNum(-1) {}
|
||||
IfConverter() : MachineFunctionPass(ID), FnNum(-1) {
|
||||
initializeIfConverterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<MachineLoopInfo>();
|
||||
|
@ -41,7 +41,9 @@ namespace {
|
||||
MachineRegisterInfo *MRI;
|
||||
public:
|
||||
static char ID; // Pass identification
|
||||
MachineCSE() : MachineFunctionPass(ID), LookAheadLimit(5), CurrVN(0) {}
|
||||
MachineCSE() : MachineFunctionPass(ID), LookAheadLimit(5), CurrVN(0) {
|
||||
initializeMachineCSEPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
||||
|
@ -42,6 +42,7 @@ bool MachineDominatorTree::runOnMachineFunction(MachineFunction &F) {
|
||||
|
||||
MachineDominatorTree::MachineDominatorTree()
|
||||
: MachineFunctionPass(ID) {
|
||||
initializeMachineDominatorTreePass(*PassRegistry::getPassRegistry());
|
||||
DT = new DominatorTreeBase<MachineBasicBlock>(false);
|
||||
}
|
||||
|
||||
|
@ -101,10 +101,14 @@ namespace {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
MachineLICM() :
|
||||
MachineFunctionPass(ID), PreRegAlloc(true) {}
|
||||
MachineFunctionPass(ID), PreRegAlloc(true) {
|
||||
initializeMachineLICMPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
explicit MachineLICM(bool PreRA) :
|
||||
MachineFunctionPass(ID), PreRegAlloc(PreRA) {}
|
||||
MachineFunctionPass(ID), PreRegAlloc(PreRA) {
|
||||
initializeMachineLICMPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
||||
|
@ -258,6 +258,7 @@ MachineModuleInfo::MachineModuleInfo(const MCAsmInfo &MAI)
|
||||
ObjFileMMI(0),
|
||||
CurCallSite(0), CallsEHReturn(0), CallsUnwindInit(0), DbgInfoAvailable(false),
|
||||
CallsExternalFunctionWithFloatingPointArguments(false) {
|
||||
initializeMachineModuleInfoPass(*PassRegistry::getPassRegistry());
|
||||
// Always emit some info, by default "no personality" info.
|
||||
Personalities.push_back(NULL);
|
||||
AddrLabelSymbols = 0;
|
||||
|
@ -57,7 +57,9 @@ namespace {
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification
|
||||
MachineSinking() : MachineFunctionPass(ID) {}
|
||||
MachineSinking() : MachineFunctionPass(ID) {
|
||||
initializeMachineSinkingPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
||||
|
@ -195,7 +195,9 @@ namespace {
|
||||
static char ID; // Pass ID, replacement for typeid
|
||||
|
||||
MachineVerifierPass()
|
||||
: MachineFunctionPass(ID) {}
|
||||
: MachineFunctionPass(ID) {
|
||||
initializeMachineVerifierPassPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesAll();
|
||||
|
@ -33,7 +33,9 @@ namespace {
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification
|
||||
OptimizePHIs() : MachineFunctionPass(ID) {}
|
||||
OptimizePHIs() : MachineFunctionPass(ID) {
|
||||
initializeOptimizePHIsPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
||||
|
@ -27,7 +27,9 @@ namespace llvm {
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
PHIElimination() : MachineFunctionPass(ID) {}
|
||||
PHIElimination() : MachineFunctionPass(ID) {
|
||||
initializePHIEliminationPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &Fn);
|
||||
|
||||
|
@ -62,7 +62,9 @@ namespace {
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification
|
||||
PeepholeOptimizer() : MachineFunctionPass(ID) {}
|
||||
PeepholeOptimizer() : MachineFunctionPass(ID) {
|
||||
initializePeepholeOptimizerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
||||
|
@ -91,8 +91,9 @@ namespace {
|
||||
|
||||
public:
|
||||
static char ID;
|
||||
PreAllocSplitting()
|
||||
: MachineFunctionPass(ID) {}
|
||||
PreAllocSplitting() : MachineFunctionPass(ID) {
|
||||
initializePreAllocSplittingPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
||||
|
@ -36,7 +36,9 @@ namespace llvm {
|
||||
class PEI : public MachineFunctionPass {
|
||||
public:
|
||||
static char ID;
|
||||
PEI() : MachineFunctionPass(ID) {}
|
||||
PEI() : MachineFunctionPass(ID) {
|
||||
initializePEIPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
const char *getPassName() const {
|
||||
return "Prolog/Epilog Insertion & Frame Finalization";
|
||||
|
@ -48,7 +48,10 @@ namespace {
|
||||
public:
|
||||
static char ID;
|
||||
RAFast() : MachineFunctionPass(ID), StackSlotForVirtReg(-1),
|
||||
isBulkSpilling(false) {}
|
||||
isBulkSpilling(false) {
|
||||
initializePHIEliminationPass(*PassRegistry::getPassRegistry());
|
||||
initializeTwoAddressInstructionPassPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
private:
|
||||
const TargetMachine *TM;
|
||||
MachineFunction *MF;
|
||||
|
@ -91,6 +91,17 @@ namespace {
|
||||
struct RALinScan : public MachineFunctionPass {
|
||||
static char ID;
|
||||
RALinScan() : MachineFunctionPass(ID) {
|
||||
initializeLiveIntervalsPass(*PassRegistry::getPassRegistry());
|
||||
initializeStrongPHIEliminationPass(*PassRegistry::getPassRegistry());
|
||||
initializeRegisterCoalescerAnalysisGroup(
|
||||
*PassRegistry::getPassRegistry());
|
||||
initializeCalculateSpillWeightsPass(*PassRegistry::getPassRegistry());
|
||||
initializePreAllocSplittingPass(*PassRegistry::getPassRegistry());
|
||||
initializeLiveStacksPass(*PassRegistry::getPassRegistry());
|
||||
initializeMachineLoopInfoPass(*PassRegistry::getPassRegistry());
|
||||
initializeVirtRegMapPass(*PassRegistry::getPassRegistry());
|
||||
initializeMachineDominatorTreePass(*PassRegistry::getPassRegistry());
|
||||
|
||||
// Initialize the queue to record recently-used registers.
|
||||
if (NumRecentlyUsedRegs > 0)
|
||||
RecentRegs.resize(NumRecentlyUsedRegs, 0);
|
||||
|
@ -84,7 +84,18 @@ public:
|
||||
static char ID;
|
||||
|
||||
/// Construct a PBQP register allocator.
|
||||
RegAllocPBQP(std::auto_ptr<PBQPBuilder> b) : MachineFunctionPass(ID), builder(b) {}
|
||||
RegAllocPBQP(std::auto_ptr<PBQPBuilder> b)
|
||||
: MachineFunctionPass(ID), builder(b) {
|
||||
initializeSlotIndexesPass(*PassRegistry::getPassRegistry());
|
||||
initializeLiveIntervalsPass(*PassRegistry::getPassRegistry());
|
||||
initializeRegisterCoalescerAnalysisGroup(*PassRegistry::getPassRegistry());
|
||||
initializeCalculateSpillWeightsPass(*PassRegistry::getPassRegistry());
|
||||
initializeLiveStacksPass(*PassRegistry::getPassRegistry());
|
||||
initializeMachineLoopInfoPass(*PassRegistry::getPassRegistry());
|
||||
initializeLoopSplitterPass(*PassRegistry::getPassRegistry());
|
||||
initializeVirtRegMapPass(*PassRegistry::getPassRegistry());
|
||||
initializeRenderMachineFunctionPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
/// Return the pass name.
|
||||
virtual const char* getPassName() const {
|
||||
|
@ -202,7 +202,9 @@ namespace llvm {
|
||||
public:
|
||||
static char ID;
|
||||
|
||||
RenderMachineFunction() : MachineFunctionPass(ID) {}
|
||||
RenderMachineFunction() : MachineFunctionPass(ID) {
|
||||
initializeRenderMachineFunctionPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &au) const;
|
||||
|
||||
|
@ -177,8 +177,10 @@ SelectionDAGISel::SelectionDAGISel(const TargetMachine &tm, CodeGenOpt::Level OL
|
||||
SDB(new SelectionDAGBuilder(*CurDAG, *FuncInfo, OL)),
|
||||
GFI(),
|
||||
OptLevel(OL),
|
||||
DAGSize(0)
|
||||
{}
|
||||
DAGSize(0) {
|
||||
initializeGCModuleInfoPass(*PassRegistry::getPassRegistry());
|
||||
initializeAliasAnalysisAnalysisGroup(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
SelectionDAGISel::~SelectionDAGISel() {
|
||||
delete SDB;
|
||||
|
@ -63,7 +63,9 @@ namespace llvm {
|
||||
|
||||
public:
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
SimpleRegisterCoalescing() : MachineFunctionPass(ID) {}
|
||||
SimpleRegisterCoalescing() : MachineFunctionPass(ID) {
|
||||
initializeSimpleRegisterCoalescingPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
struct InstrSlots {
|
||||
enum {
|
||||
|
@ -36,7 +36,9 @@ namespace llvm {
|
||||
public:
|
||||
static char ID;
|
||||
|
||||
LoopSplitter() : MachineFunctionPass(ID) {}
|
||||
LoopSplitter() : MachineFunctionPass(ID) {
|
||||
initializeLoopSplitterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &au) const;
|
||||
|
||||
|
@ -62,9 +62,13 @@ namespace {
|
||||
bool RequiresStackProtector() const;
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid.
|
||||
StackProtector() : FunctionPass(ID), TLI(0) {}
|
||||
StackProtector() : FunctionPass(ID), TLI(0) {
|
||||
initializeStackProtectorPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
StackProtector(const TargetLowering *tli)
|
||||
: FunctionPass(ID), TLI(tli) {}
|
||||
: FunctionPass(ID), TLI(tli) {
|
||||
initializeStackProtectorPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function &Fn);
|
||||
};
|
||||
|
@ -95,9 +95,13 @@ namespace {
|
||||
public:
|
||||
static char ID; // Pass identification
|
||||
StackSlotColoring() :
|
||||
MachineFunctionPass(ID), ColorWithRegs(false), NextColor(-1) {}
|
||||
MachineFunctionPass(ID), ColorWithRegs(false), NextColor(-1) {
|
||||
initializeStackSlotColoringPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
StackSlotColoring(bool RegColor) :
|
||||
MachineFunctionPass(ID), ColorWithRegs(RegColor), NextColor(-1) {}
|
||||
MachineFunctionPass(ID), ColorWithRegs(RegColor), NextColor(-1) {
|
||||
initializeStackSlotColoringPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
|
@ -39,7 +39,9 @@ using namespace llvm;
|
||||
namespace {
|
||||
struct StrongPHIElimination : public MachineFunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
StrongPHIElimination() : MachineFunctionPass(ID) {}
|
||||
StrongPHIElimination() : MachineFunctionPass(ID) {
|
||||
initializeStrongPHIEliminationPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
// Waiting stores, for each MBB, the set of copies that need to
|
||||
// be inserted into that MBB
|
||||
|
@ -138,7 +138,9 @@ namespace {
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
TwoAddressInstructionPass() : MachineFunctionPass(ID) {}
|
||||
TwoAddressInstructionPass() : MachineFunctionPass(ID) {
|
||||
initializeTwoAddressInstructionPassPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
|
@ -43,7 +43,9 @@ namespace {
|
||||
virtual bool runOnFunction(Function &F);
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
UnreachableBlockElim() : FunctionPass(ID) {}
|
||||
UnreachableBlockElim() : FunctionPass(ID) {
|
||||
initializeUnreachableBlockElimPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addPreserved<ProfileInfo>();
|
||||
|
@ -77,7 +77,9 @@ namespace {
|
||||
public:
|
||||
static char ID;
|
||||
CBackendNameAllUsedStructsAndMergeFunctions()
|
||||
: ModulePass(ID) {}
|
||||
: ModulePass(ID) {
|
||||
initializeFindUsedTypesPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<FindUsedTypes>();
|
||||
}
|
||||
@ -117,6 +119,7 @@ namespace {
|
||||
: FunctionPass(ID), Out(o), IL(0), Mang(0), LI(0),
|
||||
TheModule(0), TAsm(0), TCtx(0), TD(0), OpaqueCounter(0),
|
||||
NextAnonValueNumber(0) {
|
||||
initializeLoopInfoPass(*PassRegistry::getPassRegistry());
|
||||
FPCounter = 0;
|
||||
}
|
||||
|
||||
|
@ -131,6 +131,8 @@ static unsigned getInt(StringRef R) {
|
||||
}
|
||||
|
||||
void TargetData::init(StringRef Desc) {
|
||||
initializeTargetDataPass(*PassRegistry::getPassRegistry());
|
||||
|
||||
LayoutMap = 0;
|
||||
LittleEndian = false;
|
||||
PointerMemSize = 8;
|
||||
|
@ -67,7 +67,9 @@ namespace {
|
||||
virtual bool runOnSCC(CallGraphSCC &SCC);
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
explicit ArgPromotion(unsigned maxElements = 3)
|
||||
: CallGraphSCCPass(ID), maxElements(maxElements) {}
|
||||
: CallGraphSCCPass(ID), maxElements(maxElements) {
|
||||
initializeArgPromotionPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
/// A vector used to hold the indices of a single GEP instruction
|
||||
typedef std::vector<uint64_t> IndicesVector;
|
||||
|
@ -33,7 +33,9 @@ STATISTIC(NumMerged, "Number of global constants merged");
|
||||
namespace {
|
||||
struct ConstantMerge : public ModulePass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
ConstantMerge() : ModulePass(ID) {}
|
||||
ConstantMerge() : ModulePass(ID) {
|
||||
initializeConstantMergePass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
// run - For this pass, process all of the globals in the module,
|
||||
// eliminating duplicate constants.
|
||||
|
@ -126,7 +126,9 @@ namespace {
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
DAE() : ModulePass(ID) {}
|
||||
DAE() : ModulePass(ID) {
|
||||
initializeDAEPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
bool runOnModule(Module &M);
|
||||
|
||||
|
@ -26,7 +26,9 @@ STATISTIC(NumKilled, "Number of unused typenames removed from symtab");
|
||||
namespace {
|
||||
struct DTE : public ModulePass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
DTE() : ModulePass(ID) {}
|
||||
DTE() : ModulePass(ID) {
|
||||
initializeDTEPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
// doPassInitialization - For this pass, it removes global symbol table
|
||||
// entries for primitive types. These are never used for linking in GCC and
|
||||
|
@ -41,7 +41,9 @@ STATISTIC(NumNoAlias, "Number of function returns marked noalias");
|
||||
namespace {
|
||||
struct FunctionAttrs : public CallGraphSCCPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
FunctionAttrs() : CallGraphSCCPass(ID) {}
|
||||
FunctionAttrs() : CallGraphSCCPass(ID) {
|
||||
initializeFunctionAttrsPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
// runOnSCC - Analyze the SCC, performing the transformation if possible.
|
||||
bool runOnSCC(CallGraphSCC &SCC);
|
||||
|
@ -31,7 +31,9 @@ STATISTIC(NumVariables, "Number of global variables removed");
|
||||
namespace {
|
||||
struct GlobalDCE : public ModulePass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
GlobalDCE() : ModulePass(ID) {}
|
||||
GlobalDCE() : ModulePass(ID) {
|
||||
initializeGlobalDCEPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
// run - Do the GlobalDCE pass on the specified module, optionally updating
|
||||
// the specified callgraph to reflect the changes.
|
||||
|
@ -59,7 +59,9 @@ namespace {
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
}
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
GlobalOpt() : ModulePass(ID) {}
|
||||
GlobalOpt() : ModulePass(ID) {
|
||||
initializeGlobalOptPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
bool runOnModule(Module &M);
|
||||
|
||||
|
@ -35,7 +35,9 @@ namespace {
|
||||
///
|
||||
struct IPCP : public ModulePass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
IPCP() : ModulePass(ID) {}
|
||||
IPCP() : ModulePass(ID) {
|
||||
initializeIPCPPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
bool runOnModule(Module &M);
|
||||
private:
|
||||
|
@ -36,7 +36,9 @@ namespace {
|
||||
InlineCostAnalyzer CA;
|
||||
public:
|
||||
// Use extremely low threshold.
|
||||
AlwaysInliner() : Inliner(ID, -2000000000) {}
|
||||
AlwaysInliner() : Inliner(ID, -2000000000) {
|
||||
initializeAlwaysInlinerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
InlineCost getInlineCost(CallSite CS) {
|
||||
return CA.getInlineCost(CS, NeverInline);
|
||||
@ -61,7 +63,10 @@ namespace {
|
||||
}
|
||||
|
||||
char AlwaysInliner::ID = 0;
|
||||
INITIALIZE_PASS(AlwaysInliner, "always-inline",
|
||||
INITIALIZE_PASS_BEGIN(AlwaysInliner, "always-inline",
|
||||
"Inliner for always_inline functions", false, false)
|
||||
INITIALIZE_AG_DEPENDENCY(CallGraph)
|
||||
INITIALIZE_PASS_END(AlwaysInliner, "always-inline",
|
||||
"Inliner for always_inline functions", false, false)
|
||||
|
||||
Pass *llvm::createAlwaysInlinerPass() { return new AlwaysInliner(); }
|
||||
|
@ -33,8 +33,12 @@ namespace {
|
||||
SmallPtrSet<const Function*, 16> NeverInline;
|
||||
InlineCostAnalyzer CA;
|
||||
public:
|
||||
SimpleInliner() : Inliner(ID) {}
|
||||
SimpleInliner(int Threshold) : Inliner(ID, Threshold) {}
|
||||
SimpleInliner() : Inliner(ID) {
|
||||
initializeSimpleInlinerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
SimpleInliner(int Threshold) : Inliner(ID, Threshold) {
|
||||
initializeSimpleInlinerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
InlineCost getInlineCost(CallSite CS) {
|
||||
return CA.getInlineCost(CS, NeverInline);
|
||||
|
@ -68,6 +68,7 @@ INITIALIZE_PASS(InternalizePass, "internalize",
|
||||
|
||||
InternalizePass::InternalizePass(bool AllButMain)
|
||||
: ModulePass(ID), AllButMain(AllButMain){
|
||||
initializeInternalizePassPass(*PassRegistry::getPassRegistry());
|
||||
if (!APIFile.empty()) // If a filename is specified, use it.
|
||||
LoadFile(APIFile.c_str());
|
||||
if (!APIList.empty()) // If a list is specified, use it as well.
|
||||
@ -76,6 +77,7 @@ InternalizePass::InternalizePass(bool AllButMain)
|
||||
|
||||
InternalizePass::InternalizePass(const std::vector<const char *>&exportList)
|
||||
: ModulePass(ID), AllButMain(false){
|
||||
initializeInternalizePassPass(*PassRegistry::getPassRegistry());
|
||||
for(std::vector<const char *>::const_iterator itr = exportList.begin();
|
||||
itr != exportList.end(); itr++) {
|
||||
ExternalNames.insert(*itr);
|
||||
|
@ -37,7 +37,9 @@ namespace {
|
||||
unsigned NumLoops;
|
||||
|
||||
explicit LoopExtractor(unsigned numLoops = ~0)
|
||||
: LoopPass(ID), NumLoops(numLoops) {}
|
||||
: LoopPass(ID), NumLoops(numLoops) {
|
||||
initializeLoopExtractorPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnLoop(Loop *L, LPPassManager &LPM);
|
||||
|
||||
|
@ -109,7 +109,9 @@ namespace {
|
||||
bool IsTransformableFunction(StringRef Name);
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
LowerSetJmp() : ModulePass(ID) {}
|
||||
LowerSetJmp() : ModulePass(ID) {
|
||||
initializeLowerSetJmpPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
void visitCallInst(CallInst& CI);
|
||||
void visitInvokeInst(InvokeInst& II);
|
||||
|
@ -151,7 +151,9 @@ namespace {
|
||||
class MergeFunctions : public ModulePass {
|
||||
public:
|
||||
static char ID;
|
||||
MergeFunctions() : ModulePass(ID) {}
|
||||
MergeFunctions() : ModulePass(ID) {
|
||||
initializeMergeFunctionsPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
bool runOnModule(Module &M);
|
||||
|
||||
|
@ -30,7 +30,9 @@ namespace {
|
||||
struct PartialInliner : public ModulePass {
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const { }
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
PartialInliner() : ModulePass(ID) {}
|
||||
PartialInliner() : ModulePass(ID) {
|
||||
initializePartialInlinerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
bool runOnModule(Module& M);
|
||||
|
||||
|
@ -46,7 +46,9 @@ namespace {
|
||||
InlineCostAnalyzer CA;
|
||||
public :
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
PartSpec() : ModulePass(ID) {}
|
||||
PartSpec() : ModulePass(ID) {
|
||||
initializePartSpecPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
bool runOnModule(Module &M);
|
||||
};
|
||||
}
|
||||
|
@ -37,7 +37,9 @@ STATISTIC(NumUnreach, "Number of noreturn calls optimized");
|
||||
namespace {
|
||||
struct PruneEH : public CallGraphSCCPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
PruneEH() : CallGraphSCCPass(ID) {}
|
||||
PruneEH() : CallGraphSCCPass(ID) {
|
||||
initializePruneEHPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
// runOnSCC - Analyze the SCC, performing the transformation if possible.
|
||||
bool runOnSCC(CallGraphSCC &SCC);
|
||||
|
@ -29,7 +29,9 @@ namespace {
|
||||
class StripDeadPrototypesPass : public ModulePass {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
StripDeadPrototypesPass() : ModulePass(ID) { }
|
||||
StripDeadPrototypesPass() : ModulePass(ID) {
|
||||
initializeStripDeadPrototypesPassPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
virtual bool runOnModule(Module &M);
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,9 @@ namespace {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
explicit StripSymbols(bool ODI = false)
|
||||
: ModulePass(ID), OnlyDebugInfo(ODI) {}
|
||||
: ModulePass(ID), OnlyDebugInfo(ODI) {
|
||||
initializeStripSymbolsPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnModule(Module &M);
|
||||
|
||||
@ -52,7 +54,9 @@ namespace {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
explicit StripNonDebugSymbols()
|
||||
: ModulePass(ID) {}
|
||||
: ModulePass(ID) {
|
||||
initializeStripNonDebugSymbolsPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnModule(Module &M);
|
||||
|
||||
@ -65,7 +69,9 @@ namespace {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
explicit StripDebugDeclare()
|
||||
: ModulePass(ID) {}
|
||||
: ModulePass(ID) {
|
||||
initializeStripDebugDeclarePass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnModule(Module &M);
|
||||
|
||||
@ -78,7 +84,9 @@ namespace {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
explicit StripDeadDebugInfo()
|
||||
: ModulePass(ID) {}
|
||||
: ModulePass(ID) {
|
||||
initializeStripDeadDebugInfoPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnModule(Module &M);
|
||||
|
||||
|
@ -50,7 +50,9 @@ namespace {
|
||||
|
||||
virtual bool runOnSCC(CallGraphSCC &SCC);
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
SRETPromotion() : CallGraphSCCPass(ID) {}
|
||||
SRETPromotion() : CallGraphSCCPass(ID) {
|
||||
initializeSRETPromotionPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
private:
|
||||
CallGraphNode *PromoteReturn(CallGraphNode *CGN);
|
||||
|
@ -81,7 +81,9 @@ public:
|
||||
BuilderTy *Builder;
|
||||
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
InstCombiner() : FunctionPass(ID), TD(0), Builder(0) {}
|
||||
InstCombiner() : FunctionPass(ID), TD(0), Builder(0) {
|
||||
initializeInstCombinerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
public:
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
@ -34,7 +34,9 @@ namespace {
|
||||
bool runOnModule(Module &M);
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
EdgeProfiler() : ModulePass(ID) {}
|
||||
EdgeProfiler() : ModulePass(ID) {
|
||||
initializeEdgeProfilerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual const char *getPassName() const {
|
||||
return "Edge Profiler";
|
||||
|
@ -36,7 +36,9 @@ namespace {
|
||||
bool runOnModule(Module &M);
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
OptimalEdgeProfiler() : ModulePass(ID) {}
|
||||
OptimalEdgeProfiler() : ModulePass(ID) {
|
||||
initializeOptimalEdgeProfilerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequiredID(ProfileEstimatorPassID);
|
||||
|
@ -33,7 +33,9 @@ STATISTIC(NumRemoved, "Number of instructions removed");
|
||||
namespace {
|
||||
struct ADCE : public FunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
ADCE() : FunctionPass(ID) {}
|
||||
ADCE() : FunctionPass(ID) {
|
||||
initializeADCEPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function& F);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user