forked from OSchip/llvm-project
Tidy up several unbeseeming casts from pointer to intptr_t.
llvm-svn: 55779
This commit is contained in:
parent
4b19157ba9
commit
a79db30d28
|
@ -720,7 +720,7 @@ public:
|
|||
static char ID; // Pass ID, replacement for typeid
|
||||
DominatorTreeBase<BasicBlock>* DT;
|
||||
|
||||
DominatorTree() : FunctionPass(intptr_t(&ID)) {
|
||||
DominatorTree() : FunctionPass(&ID) {
|
||||
DT = new DominatorTreeBase<BasicBlock>(false);
|
||||
}
|
||||
|
||||
|
@ -911,7 +911,7 @@ protected:
|
|||
const bool IsPostDominators;
|
||||
|
||||
public:
|
||||
DominanceFrontierBase(intptr_t ID, bool isPostDom)
|
||||
DominanceFrontierBase(void *ID, bool isPostDom)
|
||||
: FunctionPass(ID), IsPostDominators(isPostDom) {}
|
||||
|
||||
/// getRoots - Return the root blocks of the current CFG. This may include
|
||||
|
@ -1030,7 +1030,7 @@ class DominanceFrontier : public DominanceFrontierBase {
|
|||
public:
|
||||
static char ID; // Pass ID, replacement for typeid
|
||||
DominanceFrontier() :
|
||||
DominanceFrontierBase(intptr_t(&ID), false) {}
|
||||
DominanceFrontierBase(&ID, false) {}
|
||||
|
||||
BasicBlock *getRoot() const {
|
||||
assert(Roots.size() == 1 && "Should always have entry node!");
|
||||
|
|
|
@ -25,7 +25,7 @@ class FindUsedTypes : public ModulePass {
|
|||
std::set<const Type *> UsedTypes;
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
FindUsedTypes() : ModulePass((intptr_t)&ID) {}
|
||||
FindUsedTypes() : ModulePass(&ID) {}
|
||||
|
||||
/// getTypes - After the pass has been run, return the set containing all of
|
||||
/// the types used in the module.
|
||||
|
|
|
@ -48,7 +48,7 @@ class IntervalPartition : public FunctionPass {
|
|||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
|
||||
IntervalPartition() : FunctionPass((intptr_t)&ID), RootInterval(0) {}
|
||||
IntervalPartition() : FunctionPass(&ID), RootInterval(0) {}
|
||||
|
||||
// run - Calculate the interval partition for this function
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
|
|
@ -30,6 +30,7 @@ class LoopPass : public Pass {
|
|||
|
||||
public:
|
||||
explicit LoopPass(intptr_t pid) : Pass(pid) {}
|
||||
explicit LoopPass(void *pid) : Pass(pid) {}
|
||||
|
||||
// runOnLoop - This method should be implemented by the subclass to perform
|
||||
// whatever action is necessary for the specified Loop.
|
||||
|
|
|
@ -66,7 +66,7 @@ class MemoryDependenceAnalysis : public FunctionPass {
|
|||
static Instruction* const Dirty;
|
||||
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
MemoryDependenceAnalysis() : FunctionPass((intptr_t)&ID) {}
|
||||
MemoryDependenceAnalysis() : FunctionPass(&ID) {}
|
||||
|
||||
/// Pass Implementation stuff. This doesn't do any analysis.
|
||||
///
|
||||
|
|
|
@ -25,7 +25,7 @@ struct PostDominatorTree : public FunctionPass {
|
|||
static char ID; // Pass identification, replacement for typeid
|
||||
DominatorTreeBase<BasicBlock>* DT;
|
||||
|
||||
PostDominatorTree() : FunctionPass((intptr_t)&ID) {
|
||||
PostDominatorTree() : FunctionPass(&ID) {
|
||||
DT = new DominatorTreeBase<BasicBlock>(true);
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ FunctionPass* createPostDomTree();
|
|||
struct PostDominanceFrontier : public DominanceFrontierBase {
|
||||
static char ID;
|
||||
PostDominanceFrontier()
|
||||
: DominanceFrontierBase((intptr_t) &ID, true) {}
|
||||
: DominanceFrontierBase(&ID, true) {}
|
||||
|
||||
virtual bool runOnFunction(Function &) {
|
||||
Frontiers.clear();
|
||||
|
|
|
@ -191,7 +191,7 @@ namespace llvm {
|
|||
void *Impl; // ScalarEvolution uses the pimpl pattern
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
ScalarEvolution() : FunctionPass((intptr_t)&ID), Impl(0) {}
|
||||
ScalarEvolution() : FunctionPass(&ID), Impl(0) {}
|
||||
|
||||
/// getSCEV - Return a SCEV expression handle for the full generality of the
|
||||
/// specified expression.
|
||||
|
|
|
@ -32,6 +32,7 @@ class PMStack;
|
|||
struct CallGraphSCCPass : public Pass {
|
||||
|
||||
explicit CallGraphSCCPass(intptr_t pid) : Pass(pid) {}
|
||||
explicit CallGraphSCCPass(void *pid) : Pass(pid) {}
|
||||
|
||||
/// doInitialization - This method is called before the SCC's of the program
|
||||
/// has been processed, allowing the pass to do initialization as necessary.
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace llvm {
|
|||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
LiveIntervals() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
LiveIntervals() : MachineFunctionPass(&ID) {}
|
||||
|
||||
struct InstrSlots {
|
||||
enum {
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace llvm {
|
|||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
LiveStacks() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
LiveStacks() : MachineFunctionPass(&ID) {}
|
||||
|
||||
typedef SS2IntervalMap::iterator iterator;
|
||||
typedef SS2IntervalMap::const_iterator const_iterator;
|
||||
|
|
|
@ -43,7 +43,7 @@ class TargetRegisterInfo;
|
|||
class LiveVariables : public MachineFunctionPass {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
LiveVariables() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
LiveVariables() : MachineFunctionPass(&ID) {}
|
||||
|
||||
/// VarInfo - This represents the regions where a virtual register is live in
|
||||
/// the program. We represent this with three different pieces of
|
||||
|
|
|
@ -27,6 +27,7 @@ namespace llvm {
|
|||
struct MachineFunctionPass : public FunctionPass {
|
||||
|
||||
explicit MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {}
|
||||
explicit MachineFunctionPass(void *ID) : FunctionPass(ID) {}
|
||||
|
||||
protected:
|
||||
/// runOnMachineFunction - This method must be overloaded to perform the
|
||||
|
|
|
@ -26,8 +26,8 @@ namespace llvm {
|
|||
/// perform the inlining operations that does not depend on the policy.
|
||||
///
|
||||
struct Inliner : public CallGraphSCCPass {
|
||||
explicit Inliner(const void *ID);
|
||||
explicit Inliner(const void *ID, int Threshold);
|
||||
explicit Inliner(void *ID);
|
||||
explicit Inliner(void *ID, int Threshold);
|
||||
|
||||
/// getAnalysisUsage - For this class, we declare that we require and preserve
|
||||
/// the call graph. If the derived class implements this method, it should
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace llvm {
|
|||
/// multiple profilers can be support simultaniously.
|
||||
struct RSProfilers : public ModulePass {
|
||||
static char ID; // Pass identification, replacement for typeinfo
|
||||
RSProfilers() : ModulePass((intptr_t)&ID) {}
|
||||
RSProfilers() : ModulePass(&ID) {}
|
||||
|
||||
/// isProfiling - This method returns true if the value passed it was
|
||||
/// inserted by the profiler.
|
||||
|
|
|
@ -26,7 +26,7 @@ struct UnifyFunctionExitNodes : public FunctionPass {
|
|||
BasicBlock *ReturnBlock, *UnwindBlock, *UnreachableBlock;
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
UnifyFunctionExitNodes() : FunctionPass((intptr_t)&ID),
|
||||
UnifyFunctionExitNodes() : FunctionPass(&ID),
|
||||
ReturnBlock(0), UnwindBlock(0) {}
|
||||
|
||||
// We can preserve non-critical-edgeness when we unify function exit nodes
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace {
|
|||
Module *M;
|
||||
public:
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
AliasAnalysisCounter() : ModulePass((intptr_t) &ID) {
|
||||
AliasAnalysisCounter() : ModulePass(&ID) {
|
||||
No = May = Must = 0;
|
||||
NoMR = JustRef = JustMod = MR = 0;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace {
|
|||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
AAEval() : FunctionPass((intptr_t)&ID) {}
|
||||
AAEval() : FunctionPass(&ID) {}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<AliasAnalysis>();
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace {
|
|||
|
||||
public:
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
AliasDebugger() : ModulePass((intptr_t)&ID) {}
|
||||
AliasDebugger() : ModulePass(&ID) {}
|
||||
|
||||
bool runOnModule(Module &M) {
|
||||
InitializeAliasAnalysis(this); // set up super class
|
||||
|
|
|
@ -564,7 +564,7 @@ namespace {
|
|||
AliasSetTracker *Tracker;
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
AliasSetPrinter() : FunctionPass((intptr_t)&ID) {}
|
||||
AliasSetPrinter() : FunctionPass(&ID) {}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesAll();
|
||||
|
|
|
@ -208,8 +208,8 @@ namespace {
|
|||
///
|
||||
struct VISIBILITY_HIDDEN NoAA : public ImmutablePass, public AliasAnalysis {
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
NoAA() : ImmutablePass((intptr_t)&ID) {}
|
||||
explicit NoAA(intptr_t PID) : ImmutablePass(PID) { }
|
||||
NoAA() : ImmutablePass(&ID) {}
|
||||
explicit NoAA(void *PID) : ImmutablePass(PID) { }
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<TargetData>();
|
||||
|
@ -269,7 +269,7 @@ namespace {
|
|||
/// derives from the NoAA class.
|
||||
struct VISIBILITY_HIDDEN BasicAliasAnalysis : public NoAA {
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
BasicAliasAnalysis() : NoAA((intptr_t)&ID) { }
|
||||
BasicAliasAnalysis() : NoAA(&ID) {}
|
||||
AliasResult alias(const Value *V1, unsigned V1Size,
|
||||
const Value *V2, unsigned V2Size);
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ struct DOTGraphTraits<const Function*> : public DefaultDOTGraphTraits {
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN CFGViewer : public FunctionPass {
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
CFGViewer() : FunctionPass((intptr_t)&ID) {}
|
||||
CFGViewer() : FunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
F.viewCFG();
|
||||
|
@ -114,7 +114,7 @@ V0("view-cfg", "View CFG of function", false, true);
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN CFGOnlyViewer : public FunctionPass {
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
CFGOnlyViewer() : FunctionPass((intptr_t)&ID) {}
|
||||
CFGOnlyViewer() : FunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
CFGOnly = true;
|
||||
|
@ -139,8 +139,8 @@ V1("view-cfg-only",
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN CFGPrinter : public FunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
CFGPrinter() : FunctionPass((intptr_t)&ID) {}
|
||||
explicit CFGPrinter(intptr_t pid) : FunctionPass(pid) {}
|
||||
CFGPrinter() : FunctionPass(&ID) {}
|
||||
explicit CFGPrinter(void *pid) : FunctionPass(pid) {}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
std::string Filename = "cfg." + F.getName() + ".dot";
|
||||
|
@ -170,7 +170,7 @@ P1("print-cfg", "Print CFG of function to 'dot' file", false, true);
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN CFGOnlyPrinter : public CFGPrinter {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
CFGOnlyPrinter() : CFGPrinter((intptr_t)&ID) {}
|
||||
CFGOnlyPrinter() : CFGPrinter(&ID) {}
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
bool OldCFGOnly = CFGOnly;
|
||||
CFGOnly = true;
|
||||
|
|
|
@ -431,7 +431,7 @@ namespace {
|
|||
|
||||
public:
|
||||
static char ID;
|
||||
Andersens() : ModulePass((intptr_t)&ID) {}
|
||||
Andersens() : ModulePass(&ID) {}
|
||||
|
||||
bool runOnModule(Module &M) {
|
||||
InitializeAliasAnalysis(this);
|
||||
|
|
|
@ -50,7 +50,7 @@ class VISIBILITY_HIDDEN BasicCallGraph : public CallGraph, public ModulePass {
|
|||
|
||||
public:
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
BasicCallGraph() : ModulePass((intptr_t)&ID), Root(0),
|
||||
BasicCallGraph() : ModulePass(&ID), Root(0),
|
||||
ExternalCallingNode(0), CallsExternalNode(0) {}
|
||||
|
||||
// runOnModule - Compute the call graph for the specified module.
|
||||
|
|
|
@ -34,7 +34,7 @@ class CGPassManager : public ModulePass, public PMDataManager {
|
|||
public:
|
||||
static char ID;
|
||||
explicit CGPassManager(int Depth)
|
||||
: ModulePass((intptr_t)&ID), PMDataManager(Depth) { }
|
||||
: ModulePass(&ID), PMDataManager(Depth) { }
|
||||
|
||||
/// run - Execute all of the passes scheduled for execution. Keep track of
|
||||
/// whether any of the passes modifies the module, and if so, return true.
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace {
|
|||
|
||||
public:
|
||||
static char ID;
|
||||
GlobalsModRef() : ModulePass((intptr_t)&ID) {}
|
||||
GlobalsModRef() : ModulePass(&ID) {}
|
||||
|
||||
bool runOnModule(Module &M) {
|
||||
InitializeAliasAnalysis(this); // set up super class
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace {
|
|||
}
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
InstCount() : FunctionPass((intptr_t)&ID) {}
|
||||
InstCount() : FunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ bool IntervalPartition::runOnFunction(Function &F) {
|
|||
// distinguish it from a copy constructor. Always pass in false for now.
|
||||
//
|
||||
IntervalPartition::IntervalPartition(IntervalPartition &IP, bool)
|
||||
: FunctionPass((intptr_t) &ID) {
|
||||
: FunctionPass(&ID) {
|
||||
assert(IP.getRootInterval() && "Cannot operate on empty IntervalPartitions!");
|
||||
|
||||
// Pass false to intervals_begin because we take ownership of it's memory
|
||||
|
|
|
@ -25,7 +25,7 @@ char LPPassManager::ID = 0;
|
|||
/// LPPassManager manages FPPassManagers and CalLGraphSCCPasses.
|
||||
|
||||
LPPassManager::LPPassManager(int Depth)
|
||||
: FunctionPass((intptr_t)&ID), PMDataManager(Depth) {
|
||||
: FunctionPass(&ID), PMDataManager(Depth) {
|
||||
skipThisLoop = false;
|
||||
redoThisLoop = false;
|
||||
LI = NULL;
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace {
|
|||
struct VISIBILITY_HIDDEN NoProfileInfo
|
||||
: public ImmutablePass, public ProfileInfo {
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
NoProfileInfo() : ImmutablePass((intptr_t)&ID) {}
|
||||
NoProfileInfo() : ImmutablePass(&ID) {}
|
||||
};
|
||||
} // End of anonymous namespace
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace {
|
|||
public:
|
||||
static char ID; // Class identification, replacement for typeinfo
|
||||
explicit LoaderPass(const std::string &filename = "")
|
||||
: ModulePass((intptr_t)&ID), Filename(filename) {
|
||||
: ModulePass(&ID), Filename(filename) {
|
||||
if (filename.empty()) Filename = ProfileInfoFilename;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace {
|
|||
public:
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
explicit WriteBitcodePass(std::ostream &o)
|
||||
: ModulePass((intptr_t) &ID), Out(o) {}
|
||||
: ModulePass(&ID), Out(o) {}
|
||||
|
||||
const char *getPassName() const { return "Bitcode Writer"; }
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ using namespace llvm;
|
|||
char AsmPrinter::ID = 0;
|
||||
AsmPrinter::AsmPrinter(raw_ostream &o, TargetMachine &tm,
|
||||
const TargetAsmInfo *T)
|
||||
: MachineFunctionPass((intptr_t)&ID), FunctionNumber(0), O(o),
|
||||
: MachineFunctionPass(&ID), FunctionNumber(0), O(o),
|
||||
TM(tm), TAI(T), TRI(tm.getRegisterInfo()),
|
||||
IsInTextSection(false)
|
||||
{}
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace {
|
|||
struct VISIBILITY_HIDDEN BranchFolder : public MachineFunctionPass {
|
||||
static char ID;
|
||||
explicit BranchFolder(bool defaultEnableTailMerge) :
|
||||
MachineFunctionPass((intptr_t)&ID) {
|
||||
MachineFunctionPass(&ID) {
|
||||
switch (FlagEnableTailMerge) {
|
||||
case cl::BOU_UNSET: EnableTailMerge = defaultEnableTailMerge; break;
|
||||
case cl::BOU_TRUE: EnableTailMerge = true; break;
|
||||
|
|
|
@ -195,7 +195,7 @@ bool ELFCodeEmitter::finishFunction(MachineFunction &F) {
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
ELFWriter::ELFWriter(raw_ostream &o, TargetMachine &tm)
|
||||
: MachineFunctionPass((intptr_t)&ID), O(o), TM(tm) {
|
||||
: MachineFunctionPass(&ID), O(o), TM(tm) {
|
||||
e_flags = 0; // e_flags defaults to 0, no flags.
|
||||
|
||||
is64Bit = TM.getTargetData()->getPointerSizeInBits() == 64;
|
||||
|
|
|
@ -66,7 +66,7 @@ GCFunctionInfo::~GCFunctionInfo() {}
|
|||
char GCModuleInfo::ID = 0;
|
||||
|
||||
GCModuleInfo::GCModuleInfo()
|
||||
: ImmutablePass((intptr_t)&ID) {}
|
||||
: ImmutablePass(&ID) {}
|
||||
|
||||
GCModuleInfo::~GCModuleInfo() {
|
||||
clear();
|
||||
|
|
|
@ -127,7 +127,7 @@ FunctionPass *llvm::createGCLoweringPass() {
|
|||
char LowerIntrinsics::ID = 0;
|
||||
|
||||
LowerIntrinsics::LowerIntrinsics()
|
||||
: FunctionPass((intptr_t)&ID) {}
|
||||
: FunctionPass(&ID) {}
|
||||
|
||||
const char *LowerIntrinsics::getPassName() const {
|
||||
return "Lower Garbage Collection Instructions";
|
||||
|
|
|
@ -146,7 +146,7 @@ namespace {
|
|||
bool MadeChange;
|
||||
public:
|
||||
static char ID;
|
||||
IfConverter() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
IfConverter() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
virtual const char *getPassName() const { return "If Converter"; }
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace {
|
|||
class LoopAligner : public MachineFunctionPass {
|
||||
public:
|
||||
static char ID;
|
||||
LoopAligner() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
LoopAligner() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
virtual const char *getPassName() const { return "Loop aligner"; }
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace {
|
|||
struct VISIBILITY_HIDDEN LowerSubregsInstructionPass
|
||||
: public MachineFunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
LowerSubregsInstructionPass() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
LowerSubregsInstructionPass() : MachineFunctionPass(&ID) {}
|
||||
|
||||
const char *getPassName() const {
|
||||
return "Subregister lowering instruction pass";
|
||||
|
|
|
@ -336,7 +336,7 @@ void MachOCodeEmitter::emitJumpTables(MachineJumpTableInfo *MJTI) {
|
|||
|
||||
char MachOWriter::ID = 0;
|
||||
MachOWriter::MachOWriter(raw_ostream &o, TargetMachine &tm)
|
||||
: MachineFunctionPass((intptr_t)&ID), O(o), TM(tm) {
|
||||
: MachineFunctionPass(&ID), O(o), TM(tm) {
|
||||
is64Bit = TM.getTargetData()->getPointerSizeInBits() == 64;
|
||||
isLittleEndian = TM.getTargetData()->isLittleEndian();
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace {
|
|||
const std::string Banner;
|
||||
|
||||
Printer (std::ostream *os, const std::string &banner)
|
||||
: MachineFunctionPass((intptr_t)&ID), OS(os), Banner(banner) {}
|
||||
: MachineFunctionPass(&ID), OS(os), Banner(banner) {}
|
||||
|
||||
const char *getPassName() const { return "MachineFunction Printer"; }
|
||||
|
||||
|
@ -77,7 +77,7 @@ FunctionPass *llvm::createMachineFunctionPrinterPass(std::ostream *OS,
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN Deleter : public MachineFunctionPass {
|
||||
static char ID;
|
||||
Deleter() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
Deleter() : MachineFunctionPass(&ID) {}
|
||||
|
||||
const char *getPassName() const { return "Machine Code Deleter"; }
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace {
|
|||
MachineLoop *CurLoop; // The current loop we are working on.
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
MachineLICM() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
MachineLICM() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
||||
|
|
|
@ -1612,7 +1612,7 @@ DebugScope::~DebugScope() {
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
MachineModuleInfo::MachineModuleInfo()
|
||||
: ImmutablePass((intptr_t)&ID)
|
||||
: ImmutablePass(&ID)
|
||||
, DR()
|
||||
, VR()
|
||||
, CompileUnits()
|
||||
|
@ -2011,7 +2011,7 @@ namespace llvm {
|
|||
|
||||
struct DebugLabelFolder : public MachineFunctionPass {
|
||||
static char ID;
|
||||
DebugLabelFolder() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
DebugLabelFolder() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
virtual const char *getPassName() const { return "Label Folder"; }
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace {
|
|||
|
||||
public:
|
||||
static char ID; // Pass identification
|
||||
MachineSinking() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
MachineSinking() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace {
|
|||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
PNE() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
PNE() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &Fn);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace {
|
|||
class VISIBILITY_HIDDEN SchedulePostRATDList : public MachineFunctionPass {
|
||||
public:
|
||||
static char ID;
|
||||
SchedulePostRATDList() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
SchedulePostRATDList() : MachineFunctionPass(&ID) {}
|
||||
private:
|
||||
MachineFunction *MF;
|
||||
const TargetMachine *TM;
|
||||
|
|
|
@ -35,7 +35,7 @@ using namespace llvm;
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN PEI : public MachineFunctionPass {
|
||||
static char ID;
|
||||
PEI() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
PEI() : MachineFunctionPass(&ID) {}
|
||||
|
||||
const char *getPassName() const {
|
||||
return "Prolog/Epilog Insertion & Frame Finalization";
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace {
|
|||
class VISIBILITY_HIDDEN RABigBlock : public MachineFunctionPass {
|
||||
public:
|
||||
static char ID;
|
||||
RABigBlock() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
RABigBlock() : MachineFunctionPass(&ID) {}
|
||||
private:
|
||||
/// TM - For getting at TargetMachine info
|
||||
///
|
||||
|
|
|
@ -55,7 +55,7 @@ linearscanRegAlloc("linearscan", " linear scan register allocator",
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN RALinScan : public MachineFunctionPass {
|
||||
static char ID;
|
||||
RALinScan() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
RALinScan() : MachineFunctionPass(&ID) {}
|
||||
|
||||
typedef std::pair<LiveInterval*, LiveInterval::iterator> IntervalPtr;
|
||||
typedef SmallVector<IntervalPtr, 32> IntervalPtrs;
|
||||
|
|
|
@ -44,8 +44,7 @@ namespace {
|
|||
class VISIBILITY_HIDDEN RALocal : public MachineFunctionPass {
|
||||
public:
|
||||
static char ID;
|
||||
RALocal() : MachineFunctionPass((intptr_t)&ID),
|
||||
StackSlotForVirtReg(-1) {}
|
||||
RALocal() : MachineFunctionPass(&ID), StackSlotForVirtReg(-1) {}
|
||||
private:
|
||||
const TargetMachine *TM;
|
||||
MachineFunction *MF;
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace {
|
|||
class VISIBILITY_HIDDEN RegAllocSimple : public MachineFunctionPass {
|
||||
public:
|
||||
static char ID;
|
||||
RegAllocSimple() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
RegAllocSimple() : MachineFunctionPass(&ID) {}
|
||||
private:
|
||||
MachineFunction *MF;
|
||||
const TargetMachine *TM;
|
||||
|
|
|
@ -158,7 +158,7 @@ MachineBasicBlock *TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
SelectionDAGISel::SelectionDAGISel(TargetLowering &tli, bool fast) :
|
||||
FunctionPass((intptr_t)&ID), TLI(tli),
|
||||
FunctionPass(&ID), TLI(tli),
|
||||
FuncInfo(new FunctionLoweringInfo(TLI)),
|
||||
CurDAG(new SelectionDAG(TLI, *FuncInfo)),
|
||||
SDL(new SelectionDAGLowering(*CurDAG, TLI, *FuncInfo)),
|
||||
|
|
|
@ -102,7 +102,7 @@ namespace llvm {
|
|||
|
||||
public:
|
||||
static char ID; // Pass identifcation, replacement for typeid
|
||||
SimpleRegisterCoalescing() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
SimpleRegisterCoalescing() : MachineFunctionPass(&ID) {}
|
||||
|
||||
struct InstrSlots {
|
||||
enum {
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace {
|
|||
|
||||
public:
|
||||
static char ID; // Pass identification
|
||||
StackSlotColoring() : MachineFunctionPass((intptr_t)&ID), NextColor(-1) {}
|
||||
StackSlotColoring() : MachineFunctionPass(&ID), NextColor(-1) {}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<LiveStacks>();
|
||||
|
|
|
@ -38,7 +38,7 @@ using namespace llvm;
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN StrongPHIElimination : public MachineFunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
StrongPHIElimination() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
StrongPHIElimination() : MachineFunctionPass(&ID) {}
|
||||
|
||||
// Waiting stores, for each MBB, the set of copies that need to
|
||||
// be inserted into that MBB
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace {
|
|||
DenseMap<MachineInstr*, unsigned> &DistanceMap);
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
TwoAddressInstructionPass() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
TwoAddressInstructionPass() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addPreserved<LiveVariables>();
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace {
|
|||
virtual bool runOnFunction(Function &F);
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
UnreachableBlockElim() : FunctionPass((intptr_t)&ID) {}
|
||||
UnreachableBlockElim() : FunctionPass(&ID) {}
|
||||
};
|
||||
}
|
||||
char UnreachableBlockElim::ID = 0;
|
||||
|
@ -90,7 +90,7 @@ namespace {
|
|||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
UnreachableMachineBlockElim() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
UnreachableMachineBlockElim() : MachineFunctionPass(&ID) {}
|
||||
};
|
||||
}
|
||||
char UnreachableMachineBlockElim::ID = 0;
|
||||
|
|
|
@ -39,11 +39,11 @@ namespace {
|
|||
public:
|
||||
static char ID;
|
||||
explicit ARMCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce)
|
||||
: MachineFunctionPass((intptr_t)&ID), II(0), TD(0), TM(tm),
|
||||
: MachineFunctionPass(&ID), II(0), TD(0), TM(tm),
|
||||
MCE(mce) {}
|
||||
ARMCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce,
|
||||
const ARMInstrInfo &ii, const TargetData &td)
|
||||
: MachineFunctionPass((intptr_t)&ID), II(&ii), TD(&td), TM(tm),
|
||||
: MachineFunctionPass(&ID), II(&ii), TD(&td), TM(tm),
|
||||
MCE(mce) {}
|
||||
|
||||
bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
|
|
@ -129,7 +129,7 @@ namespace {
|
|||
bool isThumb;
|
||||
public:
|
||||
static char ID;
|
||||
ARMConstantIslands() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
ARMConstantIslands() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &Fn);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ STATISTIC(NumFSTMGened, "Number of fstm instructions generated");
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN ARMLoadStoreOpt : public MachineFunctionPass {
|
||||
static char ID;
|
||||
ARMLoadStoreOpt() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
ARMLoadStoreOpt() : MachineFunctionPass(&ID) {}
|
||||
|
||||
const TargetInstrInfo *TII;
|
||||
const TargetRegisterInfo *TRI;
|
||||
|
|
|
@ -23,7 +23,7 @@ using namespace llvm;
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN AlphaBSel : public MachineFunctionPass {
|
||||
static char ID;
|
||||
AlphaBSel() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
AlphaBSel() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &Fn);
|
||||
|
||||
|
|
|
@ -39,10 +39,10 @@ namespace {
|
|||
public:
|
||||
static char ID;
|
||||
explicit AlphaCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce)
|
||||
: MachineFunctionPass((intptr_t)&ID), II(0), TM(tm), MCE(mce) {}
|
||||
: MachineFunctionPass(&ID), II(0), TM(tm), MCE(mce) {}
|
||||
AlphaCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce,
|
||||
const AlphaInstrInfo& ii)
|
||||
: MachineFunctionPass((intptr_t)&ID), II(&ii), TM(tm), MCE(mce) {}
|
||||
: MachineFunctionPass(&ID), II(&ii), TM(tm), MCE(mce) {}
|
||||
|
||||
bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace {
|
|||
|
||||
static char ID;
|
||||
AlphaLLRPPass(AlphaTargetMachine &tm)
|
||||
: MachineFunctionPass((intptr_t)&ID), TM(tm) { }
|
||||
: MachineFunctionPass(&ID), TM(tm) { }
|
||||
|
||||
virtual const char *getPassName() const {
|
||||
return "Alpha NOP inserter";
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace {
|
|||
public:
|
||||
static char ID;
|
||||
CBackendNameAllUsedStructsAndMergeFunctions()
|
||||
: ModulePass((intptr_t)&ID) {}
|
||||
: ModulePass(&ID) {}
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<FindUsedTypes>();
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ namespace {
|
|||
public:
|
||||
static char ID;
|
||||
explicit CWriter(raw_ostream &o)
|
||||
: FunctionPass((intptr_t)&ID), Out(o), IL(0), Mang(0), LI(0),
|
||||
: FunctionPass(&ID), Out(o), IL(0), Mang(0), LI(0),
|
||||
TheModule(0), TAsm(0), TD(0) {}
|
||||
|
||||
virtual const char *getPassName() const { return "C backend"; }
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace {
|
|||
public:
|
||||
static char ID;
|
||||
explicit CppWriter(raw_ostream &o) :
|
||||
ModulePass((intptr_t)&ID), Out(o), uniqueNum(0), is_inline(false) {}
|
||||
ModulePass(&ID), Out(o), uniqueNum(0), is_inline(false) {}
|
||||
|
||||
virtual const char *getPassName() const { return "C++ backend"; }
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace {
|
|||
IA64TargetMachine &TM;
|
||||
|
||||
IA64BundlingPass(IA64TargetMachine &tm)
|
||||
: MachineFunctionPass((intptr_t)&ID), TM(tm) { }
|
||||
: MachineFunctionPass(&ID), TM(tm) { }
|
||||
|
||||
virtual const char *getPassName() const {
|
||||
return "IA64 (Itanium) Bundling Pass";
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace {
|
|||
static char ID;
|
||||
MSILModule(const std::set<const Type *>*& _UsedTypes,
|
||||
const TargetData*& _TD)
|
||||
: ModulePass((intptr_t)&ID), UsedTypes(_UsedTypes), TD(_TD) {}
|
||||
: ModulePass(&ID), UsedTypes(_UsedTypes), TD(_TD) {}
|
||||
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<FindUsedTypes>();
|
||||
|
@ -86,7 +86,7 @@ namespace {
|
|||
StaticInitList;
|
||||
const std::set<const Type *>* UsedTypes;
|
||||
static char ID;
|
||||
MSILWriter(raw_ostream &o) : FunctionPass((intptr_t)&ID), Out(o) {
|
||||
MSILWriter(raw_ostream &o) : FunctionPass(&ID), Out(o) {
|
||||
UniqID = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace {
|
|||
|
||||
static char ID;
|
||||
Filler(TargetMachine &tm)
|
||||
: MachineFunctionPass((intptr_t)&ID), TM(tm), TII(tm.getInstrInfo()) { }
|
||||
: MachineFunctionPass(&ID), TM(tm), TII(tm.getInstrInfo()) { }
|
||||
|
||||
virtual const char *getPassName() const {
|
||||
return "Mips Delay Slot Filler";
|
||||
|
|
|
@ -32,7 +32,7 @@ STATISTIC(NumExpanded, "Number of branches expanded to long format");
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN PPCBSel : public MachineFunctionPass {
|
||||
static char ID;
|
||||
PPCBSel() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
PPCBSel() : MachineFunctionPass(&ID) {}
|
||||
|
||||
/// BlockSizes - The sizes of the basic blocks in the function.
|
||||
std::vector<unsigned> BlockSizes;
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace {
|
|||
public:
|
||||
static char ID;
|
||||
PPCCodeEmitter(TargetMachine &T, MachineCodeEmitter &M)
|
||||
: MachineFunctionPass((intptr_t)&ID), TM(T), MCE(M) {}
|
||||
: MachineFunctionPass(&ID), TM(T), MCE(M) {}
|
||||
|
||||
const char *getPassName() const { return "PowerPC Machine Code Emitter"; }
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace {
|
|||
|
||||
static char ID;
|
||||
Filler(TargetMachine &tm)
|
||||
: MachineFunctionPass((intptr_t)&ID), TM(tm), TII(tm.getInstrInfo()) { }
|
||||
: MachineFunctionPass(&ID), TM(tm), TII(tm.getInstrInfo()) { }
|
||||
|
||||
virtual const char *getPassName() const {
|
||||
return "SPARC Delay Slot Filler";
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace {
|
|||
|
||||
static char ID;
|
||||
FPMover(TargetMachine &tm)
|
||||
: MachineFunctionPass((intptr_t)&ID), TM(tm) { }
|
||||
: MachineFunctionPass(&ID), TM(tm) { }
|
||||
|
||||
virtual const char *getPassName() const {
|
||||
return "Sparc Double-FP Move Fixer";
|
||||
|
|
|
@ -232,7 +232,7 @@ void TargetData::init(const std::string &TargetDescription) {
|
|||
}
|
||||
|
||||
TargetData::TargetData(const Module *M)
|
||||
: ImmutablePass((intptr_t)&ID) {
|
||||
: ImmutablePass(&ID) {
|
||||
init(M->getDataLayout());
|
||||
}
|
||||
|
||||
|
|
|
@ -46,12 +46,12 @@ namespace {
|
|||
public:
|
||||
static char ID;
|
||||
explicit Emitter(X86TargetMachine &tm, MachineCodeEmitter &mce)
|
||||
: MachineFunctionPass((intptr_t)&ID), II(0), TD(0), TM(tm),
|
||||
: MachineFunctionPass(&ID), II(0), TD(0), TM(tm),
|
||||
MCE(mce), PICBaseOffset(0), Is64BitMode(false),
|
||||
IsPIC(TM.getRelocationModel() == Reloc::PIC_) {}
|
||||
Emitter(X86TargetMachine &tm, MachineCodeEmitter &mce,
|
||||
const X86InstrInfo &ii, const TargetData &td, bool is64)
|
||||
: MachineFunctionPass((intptr_t)&ID), II(&ii), TD(&td), TM(tm),
|
||||
: MachineFunctionPass(&ID), II(&ii), TD(&td), TM(tm),
|
||||
MCE(mce), PICBaseOffset(0), Is64BitMode(is64),
|
||||
IsPIC(TM.getRelocationModel() == Reloc::PIC_) {}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ STATISTIC(NumFP , "Number of floating point instructions");
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN FPS : public MachineFunctionPass {
|
||||
static char ID;
|
||||
FPS() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
FPS() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
||||
|
|
|
@ -1118,7 +1118,7 @@ unsigned getX86SubSuperRegister(unsigned Reg, MVT VT, bool High) {
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN MSAC : public MachineFunctionPass {
|
||||
static char ID;
|
||||
MSAC() : MachineFunctionPass((intptr_t)&ID) {}
|
||||
MSAC() : MachineFunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF) {
|
||||
MachineFrameInfo *FFI = MF.getFrameInfo();
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace {
|
|||
// Hello - The first implementation, without getAnalysisUsage.
|
||||
struct Hello : public FunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
Hello() : FunctionPass((intptr_t)&ID) {}
|
||||
Hello() : FunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
HelloCounter++;
|
||||
|
@ -45,7 +45,7 @@ namespace {
|
|||
// Hello2 - The second implementation with getAnalysisUsage implemented.
|
||||
struct Hello2 : public FunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
Hello2() : FunctionPass((intptr_t)&ID) {}
|
||||
Hello2() : FunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
HelloCounter++;
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace {
|
|||
|
||||
virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC);
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
ArgPromotion(unsigned maxElements = 3) : CallGraphSCCPass((intptr_t)&ID),
|
||||
ArgPromotion(unsigned maxElements = 3) : CallGraphSCCPass(&ID),
|
||||
maxElements(maxElements) {}
|
||||
|
||||
/// A vector used to hold the indices of a single GEP instruction
|
||||
|
|
|
@ -31,7 +31,7 @@ STATISTIC(NumMerged, "Number of global constants merged");
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN ConstantMerge : public ModulePass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
ConstantMerge() : ModulePass((intptr_t)&ID) {}
|
||||
ConstantMerge() : ModulePass(&ID) {}
|
||||
|
||||
// run - For this pass, process all of the globals in the module,
|
||||
// eliminating duplicate constants.
|
||||
|
|
|
@ -121,7 +121,7 @@ namespace {
|
|||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
DAE() : ModulePass((intptr_t)&ID) {}
|
||||
DAE() : ModulePass(&ID) {}
|
||||
bool runOnModule(Module &M);
|
||||
|
||||
virtual bool ShouldHackArguments() const { return false; }
|
||||
|
|
|
@ -27,7 +27,7 @@ STATISTIC(NumKilled, "Number of unused typenames removed from symtab");
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN DTE : public ModulePass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
DTE() : ModulePass((intptr_t)&ID) {}
|
||||
DTE() : ModulePass(&ID) {}
|
||||
|
||||
// doPassInitialization - For this pass, it removes global symbol table
|
||||
// entries for primitive types. These are never used for linking in GCC and
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace {
|
|||
///
|
||||
explicit GVExtractorPass(std::vector<GlobalValue*>& GVs, bool deleteS = true,
|
||||
bool relinkCallees = false)
|
||||
: ModulePass((intptr_t)&ID), Named(GVs), deleteStuff(deleteS),
|
||||
: ModulePass(&ID), Named(GVs), deleteStuff(deleteS),
|
||||
reLink(relinkCallees) {}
|
||||
|
||||
bool runOnModule(Module &M) {
|
||||
|
|
|
@ -31,7 +31,7 @@ STATISTIC(NumVariables, "Number of global variables removed");
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN GlobalDCE : public ModulePass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
GlobalDCE() : ModulePass((intptr_t)&ID) {}
|
||||
GlobalDCE() : ModulePass(&ID) {}
|
||||
|
||||
// run - Do the GlobalDCE pass on the specified module, optionally updating
|
||||
// the specified callgraph to reflect the changes.
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace {
|
|||
AU.addRequired<TargetData>();
|
||||
}
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
GlobalOpt() : ModulePass((intptr_t)&ID) {}
|
||||
GlobalOpt() : ModulePass(&ID) {}
|
||||
|
||||
bool runOnModule(Module &M);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace {
|
|||
///
|
||||
struct VISIBILITY_HIDDEN IPCP : public ModulePass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
IPCP() : ModulePass((intptr_t)&ID) {}
|
||||
IPCP() : ModulePass(&ID) {}
|
||||
|
||||
bool runOnModule(Module &M);
|
||||
private:
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace {
|
|||
class VISIBILITY_HIDDEN IndMemRemPass : public ModulePass {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
IndMemRemPass() : ModulePass((intptr_t)&ID) {}
|
||||
IndMemRemPass() : ModulePass(&ID) {}
|
||||
|
||||
virtual bool runOnModule(Module &M);
|
||||
};
|
||||
|
|
|
@ -34,11 +34,11 @@ static cl::opt<int>
|
|||
InlineLimit("inline-threshold", cl::Hidden, cl::init(200),
|
||||
cl::desc("Control the amount of inlining to perform (default = 200)"));
|
||||
|
||||
Inliner::Inliner(const void *ID)
|
||||
: CallGraphSCCPass((intptr_t)ID), InlineThreshold(InlineLimit) {}
|
||||
Inliner::Inliner(void *ID)
|
||||
: CallGraphSCCPass(ID), InlineThreshold(InlineLimit) {}
|
||||
|
||||
Inliner::Inliner(const void *ID, int Threshold)
|
||||
: CallGraphSCCPass((intptr_t)ID), InlineThreshold(Threshold) {}
|
||||
Inliner::Inliner(void *ID, int Threshold)
|
||||
: CallGraphSCCPass(ID), InlineThreshold(Threshold) {}
|
||||
|
||||
/// getAnalysisUsage - For this class, we declare that we require and preserve
|
||||
/// the call graph. If the derived class implements this method, it should
|
||||
|
|
|
@ -60,7 +60,7 @@ static RegisterPass<InternalizePass>
|
|||
X("internalize", "Internalize Global Symbols");
|
||||
|
||||
InternalizePass::InternalizePass(bool AllButMain)
|
||||
: ModulePass((intptr_t)&ID), AllButMain(AllButMain){
|
||||
: ModulePass(&ID), AllButMain(AllButMain){
|
||||
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.
|
||||
|
@ -68,7 +68,7 @@ InternalizePass::InternalizePass(bool AllButMain)
|
|||
}
|
||||
|
||||
InternalizePass::InternalizePass(const std::vector<const char *>&exportList)
|
||||
: ModulePass((intptr_t)&ID), AllButMain(false){
|
||||
: ModulePass(&ID), AllButMain(false){
|
||||
for(std::vector<const char *>::const_iterator itr = exportList.begin();
|
||||
itr != exportList.end(); itr++) {
|
||||
ExternalNames.insert(*itr);
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace {
|
|||
unsigned NumLoops;
|
||||
|
||||
explicit LoopExtractor(unsigned numLoops = ~0)
|
||||
: FunctionPass((intptr_t)&ID), NumLoops(numLoops) {}
|
||||
: FunctionPass(&ID), NumLoops(numLoops) {}
|
||||
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
||||
|
@ -167,11 +167,11 @@ namespace {
|
|||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
explicit BlockExtractorPass(const std::vector<BasicBlock*> &B)
|
||||
: ModulePass((intptr_t)&ID), BlocksToNotExtract(B) {
|
||||
: ModulePass(&ID), BlocksToNotExtract(B) {
|
||||
if (!BlockFile.empty())
|
||||
LoadFile(BlockFile.c_str());
|
||||
}
|
||||
BlockExtractorPass() : ModulePass((intptr_t)&ID) {}
|
||||
BlockExtractorPass() : ModulePass(&ID) {}
|
||||
|
||||
bool runOnModule(Module &M);
|
||||
};
|
||||
|
|
|
@ -112,7 +112,7 @@ namespace {
|
|||
bool IsTransformableFunction(const std::string& Name);
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
LowerSetJmp() : ModulePass((intptr_t)&ID) {}
|
||||
LowerSetJmp() : ModulePass(&ID) {}
|
||||
|
||||
void visitCallInst(CallInst& CI);
|
||||
void visitInvokeInst(InvokeInst& II);
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace {
|
|||
int scanDistribution(Function&, int, std::map<Constant*, int>&);
|
||||
public :
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
PartSpec() : ModulePass((intptr_t)&ID) {}
|
||||
PartSpec() : ModulePass(&ID) {}
|
||||
bool runOnModule(Module &M);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ STATISTIC(NumUnreach, "Number of noreturn calls optimized");
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN PruneEH : public CallGraphSCCPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
PruneEH() : CallGraphSCCPass((intptr_t)&ID) {}
|
||||
PruneEH() : CallGraphSCCPass(&ID) {}
|
||||
|
||||
// runOnSCC - Analyze the SCC, performing the transformation if possible.
|
||||
bool runOnSCC(const std::vector<CallGraphNode *> &SCC);
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace {
|
|||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
RaiseAllocations()
|
||||
: ModulePass((intptr_t)&ID), MallocFunc(0), FreeFunc(0) {}
|
||||
: ModulePass(&ID), MallocFunc(0), FreeFunc(0) {}
|
||||
|
||||
// doPassInitialization - For the raise allocations pass, this finds a
|
||||
// declaration for malloc and free if they exist.
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace {
|
|||
class VISIBILITY_HIDDEN StripDeadPrototypesPass : public ModulePass {
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
StripDeadPrototypesPass() : ModulePass((intptr_t)&ID) { }
|
||||
StripDeadPrototypesPass() : ModulePass(&ID) { }
|
||||
virtual bool runOnModule(Module &M);
|
||||
};
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace {
|
|||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
explicit StripSymbols(bool ODI = false)
|
||||
: ModulePass((intptr_t)&ID), OnlyDebugInfo(ODI) {}
|
||||
: ModulePass(&ID), OnlyDebugInfo(ODI) {}
|
||||
|
||||
virtual bool runOnModule(Module &M);
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace {
|
|||
|
||||
virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC);
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
SRETPromotion() : CallGraphSCCPass((intptr_t)&ID) {}
|
||||
SRETPromotion() : CallGraphSCCPass(&ID) {}
|
||||
|
||||
private:
|
||||
bool PromoteReturn(CallGraphNode *CGN);
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace {
|
|||
bool runOnModule(Module &M);
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
EdgeProfiler() : ModulePass((intptr_t)&ID) {}
|
||||
EdgeProfiler() : ModulePass(&ID) {}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ namespace {
|
|||
/// ProfilerRS - Insert the random sampling framework
|
||||
struct VISIBILITY_HIDDEN ProfilerRS : public FunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
ProfilerRS() : FunctionPass((intptr_t)&ID) {}
|
||||
ProfilerRS() : FunctionPass(&ID) {}
|
||||
|
||||
std::map<Value*, Value*> TransCache;
|
||||
std::set<BasicBlock*> ChoicePoints;
|
||||
|
|
|
@ -35,7 +35,7 @@ STATISTIC(NumRemoved, "Number of instructions removed");
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN ADCE : public FunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
ADCE() : FunctionPass((intptr_t)&ID) {}
|
||||
ADCE() : FunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnFunction(Function& F);
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ STATISTIC(NumMoved, "Number of basic blocks moved");
|
|||
namespace {
|
||||
struct VISIBILITY_HIDDEN BlockPlacement : public FunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
BlockPlacement() : FunctionPass((intptr_t)&ID) {}
|
||||
BlockPlacement() : FunctionPass(&ID) {}
|
||||
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue