diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-29 14:57:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-29 14:57:45 +0000 |
commit | 96c466b06ab0c830b07329c1b16037f585ccbe40 (patch) | |
tree | e07bbfb58ede2e61ef3243a083dbe5da3b47d712 /lib/Transforms/Scalar/DCE.cpp | |
parent | 691fa3cfb12f459b953dd400057841b10ccf4b72 (diff) | |
download | llvm-96c466b06ab0c830b07329c1b16037f585ccbe40.tar.gz llvm-96c466b06ab0c830b07329c1b16037f585ccbe40.tar.bz2 llvm-96c466b06ab0c830b07329c1b16037f585ccbe40.tar.xz |
Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2395 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/DCE.cpp')
-rw-r--r-- | lib/Transforms/Scalar/DCE.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index 1a3073c3c7..4aac04114e 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -64,6 +64,8 @@ static inline bool RemoveUnusedDefs(BasicBlock::InstListType &Vals) { } struct DeadInstElimination : public BasicBlockPass { + const char *getPassName() const { return "Dead Instruction Elimination"; } + virtual bool runOnBasicBlock(BasicBlock *BB) { return RemoveUnusedDefs(BB->getInstList()); } @@ -340,6 +342,7 @@ static bool RemoveUnusedGlobalValues(Module *Mod) { namespace { struct DeadCodeElimination : public FunctionPass { + const char *getPassName() const { return "Dead Code Elimination"; } // Pass Interface... virtual bool doInitialization(Module *M) { |