aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SlotIndexes.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-04 18:08:29 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-04 18:08:29 +0000
commitb88f6adf0fc201b9baf07fa51823fb8fe7d89a88 (patch)
tree708ee13984dea197755bf6eadaf0be5b89ff5617 /llvm/lib/CodeGen/SlotIndexes.cpp
parentd4f788952d1a056f755ad2df52f6f73eb6d67cff (diff)
downloadllvm-b88f6adf0fc201b9baf07fa51823fb8fe7d89a88.zip
llvm-b88f6adf0fc201b9baf07fa51823fb8fe7d89a88.tar.gz
llvm-b88f6adf0fc201b9baf07fa51823fb8fe7d89a88.tar.bz2
Add SlotIndex statistics.
llvm-svn: 127007
Diffstat (limited to 'llvm/lib/CodeGen/SlotIndexes.cpp')
-rw-r--r--llvm/lib/CodeGen/SlotIndexes.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SlotIndexes.cpp b/llvm/lib/CodeGen/SlotIndexes.cpp
index 73adb92..a495d1f 100644
--- a/llvm/lib/CodeGen/SlotIndexes.cpp
+++ b/llvm/lib/CodeGen/SlotIndexes.cpp
@@ -10,6 +10,7 @@
#define DEBUG_TYPE "slotindexes"
#include "llvm/CodeGen/SlotIndexes.h"
+#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
@@ -21,6 +22,8 @@ char SlotIndexes::ID = 0;
INITIALIZE_PASS(SlotIndexes, "slotindexes",
"Slot index numbering", false, false)
+STATISTIC(NumRenumPasses, "Number of slot index renumber passes");
+
void SlotIndexes::getAnalysisUsage(AnalysisUsage &au) const {
au.setPreservesAll();
MachineFunctionPass::getAnalysisUsage(au);
@@ -128,6 +131,7 @@ void SlotIndexes::renumberIndexes() {
// pass during the initial numbering of the function if the new instructions
// had been present.
DEBUG(dbgs() << "\n*** Renumbering SlotIndexes ***\n");
+ ++NumRenumPasses;
unsigned index = 0;