summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocFast.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-05-14 21:55:50 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-05-14 21:55:50 +0000
commit8a65c510a4fa1245d101da6318618d025702028c (patch)
tree0c82ea43b2ed0576f51bc1692f4bc984331a9d9a /lib/CodeGen/RegAllocFast.cpp
parenta0e618de5d9b40e5b5189c299086487e5ad767f2 (diff)
downloadllvm-8a65c510a4fa1245d101da6318618d025702028c.tar.gz
llvm-8a65c510a4fa1245d101da6318618d025702028c.tar.bz2
llvm-8a65c510a4fa1245d101da6318618d025702028c.tar.xz
Count coalesced copies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocFast.cpp')
-rw-r--r--lib/CodeGen/RegAllocFast.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocFast.cpp b/lib/CodeGen/RegAllocFast.cpp
index c7f60ccea3..0e92996d94 100644
--- a/lib/CodeGen/RegAllocFast.cpp
+++ b/lib/CodeGen/RegAllocFast.cpp
@@ -40,6 +40,7 @@ static cl::opt<bool> VerifyFastRegalloc("verify-fast-regalloc", cl::Hidden,
STATISTIC(NumStores, "Number of stores added");
STATISTIC(NumLoads , "Number of loads added");
+STATISTIC(NumCopies, "Number of copies coalesced");
static RegisterRegAlloc
fastRegAlloc("fast", "fast register allocator", createFastRegisterAllocator);
@@ -771,6 +772,7 @@ void RAFast::AllocateBasicBlock(MachineBasicBlock &MBB) {
// LiveVirtsRegs might refer to the instrs.
for (unsigned i = 0, e = Coalesced.size(); i != e; ++i)
MBB.erase(Coalesced[i]);
+ NumCopies += Coalesced.size();
DEBUG(MBB.dump());
}