Skip to content

Commit 0759e08

Browse files
committed
rename again
1 parent a32941a commit 0759e08

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,13 +1404,13 @@ static bool hasUndefContents(MemorySSA *MSSA, BatchAAResults &AA, Value *V,
14041404
return false;
14051405
}
14061406

1407-
static bool inputFullyCoveredBySrc(MemorySSA *MSSA, MemCpyInst *MemCpy,
1408-
MemIntrinsic *MemSrc, BatchAAResults &BAA) {
1409-
// If the memcpy is larger than the previous, but the memory was undef prior
1410-
// to that, we can just ignore the tail. Technically we're only
1411-
// interested in the bytes from 0..MemSrcOffset and
1412-
// MemSrcLength+MemSrcOffset..CopySize here, but as we can't easily represent
1413-
// this location, we use the full 0..CopySize range.
1407+
// If the memcpy is larger than the previous, but the memory was undef prior to
1408+
// that, we can just ignore the tail. Technically we're only interested in the
1409+
// bytes from 0..MemSrcOffset and MemSrcLength+MemSrcOffset..CopySize here, but
1410+
// as we can't easily represent this location (hasUndefContents uses mustAlias
1411+
// which cannot deal with offsets), we use the full 0..CopySize range.
1412+
static bool overreadUndefContents(MemorySSA *MSSA, MemCpyInst *MemCpy,
1413+
MemIntrinsic *MemSrc, BatchAAResults &BAA) {
14141414
Value *CopySize = MemCpy->getLength();
14151415
MemoryLocation MemCpyLoc = MemoryLocation::getForSource(MemCpy);
14161416
MemoryUseOrDef *MemSrcAccess = MSSA->getMemoryAccess(MemSrc);
@@ -1465,7 +1465,7 @@ bool MemCpyOptPass::performMemCpyToMemSetOptzn(MemCpyInst *MemCpy,
14651465
if (!CCopySize)
14661466
return false;
14671467
if (CCopySize->getZExtValue() + MOffset > CMemSetSize->getZExtValue()) {
1468-
if (!inputFullyCoveredBySrc(MSSA, MemCpy, MemSet, BAA))
1468+
if (!overreadUndefContents(MSSA, MemCpy, MemSet, BAA))
14691469
return false;
14701470
// Clip the memcpy to the bounds of the memset
14711471
if (MOffset == 0)

0 commit comments

Comments
 (0)