diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-11 00:19:56 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-11 00:19:56 +0000 |
| commit | 533f58ecdd8a4732c2f0e149387c4d8d8d4142de (patch) | |
| tree | 762040ca5b96a295041b2dc2e4d78278bd46de1d /lib/CodeGen/RegAllocBasic.cpp | |
| parent | 4680dec5fb3a1b624f13ca9b2a555ca90a07973e (diff) | |
Add named timer groups for the different stages of register allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocBasic.cpp')
| -rw-r--r-- | lib/CodeGen/RegAllocBasic.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocBasic.cpp b/lib/CodeGen/RegAllocBasic.cpp index 3c8454398f..eb1b9075b3 100644 --- a/lib/CodeGen/RegAllocBasic.cpp +++ b/lib/CodeGen/RegAllocBasic.cpp @@ -42,6 +42,7 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Support/Timer.h" #include <cstdlib> @@ -56,6 +57,8 @@ static cl::opt<bool> VerifyRegAlloc("verify-regalloc", cl::desc("Verify live intervals before renaming")); +const char *RegAllocBase::TimerGroupName = "Register Allocation"; + namespace { class PhysicalRegisterDescription : public AbstractRegisterDescription { @@ -204,6 +207,7 @@ void RegAllocBase::LiveUnionArray::init(LiveIntervalUnion::Allocator &allocator, } void RegAllocBase::init(VirtRegMap &vrm, LiveIntervals &lis) { + NamedRegionTimer T("Initialize", TimerGroupName, TimePassesIsEnabled); TRI = &vrm.getTargetRegInfo(); MRI = &vrm.getRegInfo(); VRM = &vrm; @@ -364,6 +368,7 @@ RegAllocBase::spillInterferences(LiveInterval &VirtReg, unsigned PhysReg, // Add newly allocated physical registers to the MBB live in sets. void RegAllocBase::addMBBLiveIns(MachineFunction *MF) { + NamedRegionTimer T("MBB Live Ins", TimerGroupName, TimePassesIsEnabled); typedef SmallVector<MachineBasicBlock*, 8> MBBVec; MBBVec liveInMBBs; MachineBasicBlock &entryMBB = *MF->begin(); |
