summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/ConstantMerge.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/IPO/ConstantMerge.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/ConstantMerge.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/ConstantMerge.cpp b/llvm/lib/Transforms/IPO/ConstantMerge.cpp
index 146911e818d..11191f535ab 100644
--- a/llvm/lib/Transforms/IPO/ConstantMerge.cpp
+++ b/llvm/lib/Transforms/IPO/ConstantMerge.cpp
@@ -19,6 +19,9 @@
#include "llvm/Module.h"
#include "llvm/Function.h"
#include "llvm/Pass.h"
+#include "Support/StatisticReporter.h"
+
+static Statistic<> NumMerged("constmerge\t\t- Number of global constants merged");
// mergeDuplicateConstants - Workhorse for the pass. This eliminates duplicate
// constants, starting at global ConstantNo, and adds vars to the map if they
@@ -50,6 +53,7 @@ bool mergeDuplicateConstants(Module *M, unsigned &ConstantNo,
delete GList.remove(GList.begin()+ConstantNo);
--ConstantNo; // Don't skip the next constant.
+ ++NumMerged;
MadeChanges = true;
}
}
OpenPOWER on IntegriCloud