summaryrefslogtreecommitdiff
path: root/test/lit/help
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2024-01-23 18:51:57 -0800
committerGitHub <noreply@github.com>2024-01-23 18:51:57 -0800
commit1ce851d7a2044cd1c121bec7de676a61aa147c79 (patch)
treeec1561b0955e5b54c3ef93dc69ce8f1875b94af6 /test/lit/help
parent9090ce56fcc67e15005aeedc59c6bc6773220f11 (diff)
downloadbinaryen-1ce851d7a2044cd1c121bec7de676a61aa147c79.tar.gz
binaryen-1ce851d7a2044cd1c121bec7de676a61aa147c79.tar.bz2
binaryen-1ce851d7a2044cd1c121bec7de676a61aa147c79.zip
[EH] Add translator from old to new EH instructions (#6210)
This translates the old Phase 3 EH instructions, which include `try`, `catch`, `catch_all`, `delegate`, and `rethrow`, into the new EH instructions, which include `try_table` (with `catch` / `catch_ref` / `catch_all` / `catch_all_ref`) and `throw_ref`, passed at the Oct 2023 CG meeting. This translator can be used as a standalone tool by users of the previous EH toolchain to generate binaries for the new spec without recompiling, and also can be used at the end of the Binaryen pipeline to produce binaries for the new spec while the end-to-end toolchain implementation for the new spec is in progress. While the goal of this pass is not optimization, this tries to a little better than the most naive implementation, namely by omitting a few instructions where possible and trying to minimize the number of additional locals, because this can be used as a standalone translator or the last stage of the pipeline while we can't post-optimize the results because the whole pipeline (-On) is not ready for the new EH.
Diffstat (limited to 'test/lit/help')
-rw-r--r--test/lit/help/wasm-opt.test3
-rw-r--r--test/lit/help/wasm2js.test3
2 files changed, 6 insertions, 0 deletions
diff --git a/test/lit/help/wasm-opt.test b/test/lit/help/wasm-opt.test
index 132296d5b..07d218007 100644
--- a/test/lit/help/wasm-opt.test
+++ b/test/lit/help/wasm-opt.test
@@ -486,6 +486,9 @@
;; CHECK-NEXT:
;; CHECK-NEXT: --symbolmap (alias for print-function-map)
;; CHECK-NEXT:
+;; CHECK-NEXT: --translate-eh-old-to-new translate old EH instructions to
+;; CHECK-NEXT: new ones
+;; CHECK-NEXT:
;; CHECK-NEXT: --trap-mode-clamp replace trapping operations with
;; CHECK-NEXT: clamping semantics
;; CHECK-NEXT:
diff --git a/test/lit/help/wasm2js.test b/test/lit/help/wasm2js.test
index 1d378f0ad..e81d07718 100644
--- a/test/lit/help/wasm2js.test
+++ b/test/lit/help/wasm2js.test
@@ -445,6 +445,9 @@
;; CHECK-NEXT:
;; CHECK-NEXT: --symbolmap (alias for print-function-map)
;; CHECK-NEXT:
+;; CHECK-NEXT: --translate-eh-old-to-new translate old EH instructions to
+;; CHECK-NEXT: new ones
+;; CHECK-NEXT:
;; CHECK-NEXT: --trap-mode-clamp replace trapping operations with
;; CHECK-NEXT: clamping semantics
;; CHECK-NEXT: