aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Utils/PromoteMemoryToRegister.cpp')
-rw-r--r--lib/Transforms/Utils/PromoteMemoryToRegister.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
index f67e6d671f..1afb11a986 100644
--- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
+++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
@@ -26,6 +26,9 @@
#include "llvm/BasicBlock.h"
#include "llvm/Constant.h"
#include "llvm/Type.h"
+#include "Support/StatisticReporter.h"
+
+static Statistic<> NumPromoted("mem2reg\t\t- Number of alloca's promoted");
using std::vector;
using std::map;
@@ -187,6 +190,8 @@ bool PromotePass::runOnFunction(Function *F) {
delete I;
}
+ NumPromoted += Allocas.size();
+
// Purge data structurse so they are available the next iteration...
Allocas.clear();
AllocaLookup.clear();