aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/MemCpyOptimizer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-08 03:59:00 +0000
committerChris Lattner <sabre@nondot.org>2009-03-08 03:59:00 +0000
commit3947da719fd60f159f63db0181583746d88dface (patch)
tree928afe076fa0f89952fb0cd28f8236ad21beb5be /lib/Transforms/Scalar/MemCpyOptimizer.cpp
parent0ba746f9630d53f7b06bb6fd12225352ef91b24d (diff)
downloadexternal_llvm-3947da719fd60f159f63db0181583746d88dface.zip
external_llvm-3947da719fd60f159f63db0181583746d88dface.tar.gz
external_llvm-3947da719fd60f159f63db0181583746d88dface.tar.bz2
change the MemIntrinsic get/setAlignment method to take an unsigned
instead of a Constant*, which is what the clients of it really want. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/MemCpyOptimizer.cpp')
-rw-r--r--lib/Transforms/Scalar/MemCpyOptimizer.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/lib/Transforms/Scalar/MemCpyOptimizer.cpp
index be9db96..fc9f5f2 100644
--- a/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+++ b/lib/Transforms/Scalar/MemCpyOptimizer.cpp
@@ -678,13 +678,11 @@ bool MemCpyOpt::processMemCpy(MemCpyInst* M) {
M->getParent()->getParent()->getParent(),
M->getIntrinsicID(), Tys, 1);
- std::vector<Value*> args;
- args.push_back(M->getRawDest());
- args.push_back(MDep->getRawSource());
- args.push_back(M->getLength());
- args.push_back(M->getAlignment());
+ Value *Args[4] = {
+ M->getRawDest(), MDep->getRawSource(), M->getLength(), M->getAlignmentCst()
+ };
- CallInst* C = CallInst::Create(MemCpyFun, args.begin(), args.end(), "", M);
+ CallInst* C = CallInst::Create(MemCpyFun, Args, Args+4, "", M);
// If C and M don't interfere, then this is a valid transformation. If they