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-indirect.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-indirect.txt')
-rw-r--r-- | test/passes/asyncify_pass-arg=asyncify-ignore-indirect.txt | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/test/passes/asyncify_pass-arg=asyncify-ignore-indirect.txt b/test/passes/asyncify_pass-arg=asyncify-ignore-indirect.txt index a48f3b3eb..690c96030 100644 --- a/test/passes/asyncify_pass-arg=asyncify-ignore-indirect.txt +++ b/test/passes/asyncify_pass-arg=asyncify-ignore-indirect.txt @@ -267,7 +267,7 @@ (i32.load (global.get $__asyncify_data) ) - (i32.const -12) + (i32.const -4) ) ) (local.set $5 @@ -275,18 +275,8 @@ (global.get $__asyncify_data) ) ) - (local.set $x - (i32.load - (local.get $5) - ) - ) - (local.set $1 - (i32.load offset=4 - (local.get $5) - ) - ) (local.set $2 - (i32.load offset=8 + (i32.load (local.get $5) ) ) @@ -446,14 +436,6 @@ ) (i32.store (local.get $6) - (local.get $x) - ) - (i32.store offset=4 - (local.get $6) - (local.get $1) - ) - (i32.store offset=8 - (local.get $6) (local.get $2) ) (i32.store @@ -462,7 +444,7 @@ (i32.load (global.get $__asyncify_data) ) - (i32.const 12) + (i32.const 4) ) ) ) |