[all-commits] [llvm/llvm-project] ac6536: [WebAssembly] support "return" and unreachable cod...

Wouter van Oortmerssen via All-commits all-commits at lists.llvm.org
Mon Nov 1 15:43:36 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ac65366485d4584c9e7f39a59bc56d833627c1ea
      https://github.com/llvm/llvm-project/commit/ac65366485d4584c9e7f39a59bc56d833627c1ea
  Author: Wouter van Oortmerssen <aardappel at gmail.com>
  Date:   2021-11-01 (Mon, 01 Nov 2021)

  Changed paths:
    M llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
    M llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
    M llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.h
    M llvm/test/MC/WebAssembly/basic-assembly.s

  Log Message:
  -----------
  [WebAssembly] support "return" and unreachable code in asm type checker

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.

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




More information about the All-commits mailing list