[llvm] 80cde02 - [MemCpyOpt] Add separate statistic for call slot optimization (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 6 09:38:00 PDT 2020
Author: Nikita Popov
Date: 2020-10-06T18:14:10+02:00
New Revision: 80cde02e85df3f1903f0a04ccccaf0f84c2854d1
URL: https://github.com/llvm/llvm-project/commit/80cde02e85df3f1903f0a04ccccaf0f84c2854d1
DIFF: https://github.com/llvm/llvm-project/commit/80cde02e85df3f1903f0a04ccccaf0f84c2854d1.diff
LOG: [MemCpyOpt] Add separate statistic for call slot optimization (NFC)
Added:
Modified:
llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
index f14f3d4515dee..68fcf91b3464d 100644
--- a/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+++ b/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
@@ -70,6 +70,7 @@ STATISTIC(NumMemCpyInstr, "Number of memcpy instructions deleted");
STATISTIC(NumMemSetInfer, "Number of memsets inferred");
STATISTIC(NumMoveToCpy, "Number of memmoves converted to memcpy");
STATISTIC(NumCpyToSet, "Number of memcpys converted to memset");
+STATISTIC(NumCallSlot, "Number of call slot optimizations performed");
namespace {
@@ -942,6 +943,7 @@ bool MemCpyOptPass::performCallSlotOptzn(Instruction *cpy, Value *cpyDest,
LLVMContext::MD_access_group};
combineMetadata(C, cpy, KnownIDs, true);
+ ++NumCallSlot;
return true;
}
More information about the llvm-commits
mailing list