Go to the source code of this file.
Functions
STATISTIC (NumMemCpyInstr, "Number of memcpy instructions deleted")
STATISTIC (NumMemMoveInstr, "Number of memmove 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")
STATISTIC (NumStackMove, "Number of stack-move optimizations performed")
static bool
overreadUndefContents (MemorySSA *MSSA, MemCpyInst *MemCpy, MemIntrinsic *MemSrc, BatchAAResults &BAA)
static bool
mayBeVisibleThroughUnwinding (Value *V, Instruction *Start, Instruction *End)
static bool
accessedBetween (BatchAAResults &AA, MemoryLocation Loc, const MemoryUseOrDef *Start, const MemoryUseOrDef *End, Instruction **SkippedLifetimeStart=nullptr)
static bool
writtenBetween (MemorySSA *MSSA, BatchAAResults &AA, MemoryLocation Loc, const MemoryUseOrDef *Start, const MemoryUseOrDef *End)
static bool
hasUndefContents (MemorySSA *MSSA, BatchAAResults &AA, Value *V, MemoryDef *Def)
Determine whether the pointer V had only undefined content (due to Def), either because it was freshly alloca'd or started its lifetime.
static bool
isZeroSize (Value *Size )
◆ DEBUG_TYPE#define DEBUG_TYPE "memcpyopt"
◆ accessedBetween()◆ hasUndefContents()◆ isZeroSize()◆ mayBeVisibleThroughUnwinding()◆ overreadUndefContents()◆ STATISTIC() [1/7]
STATISTIC
(
NumCallSlot
,
"Number of call slot optimizations performed"
)
◆ STATISTIC() [2/7]
STATISTIC
(
NumCpyToSet
,
"Number of memcpys converted to memset"
)
◆ STATISTIC() [3/7]
STATISTIC
(
NumMemCpyInstr
,
"Number of memcpy instructions deleted"
)
◆ STATISTIC() [4/7]
STATISTIC
(
NumMemMoveInstr
,
"Number of memmove instructions deleted"
)
◆ STATISTIC() [5/7]
STATISTIC
(
NumMemSetInfer
,
"Number of memsets inferred"
)
◆ STATISTIC() [6/7]
STATISTIC
(
NumMoveToCpy
,
"Number of memmoves converted to memcpy"
)
◆ STATISTIC() [7/7]
STATISTIC
(
NumStackMove
,
"Number of stack-move optimizations performed"
)
References DL .
◆ writtenBetween()◆ EnableMemCpyOptWithoutLibcalls
cl::opt < bool > EnableMemCpyOptWithoutLibcalls("enable-memcpyopt-without-libcalls", cl::Hidden, cl::desc ("Enable memcpyopt even when libcalls are disabled")) ( "enable-memcpyopt-without-libcalls" , cl::Hidden , cl::desc ("Enable memcpyopt even when libcalls are disabled") )
static