diff options
author | Dan Gohman <dan433584@gmail.com> | 2018-05-22 04:58:36 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2018-05-22 04:58:36 +0000 |
commit | b81848272dc60d6ada098e6efe004140533ea277 (patch) | |
tree | ef19b0db70aea3f14c57bd34fdb8546b80c71c77 /llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h | |
parent | 19da66759944f2a3d2b7142e76a409c68d4c87fd (diff) | |
download | bcm5719-llvm-b81848272dc60d6ada098e6efe004140533ea277.tar.gz bcm5719-llvm-b81848272dc60d6ada098e6efe004140533ea277.zip |
[WebAssembly] Fix fast-isel lowering illegal argument and return types.
For both argument and return types, promote illegal types like i24 to i32,
and if a type can't be easily promoted, clear out the signature before
bailing out, so avoid leaving it in a partially complete state.
Fixes PR37546.
llvm-svn: 332947
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h index 3c268366016..4e5d71d7816 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h +++ b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h @@ -60,6 +60,8 @@ class WebAssemblyFunctionInfo final : public MachineFunctionInfo { void addResult(MVT VT) { Results.push_back(VT); } const std::vector<MVT> &getResults() const { return Results; } + void clearParamsAndResults() { Params.clear(); Results.clear(); } + void setNumLocals(size_t NumLocals) { Locals.resize(NumLocals, MVT::i32); } void setLocal(size_t i, MVT VT) { Locals[i] = VT; } void addLocal(MVT VT) { Locals.push_back(VT); } |