diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2019-12-13 17:54:50 +0100 |
---|---|---|
committer | Guillaume Chatelet <gchatelet@google.com> | 2019-12-16 13:35:55 +0100 |
commit | 181ab91efc9fb08dedda10a2fbc5fccb83ce8799 (patch) | |
tree | d08c95420eebd4e8b5986e63caf9f3b7db0732ca /llvm/lib/CodeGen/SafeStack.cpp | |
parent | c41d2b5ab2829d05268e9bbcf2f54756de445e57 (diff) | |
download | bcm5719-llvm-181ab91efc9fb08dedda10a2fbc5fccb83ce8799.tar.gz bcm5719-llvm-181ab91efc9fb08dedda10a2fbc5fccb83ce8799.zip |
[Alignment][NFC] Deprecate CreateMemCpy/CreateMemMove
Summary:
This patch introduces a set of functions to enable deprecation of IRBuilder functions without breaking out of tree clients.
Functions will be deprecated one by one and as in tree code is cleaned up.
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: arsenm, jvesely, nhaehnle, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71473
Diffstat (limited to 'llvm/lib/CodeGen/SafeStack.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SafeStack.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SafeStack.cpp b/llvm/lib/CodeGen/SafeStack.cpp index 80c66ccd781..8aa488e6391 100644 --- a/llvm/lib/CodeGen/SafeStack.cpp +++ b/llvm/lib/CodeGen/SafeStack.cpp @@ -563,7 +563,7 @@ Value *SafeStack::moveStaticAllocasToUnsafeStack( for (Argument *Arg : ByValArguments) { unsigned Offset = SSL.getObjectOffset(Arg); - unsigned Align = SSL.getObjectAlignment(Arg); + MaybeAlign Align(SSL.getObjectAlignment(Arg)); Type *Ty = Arg->getType()->getPointerElementType(); uint64_t Size = DL.getTypeStoreSize(Ty); @@ -580,7 +580,7 @@ Value *SafeStack::moveStaticAllocasToUnsafeStack( DIExpression::ApplyOffset, -Offset); Arg->replaceAllUsesWith(NewArg); IRB.SetInsertPoint(cast<Instruction>(NewArg)->getNextNode()); - IRB.CreateMemCpy(Off, Align, Arg, Arg->getParamAlignment(), Size); + IRB.CreateMemCpy(Off, Align, Arg, Arg->getParamAlign(), Size); } // Allocate space for every unsafe static AllocaInst on the unsafe stack. |