aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Analysis/CallGraph.h2
-rw-r--r--include/llvm/Analysis/DataStructure.h2
-rw-r--r--include/llvm/Analysis/DataStructure/DataStructure.h2
-rw-r--r--include/llvm/Analysis/Dominators.h20
-rw-r--r--include/llvm/Analysis/FindUnsafePointerTypes.h2
-rw-r--r--include/llvm/Analysis/FindUsedTypes.h1
-rw-r--r--include/llvm/Analysis/IntervalPartition.h2
-rw-r--r--include/llvm/Analysis/LiveVar/FunctionLiveVarInfo.h2
-rw-r--r--include/llvm/Analysis/LoopInfo.h2
-rw-r--r--include/llvm/Assembly/PrintModulePass.h4
-rw-r--r--include/llvm/Bytecode/WriteBytecodePass.h2
-rw-r--r--include/llvm/CodeGen/FunctionLiveVarInfo.h2
-rw-r--r--include/llvm/Pass.h7
-rw-r--r--include/llvm/Transforms/Scalar/InductionVars.h2
-rw-r--r--include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h2
-rw-r--r--lib/CodeGen/InstrSched/InstrScheduling.cpp2
-rw-r--r--lib/CodeGen/RegAlloc/PhyRegAlloc.cpp2
-rw-r--r--lib/Target/SparcV9/EmitBytecodeToAssembly.cpp2
-rw-r--r--lib/Target/SparcV9/InstrSched/InstrScheduling.cpp2
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp2
-rw-r--r--lib/Target/SparcV9/SparcV9AsmPrinter.cpp6
-rw-r--r--lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp3
-rw-r--r--lib/Target/SparcV9/SparcV9TargetMachine.cpp9
-rw-r--r--lib/Transforms/HoistPHIConstants.cpp2
-rw-r--r--lib/Transforms/IPO/ConstantMerge.cpp4
-rw-r--r--lib/Transforms/IPO/DeadTypeElimination.cpp4
-rw-r--r--lib/Transforms/IPO/GlobalDCE.cpp2
-rw-r--r--lib/Transforms/IPO/InlineSimple.cpp1
-rw-r--r--lib/Transforms/IPO/Internalize.cpp2
-rw-r--r--lib/Transforms/IPO/OldPoolAllocate.cpp2
-rw-r--r--lib/Transforms/IPO/SimpleStructMutation.cpp5
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp5
-rw-r--r--lib/Transforms/Instrumentation/TraceValues.cpp2
-rw-r--r--lib/Transforms/LevelRaise.cpp2
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp2
-rw-r--r--lib/Transforms/Scalar/ConstantProp.cpp2
-rw-r--r--lib/Transforms/Scalar/DCE.cpp3
-rw-r--r--lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp10
-rw-r--r--lib/Transforms/Scalar/GCSE.cpp4
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp4
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp2
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp4
-rw-r--r--lib/Transforms/Scalar/SymbolStripping.cpp3
-rw-r--r--lib/Transforms/Utils/LowerAllocations.cpp6
-rw-r--r--lib/Transforms/Utils/PromoteMemoryToRegister.cpp2
-rw-r--r--lib/VMCore/Pass.cpp15
-rw-r--r--lib/VMCore/PassManagerT.h3
-rw-r--r--lib/VMCore/Verifier.cpp2
-rw-r--r--tools/analyze/analyze.cpp12
49 files changed, 169 insertions, 18 deletions
diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h
index 61693876c4..035d4abc9c 100644
--- a/include/llvm/Analysis/CallGraph.h
+++ b/include/llvm/Analysis/CallGraph.h
@@ -115,6 +115,8 @@ public:
CallGraph(AnalysisID AID) : Root(0) { assert(AID == ID); }
~CallGraph() { destroy(); }
+ virtual const char *getPassName() const { return "Call Graph Construction"; }
+
// run - Compute the call graph for the specified module.
virtual bool run(Module *TheModule);
diff --git a/include/llvm/Analysis/DataStructure.h b/include/llvm/Analysis/DataStructure.h
index 90a4b5df23..f6b60b8386 100644
--- a/include/llvm/Analysis/DataStructure.h
+++ b/include/llvm/Analysis/DataStructure.h
@@ -439,6 +439,8 @@ public:
DataStructure(AnalysisID id) { assert(id == ID); }
~DataStructure() { releaseMemory(); }
+ virtual const char *getPassName() const { return "Data Structure Analysis"; }
+
// run - Do nothing, because methods are analyzed lazily
virtual bool run(Module *TheModule) { return false; }
diff --git a/include/llvm/Analysis/DataStructure/DataStructure.h b/include/llvm/Analysis/DataStructure/DataStructure.h
index 90a4b5df23..f6b60b8386 100644
--- a/include/llvm/Analysis/DataStructure/DataStructure.h
+++ b/include/llvm/Analysis/DataStructure/DataStructure.h
@@ -439,6 +439,8 @@ public:
DataStructure(AnalysisID id) { assert(id == ID); }
~DataStructure() { releaseMemory(); }
+ virtual const char *getPassName() const { return "Data Structure Analysis"; }
+
// run - Do nothing, because methods are analyzed lazily
virtual bool run(Module *TheModule) { return false; }
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h
index 3a29eec6c8..e3038da195 100644
--- a/include/llvm/Analysis/Dominators.h
+++ b/include/llvm/Analysis/Dominators.h
@@ -63,6 +63,11 @@ public:
DominatorSet(AnalysisID id) : DominatorBase(id == PostDomID) {}
+ virtual const char *getPassName() const {
+ if (isPostDominator()) return "Post-Dominator Set Construction";
+ else return "Dominator Set Construction";
+ }
+
virtual bool runOnFunction(Function *F);
// Accessor interface:
@@ -115,6 +120,11 @@ public:
ImmediateDominators(AnalysisID id) : DominatorBase(id == PostDomID) {}
+ virtual const char *getPassName() const {
+ if (isPostDominator()) return "Immediate Post-Dominators Construction";
+ else return "Immediate Dominators Construction";
+ }
+
virtual bool runOnFunction(Function *F) {
IDoms.clear(); // Reset from the last time we were run...
DominatorSet *DS;
@@ -206,6 +216,11 @@ public:
DominatorTree(AnalysisID id) : DominatorBase(id == PostDomID) {}
~DominatorTree() { reset(); }
+ virtual const char *getPassName() const {
+ if (isPostDominator()) return "Post-Dominator Tree Construction";
+ else return "Dominator Tree Construction";
+ }
+
virtual bool runOnFunction(Function *F) {
reset();
DominatorSet *DS;
@@ -262,6 +277,11 @@ public:
DominanceFrontier(AnalysisID id) : DominatorBase(id == PostDomID) {}
+ virtual const char *getPassName() const {
+ if (isPostDominator()) return "Post-Dominance Frontier Construction";
+ else return "Dominance Frontier Construction";
+ }
+
virtual bool runOnFunction(Function *) {
Frontiers.clear();
DominatorTree *DT;
diff --git a/include/llvm/Analysis/FindUnsafePointerTypes.h b/include/llvm/Analysis/FindUnsafePointerTypes.h
index 82cc28a06f..98f530caaa 100644
--- a/include/llvm/Analysis/FindUnsafePointerTypes.h
+++ b/include/llvm/Analysis/FindUnsafePointerTypes.h
@@ -30,6 +30,8 @@ public:
FindUnsafePointerTypes(AnalysisID id) { assert(ID == id); }
+ virtual const char *getPassName() const { return "Find Unsafe Pointer Types";}
+
// Accessor for underlying type set...
inline const std::set<PointerType*> &getUnsafeTypes() const {
return UnsafeTypes;
diff --git a/include/llvm/Analysis/FindUsedTypes.h b/include/llvm/Analysis/FindUsedTypes.h
index 5c02b2cc5f..ece390e489 100644
--- a/include/llvm/Analysis/FindUsedTypes.h
+++ b/include/llvm/Analysis/FindUsedTypes.h
@@ -24,6 +24,7 @@ public:
static AnalysisID IncludeSymbolTableID;
FindUsedTypes(AnalysisID id) : IncludeSymbolTables(id != ID) {}
+ virtual const char *getPassName() const { return "Find Used Types"; }
// getTypes - After the pass has been run, return the set containing all of
// the types used in the module.
diff --git a/include/llvm/Analysis/IntervalPartition.h b/include/llvm/Analysis/IntervalPartition.h
index 281b32ed0e..ab16250e83 100644
--- a/include/llvm/Analysis/IntervalPartition.h
+++ b/include/llvm/Analysis/IntervalPartition.h
@@ -39,6 +39,8 @@ public:
IntervalPartition(AnalysisID AID) : RootInterval(0) { assert(AID == ID); }
+ const char *getPassName() const { return "Interval Partition Construction"; }
+
// run - Calculate the interval partition for this function
virtual bool runOnFunction(Function *F);
diff --git a/include/llvm/Analysis/LiveVar/FunctionLiveVarInfo.h b/include/llvm/Analysis/LiveVar/FunctionLiveVarInfo.h
index 4f7db3fb88..dab6d3c7f3 100644
--- a/include/llvm/Analysis/LiveVar/FunctionLiveVarInfo.h
+++ b/include/llvm/Analysis/LiveVar/FunctionLiveVarInfo.h
@@ -105,6 +105,8 @@ public:
FunctionLiveVarInfo(AnalysisID id = ID) { assert(id == ID); }
+ virtual const char *getPassName() const { return "Live Variable Analysis"; }
+
// --------- Implement the FunctionPass interface ----------------------
// runOnFunction - Perform analysis, update internal data structures.
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h
index b56de0f806..bb9058c256 100644
--- a/include/llvm/Analysis/LoopInfo.h
+++ b/include/llvm/Analysis/LoopInfo.h
@@ -72,6 +72,8 @@ public:
LoopInfo(AnalysisID id) { assert(id == ID); }
~LoopInfo() { releaseMemory(); }
+ const char *getPassName() const { return "Natural Loop Analysis"; }
+
const std::vector<Loop*> &getTopLevelLoops() const { return TopLevelLoops; }
// getLoopFor - Return the inner most loop that BB lives in. If a basic block
diff --git a/include/llvm/Assembly/PrintModulePass.h b/include/llvm/Assembly/PrintModulePass.h
index 2d63e6d74f..83cd852f13 100644
--- a/include/llvm/Assembly/PrintModulePass.h
+++ b/include/llvm/Assembly/PrintModulePass.h
@@ -22,6 +22,8 @@ public:
inline PrintModulePass(std::ostream *o = &std::cout, bool DS = false)
: Out(o), DeleteStream(DS) {
}
+
+ const char *getPassName() const { return "Module Printer"; }
inline ~PrintModulePass() {
if (DeleteStream) delete Out;
@@ -46,6 +48,8 @@ public:
bool DS = false)
: Banner(B), Out(o), DeleteStream(DS) {
}
+
+ const char *getPassName() const { return "Function Printer"; }
inline ~PrintFunctionPass() {
if (DeleteStream) delete Out;
diff --git a/include/llvm/Bytecode/WriteBytecodePass.h b/include/llvm/Bytecode/WriteBytecodePass.h
index bd9d42369e..84e491a7d9 100644
--- a/include/llvm/Bytecode/WriteBytecodePass.h
+++ b/include/llvm/Bytecode/WriteBytecodePass.h
@@ -19,6 +19,8 @@ public:
: Out(o), DeleteStream(DS) {
}
+ const char *getPassName() const { return "Bytecode Writer"; }
+
inline ~WriteBytecodePass() {
if (DeleteStream) delete Out;
}
diff --git a/include/llvm/CodeGen/FunctionLiveVarInfo.h b/include/llvm/CodeGen/FunctionLiveVarInfo.h
index 4f7db3fb88..dab6d3c7f3 100644
--- a/include/llvm/CodeGen/FunctionLiveVarInfo.h
+++ b/include/llvm/CodeGen/FunctionLiveVarInfo.h
@@ -105,6 +105,8 @@ public:
FunctionLiveVarInfo(AnalysisID id = ID) { assert(id == ID); }
+ virtual const char *getPassName() const { return "Live Variable Analysis"; }
+
// --------- Implement the FunctionPass interface ----------------------
// runOnFunction - Perform analysis, update internal data structures.
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index bd040b9993..3c89130cba 100644
--- a/include/llvm/Pass.h
+++ b/include/llvm/Pass.h
@@ -41,6 +41,11 @@ public:
inline Pass(AnalysisResolver *AR = 0) : Resolver(AR) {}
inline virtual ~Pass() {} // Destructor is virtual so we can be subclassed
+ // getPassName - Return a nice clean name for a pass. This should be
+ // overloaded by the pass, but if it is not, C++ RTTI will be consulted to get
+ // a SOMEWHAT intelligable name for the pass.
+ //
+ virtual const char *getPassName() const;
// run - Run this pass, returning true if a modification was made to the
// module argument. This should be implemented by all concrete subclasses.
@@ -312,6 +317,4 @@ protected:
void setAnalysisResolver(Pass *P, AnalysisResolver *AR);
};
-
-
#endif
diff --git a/include/llvm/Transforms/Scalar/InductionVars.h b/include/llvm/Transforms/Scalar/InductionVars.h
index 196bb1f10a..704617c594 100644
--- a/include/llvm/Transforms/Scalar/InductionVars.h
+++ b/include/llvm/Transforms/Scalar/InductionVars.h
@@ -12,6 +12,8 @@
class IntervalPartition;
struct InductionVariableCannonicalize : public FunctionPass {
+ const char *getPassName() const { return "**OLD IndVars ***"; }
+
// doInductionVariableCannonicalize - Simplify induction variables in loops
//
static bool doIt(Function *F, IntervalPartition &IP);
diff --git a/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h b/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h
index a6f259a57d..6281c8aa4a 100644
--- a/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h
+++ b/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h
@@ -17,6 +17,8 @@ public:
static AnalysisID ID; // Pass ID
UnifyFunctionExitNodes(AnalysisID id = ID) : ExitNode(0) { assert(ID == id); }
+ virtual const char *getPassName() const { return "Unify Function Exit Nodes";}
+
// UnifyAllExitNodes - Unify all exit nodes of the CFG by creating a new
// BasicBlock, and converting all returns to unconditional branches to this
// new basic block. The singular exit node is returned in ExitNode.
diff --git a/lib/CodeGen/InstrSched/InstrScheduling.cpp b/lib/CodeGen/InstrSched/InstrScheduling.cpp
index 4c2a28c788..b042279747 100644
--- a/lib/CodeGen/InstrSched/InstrScheduling.cpp
+++ b/lib/CodeGen/InstrSched/InstrScheduling.cpp
@@ -1484,6 +1484,8 @@ namespace {
const TargetMachine &target;
public:
inline InstructionSchedulingWithSSA(const TargetMachine &T) : target(T) {}
+
+ const char *getPassName() const { return "Instruction Scheduling"; }
// getAnalysisUsage - We use LiveVarInfo...
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
index 4ad98d917f..b783255699 100644
--- a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
@@ -44,6 +44,8 @@ namespace {
TargetMachine &Target;
public:
inline RegisterAllocator(TargetMachine &T) : Target(T) {}
+
+ const char *getPassName() const { return "Register Allocation"; }
bool runOnFunction(Function *F) {
if (DEBUG_RA)
diff --git a/lib/Target/SparcV9/EmitBytecodeToAssembly.cpp b/lib/Target/SparcV9/EmitBytecodeToAssembly.cpp
index 92420f9421..fdf8f3ec36 100644
--- a/lib/Target/SparcV9/EmitBytecodeToAssembly.cpp
+++ b/lib/Target/SparcV9/EmitBytecodeToAssembly.cpp
@@ -59,6 +59,8 @@ namespace {
public:
SparcBytecodeWriter(std::ostream &out) : Out(out) {}
+ const char *getPassName() const { return "Emit Bytecode to Sparc Assembly";}
+
virtual bool run(Module *M) {
// Write bytecode out to the sparc assembly stream
Out << "\n\n!LLVM BYTECODE OUTPUT\n\t.section \".rodata\"\n\t.align 8\n";
diff --git a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp b/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp
index 4c2a28c788..b042279747 100644
--- a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp
+++ b/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp
@@ -1484,6 +1484,8 @@ namespace {
const TargetMachine &target;
public:
inline InstructionSchedulingWithSSA(const TargetMachine &T) : target(T) {}
+
+ const char *getPassName() const { return "Instruction Scheduling"; }
// getAnalysisUsage - We use LiveVarInfo...
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
index 4ad98d917f..b783255699 100644
--- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
@@ -44,6 +44,8 @@ namespace {
TargetMachine &Target;
public:
inline RegisterAllocator(TargetMachine &T) : Target(T) {}
+
+ const char *getPassName() const { return "Register Allocation"; }
bool runOnFunction(Function *F) {
if (DEBUG_RA)
diff --git a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
index f4ca22f9da..8d87bfec6b 100644
--- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
+++ b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
@@ -192,6 +192,10 @@ struct SparcFunctionAsmPrinter : public FunctionPass, public AsmPrinter {
inline SparcFunctionAsmPrinter(std::ostream &os, const TargetMachine &t)
: AsmPrinter(os, t) {}
+ const char *getPassName() const {
+ return "Output Sparc Assembly for Functions";
+ }
+
virtual bool doInitialization(Module *M) {
startModule(M);
return false;
@@ -424,6 +428,8 @@ public:
SparcModuleAsmPrinter(std::ostream &os, TargetMachine &t)
: AsmPrinter(os, t) {}
+ const char *getPassName() const { return "Output Sparc Assembly for Module"; }
+
virtual bool run(Module *M) {
startModule(M);
emitGlobalsAndConstants(M);
diff --git a/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp b/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp
index 17cd73bfc3..b42e777156 100644
--- a/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp
+++ b/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp
@@ -25,6 +25,9 @@ class InsertPrologEpilogCode : public FunctionPass {
TargetMachine &Target;
public:
InsertPrologEpilogCode(TargetMachine &T) : Target(T) {}
+
+ const char *getPassName() const { return "Sparc Prolog/Epilog Inserter"; }
+
bool runOnFunction(Function *F) {
MachineCodeForMethod &mcodeInfo = MachineCodeForMethod::get(F);
if (!mcodeInfo.isCompiledAsLeafMethod()) {
diff --git a/lib/Target/SparcV9/SparcV9TargetMachine.cpp b/lib/Target/SparcV9/SparcV9TargetMachine.cpp
index 306b85a227..fecdf23e29 100644
--- a/lib/Target/SparcV9/SparcV9TargetMachine.cpp
+++ b/lib/Target/SparcV9/SparcV9TargetMachine.cpp
@@ -130,6 +130,11 @@ class ConstructMachineCodeForFunction : public FunctionPass {
TargetMachine &Target;
public:
inline ConstructMachineCodeForFunction(TargetMachine &T) : Target(T) {}
+
+ const char *getPassName() const {
+ return "Sparc ConstructMachineCodeForFunction";
+ }
+
bool runOnFunction(Function *F) {
MachineCodeForMethod::construct(F, Target);
return false;
@@ -140,6 +145,8 @@ class InstructionSelection : public FunctionPass {
TargetMachine &Target;
public:
inline InstructionSelection(TargetMachine &T) : Target(T) {}
+ const char *getPassName() const { return "Sparc Instruction Selection"; }
+
bool runOnFunction(Function *F) {
if (SelectInstructionsForMethod(F, Target)) {
cerr << "Instr selection failed for function " << F->getName() << "\n";
@@ -150,6 +157,8 @@ public:
};
struct FreeMachineCodeForFunction : public FunctionPass {
+ const char *getPassName() const { return "Sparc FreeMachineCodeForFunction"; }
+
static void freeMachineCode(Instruction *I) {
MachineCodeForInstruction::destroy(I);
}
diff --git a/lib/Transforms/HoistPHIConstants.cpp b/lib/Transforms/HoistPHIConstants.cpp
index e969ac24b3..05480ea950 100644
--- a/lib/Transforms/HoistPHIConstants.cpp
+++ b/lib/Transforms/HoistPHIConstants.cpp
@@ -75,6 +75,8 @@ static bool doHoistPHIConstants(Function *M) {
namespace {
struct HoistPHIConstants : public FunctionPass {
+ const char *getPassName() const { return "Hoist Constants from PHI Nodes"; }
+
virtual bool runOnFunction(Function *F) { return doHoistPHIConstants(F); }
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
diff --git a/lib/Transforms/IPO/ConstantMerge.cpp b/lib/Transforms/IPO/ConstantMerge.cpp
index a635b8d21b..146911e818 100644
--- a/lib/Transforms/IPO/ConstantMerge.cpp
+++ b/lib/Transforms/IPO/ConstantMerge.cpp
@@ -65,6 +65,8 @@ namespace {
unsigned LastConstantSeen;
public:
inline ConstantMerge() : LastConstantSeen(0) {}
+
+ const char *getPassName() const {return "Merge Duplicate Global Constants";}
// doInitialization - For this pass, process all of the globals in the
// module, eliminating duplicate constants.
@@ -89,6 +91,8 @@ namespace {
};
struct DynamicConstantMerge : public ConstantMerge {
+ const char *getPassName() const { return "Dynamic Constant Merge"; }
+
// runOnFunction - Check to see if any globals have been added to the
// global list for the module. If so, eliminate them.
//
diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp
index 3ba6057fad..dc330b29f8 100644
--- a/lib/Transforms/IPO/DeadTypeElimination.cpp
+++ b/lib/Transforms/IPO/DeadTypeElimination.cpp
@@ -36,6 +36,8 @@ static const Type *PtrSByte = 0; // 'sbyte*' type
namespace {
struct CleanupGCCOutput : public FunctionPass {
+ const char *getPassName() const { return "Cleanup GCC Output"; }
+
// doPassInitialization - For this pass, it removes global symbol table
// entries for primitive types. These are never used for linking in GCC and
// they make the output uglier to look at, so we nuke them.
@@ -337,6 +339,8 @@ bool CleanupGCCOutput::doFinalization(Module *M) {
namespace {
struct FunctionResolvingPass : public Pass {
+ const char *getPassName() const { return "Resolve Functions"; }
+
bool run(Module *M);
};
}
diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp
index cd9c35f058..e852a6a29f 100644
--- a/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/lib/Transforms/IPO/GlobalDCE.cpp
@@ -49,6 +49,8 @@ static bool RemoveUnreachableFunctions(Module *M, CallGraph &CallGraph) {
namespace {
struct GlobalDCE : public Pass {
+ const char *getPassName() const { return "Dead Global Elimination"; }
+
// run - Do the GlobalDCE pass on the specified module, optionally updating
// the specified callgraph to reflect the changes.
//
diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp
index 1581323bea..ba64a6abce 100644
--- a/lib/Transforms/IPO/InlineSimple.cpp
+++ b/lib/Transforms/IPO/InlineSimple.cpp
@@ -271,6 +271,7 @@ static bool doFunctionInlining(Function *F) {
namespace {
struct FunctionInlining : public FunctionPass {
+ const char *getPassName() const { return "Function Inlining"; }
virtual bool runOnFunction(Function *F) {
return doFunctionInlining(F);
}
diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp
index 8bb1a9c111..c84be9b93a 100644
--- a/lib/Transforms/IPO/Internalize.cpp
+++ b/lib/Transforms/IPO/Internalize.cpp
@@ -12,6 +12,8 @@
#include "llvm/Function.h"
class InternalizePass : public Pass {
+ const char *getPassName() const { return "Internalize Functions"; }
+
virtual bool run(Module *M) {
bool FoundMain = false; // Look for a function named main...
for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
diff --git a/lib/Transforms/IPO/OldPoolAllocate.cpp b/lib/Transforms/IPO/OldPoolAllocate.cpp
index 6ccd043a85..bb99002052 100644
--- a/lib/Transforms/IPO/OldPoolAllocate.cpp
+++ b/lib/Transforms/IPO/OldPoolAllocate.cpp
@@ -199,6 +199,8 @@ namespace {
// Define the pass class that we implement...
struct PoolAllocate : public Pass {
+ const char *getPassName() const { return "Pool Allocate"; }
+
PoolAllocate() {
switch (ReqPointerSize) {
case Ptr32bits: POINTERTYPE = Type::UIntTy; break;
diff --git a/lib/Transforms/IPO/SimpleStructMutation.cpp b/lib/Transforms/IPO/SimpleStructMutation.cpp
index 33e0289504..c0d9ef46bc 100644
--- a/lib/Transforms/IPO/SimpleStructMutation.cpp
+++ b/