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

This commit is contained in:
Roman Lebedev 2021-04-10 21:23:20 +03:00
parent fe7b3ad8d5
commit a407738def
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
1 changed files with 2 additions and 0 deletions

View File

@ -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,