OSDN Git Service

IR: add optional type to 'byval' function parameters
authorTim Northover <tnorthover@apple.com>
Wed, 29 May 2019 19:12:48 +0000 (19:12 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 29 May 2019 19:12:48 +0000 (19:12 +0000)
commitaef2b1ac1ab95ae56baf5448b411371efdba93a3
tree13a4ad75eb385afc929a54274715e906b7f8d536
parent0c5b5c7d5f3f68a3258ff0aa804d36cb52183ac8
IR: add optional type to 'byval' function parameters

When we switch to opaque pointer types we will need some way to describe
how many bytes a 'byval' parameter should occupy on the stack. This adds
a (for now) optional extra type parameter.

If present, the type must match the pointee type of the argument.

Note to front-end maintainers: if this causes test failures, it's probably
because the "byval" attribute is printed after attributes without any parameter
after this change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362012 91177308-0d34-0410-b5e6-96231b3b80d8
40 files changed:
docs/LangRef.rst
include/llvm/CodeGen/TargetLowering.h
include/llvm/IR/Argument.h
include/llvm/IR/Attributes.h
include/llvm/IR/CallSite.h
include/llvm/IR/Function.h
include/llvm/IR/InstrTypes.h
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLParser.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/Bitcode/Writer/ValueEnumerator.cpp
lib/CodeGen/GlobalISel/CallLowering.cpp
lib/CodeGen/SelectionDAG/FastISel.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/IR/AttributeImpl.h
lib/IR/Attributes.cpp
lib/IR/Function.cpp
lib/IR/Verifier.cpp
test/Assembler/byval-type-attr.ll [new file with mode: 0644]
test/Assembler/invalid-byval-type1.ll [new file with mode: 0644]
test/Assembler/invalid-byval-type2.ll [new file with mode: 0644]
test/Assembler/invalid-byval-type3.ll [new file with mode: 0644]
test/Bitcode/Inputs/byval-upgrade.bc [new file with mode: 0644]
test/Bitcode/attributes-3.3.ll
test/Bitcode/attributes.ll
test/Bitcode/byval-upgrade.test [new file with mode: 0644]
test/Bitcode/compatibility-3.6.ll
test/Bitcode/compatibility-3.7.ll
test/Bitcode/compatibility-3.8.ll
test/Bitcode/compatibility-3.9.ll
test/Bitcode/compatibility-4.0.ll
test/Bitcode/compatibility-5.0.ll
test/Bitcode/compatibility-6.0.ll
test/Bitcode/compatibility.ll
test/Bitcode/highLevelStructure.3.2.ll
test/CodeGen/AArch64/byval-type.ll [new file with mode: 0644]
test/Transforms/Inline/byval-tail-call.ll
unittests/IR/AttributesTest.cpp