summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/MemCpyOptimizer.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-28 22:50:26 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-28 22:50:26 +0000
commit7d3056b16038a6a09c452c0dfcc3c8f4e421506a (patch)
treeecfdaa7cb750280156bb14f128e9cd08aad7c17b /lib/Transforms/Scalar/MemCpyOptimizer.cpp
parent826c148aa5af36cca688b7da447bc0b22905d904 (diff)
downloadllvm-7d3056b16038a6a09c452c0dfcc3c8f4e421506a.tar.gz
llvm-7d3056b16038a6a09c452c0dfcc3c8f4e421506a.tar.bz2
llvm-7d3056b16038a6a09c452c0dfcc3c8f4e421506a.tar.xz
simplify by using CallSite constructors; virtually eliminates CallSite::get from the tree
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109687 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/MemCpyOptimizer.cpp')
-rw-r--r--lib/Transforms/Scalar/MemCpyOptimizer.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/lib/Transforms/Scalar/MemCpyOptimizer.cpp
index 8087cbeb79..7c0563b175 100644
--- a/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+++ b/lib/Transforms/Scalar/MemCpyOptimizer.cpp
@@ -508,7 +508,7 @@ bool MemCpyOpt::performCallSlotOptzn(MemCpyInst *cpy, CallInst *C) {
// because we'll need to do type comparisons based on the underlying type.
Value *cpyDest = cpy->getDest();
Value *cpySrc = cpy->getSource();
- CallSite CS = CallSite::get(C);
+ CallSite CS(C);
// We need to be able to reason about the size of the memcpy, so we require
// that it be a constant.
@@ -636,10 +636,11 @@ bool MemCpyOpt::performCallSlotOptzn(MemCpyInst *cpy, CallInst *C) {
return true;
}
-/// processMemCpy - perform simplication of memcpy's. If we have memcpy A which
-/// copies X to Y, and memcpy B which copies Y to Z, then we can rewrite B to be
-/// a memcpy from X to Z (or potentially a memmove, depending on circumstances).
-/// This allows later passes to remove the first memcpy altogether.
+/// processMemCpy - perform simplification of memcpy's. If we have memcpy A
+/// which copies X to Y, and memcpy B which copies Y to Z, then we can rewrite
+/// B to be a memcpy from X to Z (or potentially a memmove, depending on
+/// circumstances). This allows later passes to remove the first memcpy
+/// altogether.
bool MemCpyOpt::processMemCpy(MemCpyInst *M) {
MemoryDependenceAnalysis &MD = getAnalysis<MemoryDependenceAnalysis>();