From 37104aace8a7f5ed8e11e905aeaf579b526e3b8e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 29 Apr 2002 14:57:45 +0000 Subject: Add new optional getPassName() virtual function that a Pass can override to make debugging output a lot nicer. llvm-svn: 2395 --- llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp | 2 ++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp index 4c2a28c7882..b0422797475 100644 --- a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp +++ b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp @@ -1484,6 +1484,8 @@ namespace { const TargetMachine ⌖ 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/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp index 4ad98d917fd..b783255699f 100644 --- a/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp +++ b/llvm/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) -- cgit v1.2.3