[llvm] a407738 - [NFC][CVP] Add statistic for function pointer argument non-null-ness deduction

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 10 11:25:15 PDT 2021


Author: Roman Lebedev
Date: 2021-04-10T21:23:20+03:00
New Revision: a407738def187baedf9413d94fc4560efc9d6b43

URL: https://github.com/llvm/llvm-project/commit/a407738def187baedf9413d94fc4560efc9d6b43
DIFF: https://github.com/llvm/llvm-project/commit/a407738def187baedf9413d94fc4560efc9d6b43.diff

LOG: [NFC][CVP] Add statistic for function pointer argument non-null-ness deduction

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp b/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
index f561dc88e9ba..f7137d281810 100644
--- a/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
+++ b/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
@@ -86,6 +86,7 @@ STATISTIC(NumAbs,       "Number of llvm.abs intrinsics removed");
 STATISTIC(NumOverflows, "Number of overflow checks removed");
 STATISTIC(NumSaturating,
     "Number of saturating arithmetics converted to normal arithmetics");
+STATISTIC(NumNonNull, "Number of function pointer arguments marked non-null");
 
 namespace {
 
@@ -608,6 +609,7 @@ static bool processCallSite(CallBase &CB, LazyValueInfo *LVI) {
   if (ArgNos.empty())
     return Changed;
 
+  NumNonNull += ArgNos.size();
   AttributeList AS = CB.getAttributes();
   LLVMContext &Ctx = CB.getContext();
   AS = AS.addParamAttribute(Ctx, ArgNos,


        


More information about the llvm-commits mailing list