OSDN Git Service

[WebAssembly] Make rethrow instruction take a target BB argument
authorHeejin Ahn <aheejin@gmail.com>
Mon, 18 Jun 2018 23:54:29 +0000 (23:54 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Mon, 18 Jun 2018 23:54:29 +0000 (23:54 +0000)
commitf1fc1ae9b77fdfa000b1dbfb00eebd6a1e56b791
tree96c2a274214a4fc1feee211931dac1c383fadcaf
parenta800b896797263ea8ee1eba9c41e281486232da9
[WebAssembly] Make rethrow instruction take a target BB argument

Summary:
This patch changes the rethrow instruction to take a BB argument in LLVM
backend, like `br` and `br_if`s. This BB is a target catch BB the
rethrow instruction unwinds to. This BB argument will be converted to an
relative depth immediate at the end of CFGStackify pass, as in the same
way of branches.

RETHROW_TO_CALLER is a codegen-only instruction that should be used when
a rethrow instruction does not have an unwind destination BB, i.e., it
should rethrow to its caller function.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334998 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyInstrControl.td