[PATCH] D81962: [lld][WebAssembly] Allow ctors functions that return values

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 17 18:22:48 PDT 2020


sbc100 added a comment.

In D81962#2097082 <https://reviews.llvm.org/D81962#2097082>, @sunfish wrote:

> This change looks fine to me, though if you wanted to minimize the amount of code being emitted by the linker, another option would be to look into whether LLVM's FixFunctionBitcasts could handle this -- there should be a bitcast in the llvm.global_ctors array.


Interesting.. currently FixFunctionBitcasts only considered casts that are arguments to call instructions.   Other kinds of casts such as ones that are used in stores we assume instead that that reverse cast will be applied when they are used.

Do you think its better to modify FixFunctionBitcasts to add this special case?  (assuming I can).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81962/new/

https://reviews.llvm.org/D81962





More information about the llvm-commits mailing list