Add IR constructs for preallocated (inalloca replacement)
authorArthur Eubanks <aeubanks@google.com>
Fri, 14 Feb 2020 22:16:53 +0000 (14:16 -0800)
committerArthur Eubanks <aeubanks@google.com>
Mon, 27 Apr 2020 23:15:50 +0000 (16:15 -0700)
commit3b0450acecb6b753a0c60f2882a8615a4a9b4668
tree323267a80ecfd22a71886ec9ede6cbe53c01a08f
parent9ea5cc8a254ff29edcfa396f238bda80df0d1c9b
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
23 files changed:
llvm/docs/LangRef.rst
llvm/include/llvm/Bitcode/LLVMBitCodes.h
llvm/include/llvm/IR/Attributes.h
llvm/include/llvm/IR/Attributes.td
llvm/include/llvm/IR/Intrinsics.td
llvm/include/llvm/IR/LLVMContext.h
llvm/lib/AsmParser/LLLexer.cpp
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/AsmParser/LLParser.h
llvm/lib/AsmParser/LLToken.h
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/AttributeImpl.h
llvm/lib/IR/Attributes.cpp
llvm/lib/IR/LLVMContext.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/Transforms/Utils/CodeExtractor.cpp
llvm/test/Assembler/invalid-byval-type3.ll
llvm/test/Bitcode/attributes.ll
llvm/test/Bitcode/operand-bundles-bc-analyzer.ll
llvm/test/Verifier/preallocated-invalid.ll [new file with mode: 0644]
llvm/test/Verifier/preallocated-valid.ll [new file with mode: 0644]