aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2020-02-14 14:16:53 -0800
committerArthur Eubanks <aeubanks@google.com>2020-04-27 16:15:50 -0700
commit3b0450acecb6b753a0c60f2882a8615a4a9b4668 (patch)
tree323267a80ecfd22a71886ec9ede6cbe53c01a08f /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent9ea5cc8a254ff29edcfa396f238bda80df0d1c9b (diff)
downloadllvm-3b0450acecb6b753a0c60f2882a8615a4a9b4668.zip
llvm-3b0450acecb6b753a0c60f2882a8615a4a9b4668.tar.gz
llvm-3b0450acecb6b753a0c60f2882a8615a4a9b4668.tar.bz2
Add IR constructs for preallocated (inalloca replacement)
Add llvm.call.preallocated.{setup,arg} instrinsics. Add "preallocated" operand bundle which takes a token produced by llvm.call.preallocated.setup. Add "preallocated" parameter attribute, which is like byval but without the copy. Verifier changes for these IR constructs. See https://github.com/rnk/llvm-project/blob/call-setup-docs/llvm/docs/CallSetup.md Subscribers: hiraditya, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74651
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index f1bd4a3..be8307b 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -725,6 +725,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
return bitc::ATTR_KIND_IMMARG;
case Attribute::SanitizeMemTag:
return bitc::ATTR_KIND_SANITIZE_MEMTAG;
+ case Attribute::Preallocated:
+ return bitc::ATTR_KIND_PREALLOCATED;
case Attribute::EndAttrKinds:
llvm_unreachable("Can not encode end-attribute kinds marker.");
case Attribute::None: