]> granicus.if.org Git - llvm/commit
[WebAssembly] Allow multivalue types in block signature operands
authorThomas Lively <tlively@google.com>
Tue, 15 Oct 2019 18:28:22 +0000 (18:28 +0000)
committerThomas Lively <tlively@google.com>
Tue, 15 Oct 2019 18:28:22 +0000 (18:28 +0000)
commit569d5dbe57b3f2d1cd8cf1e8f2728b92ad811f86
tree024baf3de1027243071fd8068ba1b647bba839d6
parent06d4c0251f3a9189d812e046feec18ac4655739b
[WebAssembly] Allow multivalue types in block signature operands

Summary:
Renames `ExprType` to the more apt `BlockType` and adds a variant for
multivalue blocks. Currently non-void blocks are only generated at the
end of functions where the block return type needs to agree with the
function return type, and that remains true for multivalue
blocks. That invariant means that the actual signature does not need
to be stored in the block signature `MachineOperand` because it can be
inferred by `WebAssemblyMCInstLower` from the return type of the
parent function. `WebAssemblyMCInstLower` continues to lower block
signature operands to immediates when possible but lowers multivalue
signatures to function type symbols. The AsmParser and Disassembler
are updated to handle multivalue block types as well.

Reviewers: aheejin, dschuff, aardappel

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68889

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374933 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
lib/Target/WebAssembly/Disassembler/LLVMBuild.txt
lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
lib/Target/WebAssembly/WebAssemblyMCInstLower.h
test/CodeGen/WebAssembly/multivalue.ll
test/MC/Disassembler/WebAssembly/wasm-error.txt
test/MC/WebAssembly/basic-assembly.s
tools/llvm-mc/Disassembler.cpp
tools/llvm-mc/Disassembler.h
tools/llvm-mc/llvm-mc.cpp