summaryrefslogtreecommitdiff
path: root/test/lit/help
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-12-06 15:25:16 -0800
committerGitHub <noreply@github.com>2023-12-06 15:25:16 -0800
commitf722171f73732c6852cc4d283cc006ca56142ebf (patch)
treefa0c80c4488c4fcde03e63772d1d057bf965ae8d /test/lit/help
parent66277f9b767cb1b45ce12b77109c2538b6cb9c12 (diff)
downloadbinaryen-f722171f73732c6852cc4d283cc006ca56142ebf.tar.gz
binaryen-f722171f73732c6852cc4d283cc006ca56142ebf.tar.bz2
binaryen-f722171f73732c6852cc4d283cc006ca56142ebf.zip
Add no-inline IR annotation, and passes to set it based on function name (#6146)
Any function can now be annotated as not to be inlined fully (normally) or not to be inlined partially. In the future we'll want to read those annotations from the proposed wasm metadata section on code hints, and from wat text as well, but for now add trivial passes that set those fields based on function name wildcards, e.g.: --no-inline=*leave-alone* --inlining That will not inline any function whose name contains "leave-alone" in the name. --no-inline disables all inlining (full or partial) while --no-full-inline and --no-partial-inline affect only full or partial inlining.
Diffstat (limited to 'test/lit/help')
-rw-r--r--test/lit/help/wasm-opt.test8
-rw-r--r--test/lit/help/wasm2js.test8
2 files changed, 16 insertions, 0 deletions
diff --git a/test/lit/help/wasm-opt.test b/test/lit/help/wasm-opt.test
index b18c312ff..a45096e39 100644
--- a/test/lit/help/wasm-opt.test
+++ b/test/lit/help/wasm-opt.test
@@ -297,6 +297,14 @@
;; CHECK-NEXT:
;; CHECK-NEXT: --nm name list
;; CHECK-NEXT:
+;; CHECK-NEXT: --no-full-inline mark functions as no-inline (for
+;; CHECK-NEXT: full inlining only)
+;; CHECK-NEXT:
+;; CHECK-NEXT: --no-inline mark functions as no-inline
+;; CHECK-NEXT:
+;; CHECK-NEXT: --no-partial-inline mark functions as no-inline (for
+;; CHECK-NEXT: partial inlining only)
+;; CHECK-NEXT:
;; CHECK-NEXT: --once-reduction reduces calls to code that only
;; CHECK-NEXT: runs once
;; CHECK-NEXT:
diff --git a/test/lit/help/wasm2js.test b/test/lit/help/wasm2js.test
index 129374049..9303642be 100644
--- a/test/lit/help/wasm2js.test
+++ b/test/lit/help/wasm2js.test
@@ -256,6 +256,14 @@
;; CHECK-NEXT:
;; CHECK-NEXT: --nm name list
;; CHECK-NEXT:
+;; CHECK-NEXT: --no-full-inline mark functions as no-inline (for
+;; CHECK-NEXT: full inlining only)
+;; CHECK-NEXT:
+;; CHECK-NEXT: --no-inline mark functions as no-inline
+;; CHECK-NEXT:
+;; CHECK-NEXT: --no-partial-inline mark functions as no-inline (for
+;; CHECK-NEXT: partial inlining only)
+;; CHECK-NEXT:
;; CHECK-NEXT: --once-reduction reduces calls to code that only
;; CHECK-NEXT: runs once
;; CHECK-NEXT: