diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -22,6 +22,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/Statistic.h" #include "llvm/ADT/Triple.h" #include "llvm/ADT/Twine.h" #include "llvm/Analysis/MemoryLocation.h" @@ -95,6 +96,10 @@ #define DEBUG_TYPE "selectiondag" +STATISTIC(MemcpyInline, "Number of memcpy() calls emitted inline"); +STATISTIC(MemmoveInline, "Number of memmove() calls emitted inline"); +STATISTIC(MemsetInline, "Number of memset() calls emitted inline"); + static cl::opt EnableMemCpyDAGOpt("enable-memcpy-dag-opt", cl::Hidden, cl::init(true), cl::desc("Gang up loads and stores generated by inlining of memcpy")); @@ -6820,6 +6825,8 @@ } } } + + MemcpyInline++; return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, OutChains); } @@ -6917,6 +6924,7 @@ DstOff += VTSize; } + MemmoveInline++; return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, OutChains); } @@ -7025,6 +7033,7 @@ Size -= VTSize; } + MemsetInline++; return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, OutChains); }