]> granicus.if.org Git - llvm/commit
[WebAssembly] Handle more types of uses in WebAssemblyAddMissingPrototypes
authorSam Clegg <sbc@chromium.org>
Tue, 29 Jan 2019 00:30:46 +0000 (00:30 +0000)
committerSam Clegg <sbc@chromium.org>
Tue, 29 Jan 2019 00:30:46 +0000 (00:30 +0000)
commit3b68b45b637e85e7db2aae4d5ed50bb75ff0155f
tree75b2d43e4979497e29ca4c50733d6d4362edd73e
parent732eb589851b840289d63e29f1b65618ab153cd9
[WebAssembly] Handle more types of uses in WebAssemblyAddMissingPrototypes

Previously we were only handling bitcast operations, however
prototypeless functions can also appear in other places such as
comparisons and as function params.

Switch to using replaceAllUsesWith() to replace the prototype-less
function uses.  This new approach results in some redundant bitcasting
but is much simpler and handles all cases.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352445 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp
test/CodeGen/WebAssembly/add-prototypes.ll