[PATCH] D112953: [WebAssembly] support "return" and unreachable code in asm type checker

Wouter van Oortmerssen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 1 13:11:36 PDT 2021


aardappel created this revision.
aardappel added a reviewer: dschuff.
Herald added subscribers: ormris, wingo, ecnelises, steven_wu, sunfish, hiraditya, jgravelle-google, sbc100.
aardappel requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

To support return (it not being supported well was the ground cause for
https://github.com/WebAssembly/wasi-sdk/issues/200) we also have to have
at least a basic notion of unreachable, which in this case just means to stop
type checking until there is an end_block (an incoming control flow edge).
This is conservative (may miss on some type checking opportunities) but is
simple and an improvement over what we had before.


https://reviews.llvm.org/D112953

Files:
  lld/test/wasm/lto/thinlto-thin-archive-collision.ll
  llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
  llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
  llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.h
  llvm/test/MC/WebAssembly/basic-assembly.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112953.383866.patch
Type: text/x-patch
Size: 7070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211101/0883e554/attachment.bin>


More information about the llvm-commits mailing list