summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/GuardWidening.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/GuardWidening.cpp b/llvm/lib/Transforms/Scalar/GuardWidening.cpp
index b939ef359ad..055fcbc8436 100644
--- a/llvm/lib/Transforms/Scalar/GuardWidening.cpp
+++ b/llvm/lib/Transforms/Scalar/GuardWidening.cpp
@@ -43,6 +43,7 @@
#include <functional>
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DepthFirstIterator.h"
+#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/PostDominators.h"
@@ -61,6 +62,8 @@ using namespace llvm;
#define DEBUG_TYPE "guard-widening"
+STATISTIC(GuardsEliminated, "Number of eliminated guards");
+
namespace {
class GuardWideningImpl {
@@ -362,6 +365,7 @@ bool GuardWideningImpl::isGuard(const Instruction* I) {
void GuardWideningImpl::eliminateGuard(Instruction *GuardInst) {
GuardInst->eraseFromParent();
+ ++GuardsEliminated;
}
GuardWideningImpl::WideningScore GuardWideningImpl::computeWideningScore(
OpenPOWER on IntegriCloud