[all-commits] [llvm/llvm-project] 3e9881: [WebAssembly] Handle block-like structures consist...
Heejin Ahn via All-commits
all-commits at lists.llvm.org
Tue Apr 11 02:07:20 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3e9881b92b090577ac1e8964d0504a455a306ca9
https://github.com/llvm/llvm-project/commit/3e9881b92b090577ac1e8964d0504a455a306ca9
Author: Heejin Ahn <aheejin at gmail.com>
Date: 2023-04-11 (Tue, 11 Apr 2023)
Changed paths:
M llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
M llvm/test/MC/WebAssembly/type-checker-errors.s
M llvm/test/MC/WebAssembly/type-checker-return.s
Log Message:
-----------
[WebAssembly] Handle block-like structures consistently in type checker
We disable type check in unreachable code, but when the unreachable code
is enclosed within a block-like structure, the block as a whole has a
valid type and we should continue type checking after the block. But it
looks we currently only do that for blocks and not other block-like
structures (`loop`s, `try`s, and `if`s). Also unreachable code within
`if`'s true body shouldn't disable type checking in `else` body, and
that in `try` body shouldn't disable type checking in `catch/catch_all`
body.
This also causes the values/types on the stack to be correctly checked
when encounterint `catch`, `catch_all`, and `delegate`.
Reviewed By: dschuff
Differential Revision: https://reviews.llvm.org/D147852
More information about the All-commits
mailing list