diff options
author | Alon Zakai <azakai@google.com> | 2020-06-23 09:20:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-23 09:20:50 -0700 |
commit | 92423bebfc267373b28f5cf8c28e5711767adb4c (patch) | |
tree | 8676095dabcaeda54da8dc9c01871e525f5ba5ce /test/passes/asyncify_pass-arg=asyncify-ignore-imports.txt | |
parent | 63e580f737352d877fb90b4efca2eee89d780755 (diff) | |
download | binaryen-92423bebfc267373b28f5cf8c28e5711767adb4c.tar.gz binaryen-92423bebfc267373b28f5cf8c28e5711767adb4c.tar.bz2 binaryen-92423bebfc267373b28f5cf8c28e5711767adb4c.zip |
Asyncify liveness analysis (#2890)
This finds out which locals are live at call sites that might pause/resume,
which is the set of locals we need to actually save/load. That is, if a local
is not alive at any call site in the function, then it's value doesn't need to
stay alive while sleeping.
This saves about 10% of locals that are saved/loaded, and about 1.5%
in final code size.
Diffstat (limited to 'test/passes/asyncify_pass-arg=asyncify-ignore-imports.txt')
-rw-r--r-- | test/passes/asyncify_pass-arg=asyncify-ignore-imports.txt | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/test/passes/asyncify_pass-arg=asyncify-ignore-imports.txt b/test/passes/asyncify_pass-arg=asyncify-ignore-imports.txt index b1854fb5d..f9ae663fd 100644 --- a/test/passes/asyncify_pass-arg=asyncify-ignore-imports.txt +++ b/test/passes/asyncify_pass-arg=asyncify-ignore-imports.txt @@ -60,7 +60,7 @@ (i32.load (global.get $__asyncify_data) ) - (i32.const -8) + (i32.const -4) ) ) (local.set $4 @@ -68,13 +68,8 @@ (global.get $__asyncify_data) ) ) - (local.set $x - (i32.load - (local.get $4) - ) - ) (local.set $1 - (i32.load offset=4 + (i32.load (local.get $4) ) ) @@ -176,10 +171,6 @@ ) (i32.store (local.get $5) - (local.get $x) - ) - (i32.store offset=4 - (local.get $5) (local.get $1) ) (i32.store @@ -188,7 +179,7 @@ (i32.load (global.get $__asyncify_data) ) - (i32.const 8) + (i32.const 4) ) ) ) |