[WebAssembly] Support opaque pointers in FixFunctionBitcasts
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 28 Aug 2021 21:38:12 +0000 (23:38 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 1 Sep 2021 20:17:24 +0000 (22:17 +0200)
commit7f058ce8c2cb433bec71445c770fb3f7a401b3e4
tree81e835f679b7d6f06fadb64888a71802bd0128e0
parent0d7e5daedcc6faf3247f7b3a7ed84f601efedf0e
[WebAssembly] Support opaque pointers in FixFunctionBitcasts

With opaque pointers, no actual bitcasts will be present. Instead,
there will be a mismatch between the call FunctionType and the
function ValueType. Change the code to collect CallBases
specifically (rather than general Uses) and compare these types.

RAUW is no longer performed, as there would no longer be any
bitcasts that can be RAUWd.

Differential Revision: https://reviews.llvm.org/D108880
llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
llvm/test/CodeGen/WebAssembly/function-bitcasts.ll
llvm/test/CodeGen/WebAssembly/main-declaration.ll