aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/IPO
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r--lib/Transforms/IPO/ArgumentPromotion.cpp4
-rw-r--r--lib/Transforms/IPO/ConstantMerge.cpp4
-rw-r--r--lib/Transforms/IPO/DeadArgumentElimination.cpp8
-rw-r--r--lib/Transforms/IPO/DeadTypeElimination.cpp4
-rw-r--r--lib/Transforms/IPO/ExtractFunction.cpp4
-rw-r--r--lib/Transforms/IPO/GlobalDCE.cpp4
-rw-r--r--lib/Transforms/IPO/GlobalOpt.cpp4
-rw-r--r--lib/Transforms/IPO/IPConstantPropagation.cpp4
-rw-r--r--lib/Transforms/IPO/IndMemRemoval.cpp4
-rw-r--r--lib/Transforms/IPO/InlineSimple.cpp4
-rw-r--r--lib/Transforms/IPO/Inliner.cpp2
-rw-r--r--lib/Transforms/IPO/Inliner.h2
-rw-r--r--lib/Transforms/IPO/Internalize.cpp4
-rw-r--r--lib/Transforms/IPO/LoopExtractor.cpp12
-rw-r--r--lib/Transforms/IPO/LowerSetJmp.cpp4
-rw-r--r--lib/Transforms/IPO/PruneEH.cpp4
-rw-r--r--lib/Transforms/IPO/RaiseAllocations.cpp4
-rw-r--r--lib/Transforms/IPO/SimplifyLibCalls.cpp4
-rw-r--r--lib/Transforms/IPO/StripDeadPrototypes.cpp4
-rw-r--r--lib/Transforms/IPO/StripSymbols.cpp4
20 files changed, 44 insertions, 44 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp
index 6310e5d..a91dbc2 100644
--- a/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -63,7 +63,7 @@ namespace {
}
virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC);
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
ArgPromotion() : CallGraphSCCPass((intptr_t)&ID) {}
private:
@@ -72,7 +72,7 @@ namespace {
Function *DoPromotion(Function *F, std::vector<Argument*> &ArgsToPromote);
};
- const int ArgPromotion::ID = 0;
+ const char ArgPromotion::ID = 0;
RegisterPass<ArgPromotion> X("argpromotion",
"Promote 'by reference' arguments to scalars");
}
diff --git a/lib/Transforms/IPO/ConstantMerge.cpp b/lib/Transforms/IPO/ConstantMerge.cpp
index 5c22643..635caf5 100644
--- a/lib/Transforms/IPO/ConstantMerge.cpp
+++ b/lib/Transforms/IPO/ConstantMerge.cpp
@@ -29,7 +29,7 @@ STATISTIC(NumMerged, "Number of global constants merged");
namespace {
struct VISIBILITY_HIDDEN ConstantMerge : public ModulePass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
ConstantMerge() : ModulePass((intptr_t)&ID) {}
// run - For this pass, process all of the globals in the module,
@@ -38,7 +38,7 @@ namespace {
bool runOnModule(Module &M);
};
- const int ConstantMerge::ID = 0;
+ const char ConstantMerge::ID = 0;
RegisterPass<ConstantMerge>X("constmerge","Merge Duplicate Global Constants");
}
diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp
index 162d078..f355021 100644
--- a/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -76,7 +76,7 @@ namespace {
std::multimap<Function*, CallSite> CallSites;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
DAE() : ModulePass((intptr_t)&ID) {}
bool runOnModule(Module &M);
@@ -95,17 +95,17 @@ namespace {
void RemoveDeadArgumentsFromFunction(Function *F);
};
- const int DAE::ID = 0;
+ const char DAE::ID = 0;
RegisterPass<DAE> X("deadargelim", "Dead Argument Elimination");
/// DAH - DeadArgumentHacking pass - Same as dead argument elimination, but
/// deletes arguments to functions which are external. This is only for use
/// by bugpoint.
struct DAH : public DAE {
- static const int ID;
+ static const char ID;
virtual bool ShouldHackArguments() const { return true; }
};
- const int DAH::ID = 0;
+ const char DAH::ID = 0;
RegisterPass<DAH> Y("deadarghaX0r",
"Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)");
}
diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp
index 8ecd4b7..4dff7a3 100644
--- a/lib/Transforms/IPO/DeadTypeElimination.cpp
+++ b/lib/Transforms/IPO/DeadTypeElimination.cpp
@@ -26,7 +26,7 @@ STATISTIC(NumKilled, "Number of unused typenames removed from symtab");
namespace {
struct VISIBILITY_HIDDEN DTE : public ModulePass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
DTE() : ModulePass((intptr_t)&ID) {}
// doPassInitialization - For this pass, it removes global symbol table
@@ -43,7 +43,7 @@ namespace {
AU.addRequired<FindUsedTypes>();
}
};
- const int DTE::ID = 0;
+ const char DTE::ID = 0;
RegisterPass<DTE> X("deadtypeelim", "Dead Type Elimination");
}
diff --git a/lib/Transforms/IPO/ExtractFunction.cpp b/lib/Transforms/IPO/ExtractFunction.cpp
index 7a47655..2d5c034 100644
--- a/lib/Transforms/IPO/ExtractFunction.cpp
+++ b/lib/Transforms/IPO/ExtractFunction.cpp
@@ -25,7 +25,7 @@ namespace {
bool deleteFunc;
bool reLink;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
/// FunctionExtractorPass - If deleteFn is true, this pass deletes as the
/// specified function. Otherwise, it deletes as much of the module as
@@ -134,7 +134,7 @@ namespace {
}
};
- const int FunctionExtractorPass::ID = 0;
+ const char FunctionExtractorPass::ID = 0;
RegisterPass<FunctionExtractorPass> X("extract", "Function Extractor");
}
diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp
index 00b16a8..4a08b45 100644
--- a/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/lib/Transforms/IPO/GlobalDCE.cpp
@@ -30,7 +30,7 @@ STATISTIC(NumVariables, "Number of global variables removed");
namespace {
struct VISIBILITY_HIDDEN GlobalDCE : public ModulePass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
GlobalDCE() : ModulePass((intptr_t)&ID) {}
// run - Do the GlobalDCE pass on the specified module, optionally updating
@@ -49,7 +49,7 @@ namespace {
bool SafeToDestroyConstant(Constant* C);
bool RemoveUnusedGlobalValue(GlobalValue &GV);
};
- const int GlobalDCE::ID = 0;
+ const char GlobalDCE::ID = 0;
RegisterPass<GlobalDCE> X("globaldce", "Dead Global Elimination");
}
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp
index cfa8998..421bda6 100644
--- a/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/lib/Transforms/IPO/GlobalOpt.cpp
@@ -50,7 +50,7 @@ namespace {
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<TargetData>();
}
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
GlobalOpt() : ModulePass((intptr_t)&ID) {}
bool runOnModule(Module &M);
@@ -63,7 +63,7 @@ namespace {
bool ProcessInternalGlobal(GlobalVariable *GV,Module::global_iterator &GVI);
};
- const int GlobalOpt::ID = 0;
+ const char GlobalOpt::ID = 0;
RegisterPass<GlobalOpt> X("globalopt", "Global Variable Optimizer");
}
diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp
index 9ef7756..00b829e 100644
--- a/lib/Transforms/IPO/IPConstantPropagation.cpp
+++ b/lib/Transforms/IPO/IPConstantPropagation.cpp
@@ -33,7 +33,7 @@ namespace {
/// IPCP - The interprocedural constant propagation pass
///
struct VISIBILITY_HIDDEN IPCP : public ModulePass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
IPCP() : ModulePass((intptr_t)&ID) {}
bool runOnModule(Module &M);
@@ -41,7 +41,7 @@ namespace {
bool PropagateConstantsIntoArguments(Function &F);
bool PropagateConstantReturn(Function &F);
};
- const int IPCP::ID = 0;
+ const char IPCP::ID = 0;
RegisterPass<IPCP> X("ipconstprop", "Interprocedural constant propagation");
}
diff --git a/lib/Transforms/IPO/IndMemRemoval.cpp b/lib/Transforms/IPO/IndMemRemoval.cpp
index 20d1117..5dd82bd 100644
--- a/lib/Transforms/IPO/IndMemRemoval.cpp
+++ b/lib/Transforms/IPO/IndMemRemoval.cpp
@@ -32,12 +32,12 @@ STATISTIC(NumBounce , "Number of bounce functions created");
namespace {
class VISIBILITY_HIDDEN IndMemRemPass : public ModulePass {
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
IndMemRemPass() : ModulePass((intptr_t)&ID) {}
virtual bool runOnModule(Module &M);
};
- const int IndMemRemPass::ID = 0;
+ const char IndMemRemPass::ID = 0;
RegisterPass<IndMemRemPass> X("indmemrem","Indirect Malloc and Free Removal");
} // end anonymous namespace
diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp
index 8f9a1f6..a300c62 100644
--- a/lib/Transforms/IPO/InlineSimple.cpp
+++ b/lib/Transforms/IPO/InlineSimple.cpp
@@ -54,10 +54,10 @@ namespace {
class VISIBILITY_HIDDEN SimpleInliner : public Inliner {
std::map<const Function*, FunctionInfo> CachedFunctionInfo;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
int getInlineCost(CallSite CS);
};
- const int SimpleInliner::ID = 0;
+ const char SimpleInliner::ID = 0;
RegisterPass<SimpleInliner> X("inline", "Function Integration/Inlining");
}
diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp
index 82611cb..d769043 100644
--- a/lib/Transforms/IPO/Inliner.cpp
+++ b/lib/Transforms/IPO/Inliner.cpp
@@ -36,7 +36,7 @@ namespace {
cl::desc("Control the amount of inlining to perform (default = 200)"));
}
-const int Inliner::ID = 0;
+const char Inliner::ID = 0;
Inliner::Inliner()
: CallGraphSCCPass((intptr_t)&ID), InlineThreshold(InlineLimit) {}
diff --git a/lib/Transforms/IPO/Inliner.h b/lib/Transforms/IPO/Inliner.h
index 321a65f..6a7c665 100644
--- a/lib/Transforms/IPO/Inliner.h
+++ b/lib/Transforms/IPO/Inliner.h
@@ -27,7 +27,7 @@ namespace llvm {
/// perform the inlining operations that does not depend on the policy.
///
struct Inliner : public CallGraphSCCPass {
- static const int ID;
+ static const char ID;
Inliner();
/// getAnalysisUsage - For this class, we declare that we require and preserve
diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp
index 17de131..eeabc3f 100644
--- a/lib/Transforms/IPO/Internalize.cpp
+++ b/lib/Transforms/IPO/Internalize.cpp
@@ -46,13 +46,13 @@ namespace {
std::set<std::string> ExternalNames;
bool DontInternalize;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
InternalizePass(bool InternalizeEverything = true);
InternalizePass(const std::vector <const char *>& exportList);
void LoadFile(const char *Filename);
virtual bool runOnModule(Module &M);
};
- const int InternalizePass::ID = 0;
+ const char InternalizePass::ID = 0;
RegisterPass<InternalizePass> X("internalize", "Internalize Global Symbols");
} // end anonymous namespace
diff --git a/lib/Transforms/IPO/LoopExtractor.cpp b/lib/Transforms/IPO/LoopExtractor.cpp
index 0ea544d..dc0ad43 100644
--- a/lib/Transforms/IPO/LoopExtractor.cpp
+++ b/lib/Transforms/IPO/LoopExtractor.cpp
@@ -34,7 +34,7 @@ namespace {
// Module passes to require FunctionPasses, so we can't get loop info if we're
// not a function pass.
struct VISIBILITY_HIDDEN LoopExtractor : public FunctionPass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
unsigned NumLoops;
LoopExtractor(unsigned numLoops = ~0)
@@ -51,17 +51,17 @@ namespace {
}
};
- const int LoopExtractor::ID = 0;
+ const char LoopExtractor::ID = 0;
RegisterPass<LoopExtractor>
X("loop-extract", "Extract loops into new functions");
/// SingleLoopExtractor - For bugpoint.
struct SingleLoopExtractor : public LoopExtractor {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
SingleLoopExtractor() : LoopExtractor(1) {}
};
- const int SingleLoopExtractor::ID = 0;
+ const char SingleLoopExtractor::ID = 0;
RegisterPass<SingleLoopExtractor>
Y("loop-extract-single", "Extract at most one loop into a new function");
} // End anonymous namespace
@@ -152,7 +152,7 @@ namespace {
class BlockExtractorPass : public ModulePass {
std::vector<BasicBlock*> BlocksToNotExtract;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
BlockExtractorPass(std::vector<BasicBlock*> &B)
: ModulePass((intptr_t)&ID), BlocksToNotExtract(B) {}
BlockExtractorPass() : ModulePass((intptr_t)&ID) {}
@@ -160,7 +160,7 @@ namespace {
bool runOnModule(Module &M);
};
- const int BlockExtractorPass::ID = 0;
+ const char BlockExtractorPass::ID = 0;
RegisterPass<BlockExtractorPass>
XX("extract-blocks", "Extract Basic Blocks From Module (for bugpoint use)");
}
diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp
index 010bc59..1fd9071 100644
--- a/lib/Transforms/IPO/LowerSetJmp.cpp
+++ b/lib/Transforms/IPO/LowerSetJmp.cpp
@@ -109,7 +109,7 @@ namespace {
bool IsTransformableFunction(const std::string& Name);
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
LowerSetJmp() : ModulePass((intptr_t)&ID) {}
void visitCallInst(CallInst& CI);
@@ -121,7 +121,7 @@ namespace {
bool doInitialization(Module& M);
};
- const int LowerSetJmp::ID = 0;
+ const char LowerSetJmp::ID = 0;
RegisterPass<LowerSetJmp> X("lowersetjmp", "Lower Set Jump");
} // end anonymous namespace
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp
index ee37992..3d70f16 100644
--- a/lib/Transforms/IPO/PruneEH.cpp
+++ b/lib/Transforms/IPO/PruneEH.cpp
@@ -35,7 +35,7 @@ STATISTIC(NumUnreach, "Number of noreturn calls optimized");
namespace {
struct VISIBILITY_HIDDEN PruneEH : public CallGraphSCCPass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
PruneEH() : CallGraphSCCPass((intptr_t)&ID) {}
/// DoesNotUnwind - This set contains all of the functions which we have
@@ -53,7 +53,7 @@ namespace {
void DeleteBasicBlock(BasicBlock *BB);
};
- const int PruneEH::ID = 0;
+ const char PruneEH::ID = 0;
RegisterPass<PruneEH> X("prune-eh", "Remove unused exception handling info");
}
diff --git a/lib/Transforms/IPO/RaiseAllocations.cpp b/lib/Transforms/IPO/RaiseAllocations.cpp
index f7f4037..7b338b1 100644
--- a/lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/lib/Transforms/IPO/RaiseAllocations.cpp
@@ -35,7 +35,7 @@ namespace {
Function *MallocFunc; // Functions in the module we are processing
Function *FreeFunc; // Initialized by doPassInitializationVirt
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
RaiseAllocations()
: ModulePass((intptr_t)&ID), MallocFunc(0), FreeFunc(0) {}
@@ -49,7 +49,7 @@ namespace {
bool runOnModule(Module &M);
};
- const int RaiseAllocations::ID = 0;
+ const char RaiseAllocations::ID = 0;
RegisterPass<RaiseAllocations>
X("raiseallocs", "Raise allocations from calls to instructions");
} // end anonymous namespace
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp
index f5a8fee..8e5567c 100644
--- a/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp
@@ -152,7 +152,7 @@ public:
/// @brief A ModulePass for optimizing well-known function calls.
class VISIBILITY_HIDDEN SimplifyLibCalls : public ModulePass {
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
SimplifyLibCalls() : ModulePass((intptr_t)&ID) {}
/// We need some target data for accurate signature details that are
@@ -376,7 +376,7 @@ private:
TargetData *TD; ///< Cached TargetData
};
-const int SimplifyLibCalls::ID = 0;
+const char SimplifyLibCalls::ID = 0;
// Register the pass
RegisterPass<SimplifyLibCalls>
X("simplify-libcalls", "Simplify well-known library calls");
diff --git a/lib/Transforms/IPO/StripDeadPrototypes.cpp b/lib/Transforms/IPO/StripDeadPrototypes.cpp
index d1467f9..d40e743 100644
--- a/lib/Transforms/IPO/StripDeadPrototypes.cpp
+++ b/lib/Transforms/IPO/StripDeadPrototypes.cpp
@@ -27,12 +27,12 @@ namespace {
/// @brief Pass to remove unused function declarations.
class VISIBILITY_HIDDEN StripDeadPrototypesPass : public ModulePass {
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
StripDeadPrototypesPass() : ModulePass((intptr_t)&ID) { }
virtual bool runOnModule(Module &M);
};
-const int StripDeadPrototypesPass::ID = 0;
+const char StripDeadPrototypesPass::ID = 0;
RegisterPass<StripDeadPrototypesPass> X("strip-dead-prototypes",
"Strip Unused Function Prototypes");
diff --git a/lib/Transforms/IPO/StripSymbols.cpp b/lib/Transforms/IPO/StripSymbols.cpp
index 3330f7a..50a5aba 100644
--- a/lib/Transforms/IPO/StripSymbols.cpp
+++ b/lib/Transforms/IPO/StripSymbols.cpp
@@ -37,7 +37,7 @@ namespace {
class VISIBILITY_HIDDEN StripSymbols : public ModulePass {
bool OnlyDebugInfo;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
StripSymbols(bool ODI = false)
: ModulePass((intptr_t)&ID), OnlyDebugInfo(ODI) {}
@@ -48,7 +48,7 @@ namespace {
}
};
- const int StripSymbols::ID = 0;
+ const char StripSymbols::ID = 0;
RegisterPass<StripSymbols> X("strip", "Strip all symbols from a module");
}