forked from OSchip/llvm-project
[NFC] Collect statistics in GuardWidening
llvm-svn: 338348
This commit is contained in:
parent
3bd20d4605
commit
eb8e9c0940
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue