OSDN Git Service

[WebAssembly] Ensure bitcasts that would result in invalid wasm are removed by FixFun...
authorSam Clegg <sbc@chromium.org>
Thu, 2 Aug 2018 17:38:06 +0000 (17:38 +0000)
committerSam Clegg <sbc@chromium.org>
Thu, 2 Aug 2018 17:38:06 +0000 (17:38 +0000)
commit63fe07e426aac56486620bbdb296d7858f221b87
treed8882b68d705f2f3bb85387c6f4e8efffc8de120
parent2eed0509599b946f8191265f20c52835cea920f1
[WebAssembly] Ensure bitcasts that would result in invalid wasm are removed by FixFunctionBitcasts

Rather than allowing invalid bitcasts to be lowered to wasm
call instructions that won't validate, generate wrappers that
contain unreachable thereby delaying the error until runtime.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338744 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
test/CodeGen/WebAssembly/call.ll
test/CodeGen/WebAssembly/function-bitcasts-varargs.ll
test/CodeGen/WebAssembly/function-bitcasts.ll
test/CodeGen/WebAssembly/unsupported-function-bitcasts.ll