diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-07-06 23:32:10 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-07-06 23:32:10 +0000 |
commit | 8ee6a30b8dd962d08e5fac087aff6ab15a8dc4da (patch) | |
tree | e97078048815b482be781f357663b3c5a97bff89 /llvm/lib/CodeGen/ImplicitNullChecks.cpp | |
parent | b2f62a32e42202c3e700ab210339ad265f58c841 (diff) | |
download | bcm5719-llvm-8ee6a30b8dd962d08e5fac087aff6ab15a8dc4da.tar.gz bcm5719-llvm-8ee6a30b8dd962d08e5fac087aff6ab15a8dc4da.zip |
[FaultMaps] Add statistic to count the # of implicit null checks.
llvm-svn: 241521
Diffstat (limited to 'llvm/lib/CodeGen/ImplicitNullChecks.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ImplicitNullChecks.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ImplicitNullChecks.cpp b/llvm/lib/CodeGen/ImplicitNullChecks.cpp index a02cd67ac64..15bd7571a82 100644 --- a/llvm/lib/CodeGen/ImplicitNullChecks.cpp +++ b/llvm/lib/CodeGen/ImplicitNullChecks.cpp @@ -26,6 +26,7 @@ //===----------------------------------------------------------------------===// #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/Statistic.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineOperand.h" @@ -47,6 +48,11 @@ static cl::opt<unsigned> PageSize("imp-null-check-page-size", "bytes"), cl::init(4096)); +#define DEBUG_TYPE "implicit-null-checks" + +STATISTIC(NumImplicitNullChecks, + "Number of explicit null checks made implicit"); + namespace { class ImplicitNullChecks : public MachineFunctionPass { @@ -257,6 +263,8 @@ void ImplicitNullChecks::rewriteNullChecks( // Emit the HandlerLabel as an EH_LABEL. BuildMI(*NC.NullSucc, NC.NullSucc->begin(), DL, TII->get(TargetOpcode::EH_LABEL)).addSym(HandlerLabel); + + NumImplicitNullChecks++; } } |