diff options
author | Sam Clegg <sbc@chromium.org> | 2020-04-10 01:01:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-09 22:01:23 -0700 |
commit | 6a51af5d858b6d3378749d17065c44cf50b62a26 (patch) | |
tree | 20dfbc05715519ff75355143c851b6c2e5fb3d81 /test/memorygrowth.fromasm.clamp | |
parent | 1b56c2b341e838656adca9a7101d824ed757d6ad (diff) | |
download | binaryen-6a51af5d858b6d3378749d17065c44cf50b62a26.tar.gz binaryen-6a51af5d858b6d3378749d17065c44cf50b62a26.tar.bz2 binaryen-6a51af5d858b6d3378749d17065c44cf50b62a26.zip |
Remove writes to globals that are never written to (#2741)
Since the global is never read, we know that any write operation
will be unobservable.
Diffstat (limited to 'test/memorygrowth.fromasm.clamp')
-rw-r--r-- | test/memorygrowth.fromasm.clamp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/test/memorygrowth.fromasm.clamp b/test/memorygrowth.fromasm.clamp index 220bba783..9c909afcf 100644 --- a/test/memorygrowth.fromasm.clamp +++ b/test/memorygrowth.fromasm.clamp @@ -14,7 +14,6 @@ (import "env" "__memory_base" (global $__memory_base i32)) (import "env" "__table_base" (global $__table_base i32)) (import "env" "STACKTOP" (global $r$asm2wasm$import i32)) - (import "env" "STACK_MAX" (global $s$asm2wasm$import i32)) (import "env" "abort" (func $ja (param i32))) (import "env" "_pthread_cleanup_pop" (func $oa (param i32))) (import "env" "___lock" (func $pa (param i32))) @@ -28,9 +27,7 @@ (import "env" "___unlock" (func $xa (param i32))) (import "env" "___syscall146" (func $ya (param i32 i32) (result i32))) (global $r (mut i32) (global.get $r$asm2wasm$import)) - (global $s (mut i32) (global.get $s$asm2wasm$import)) (global $v (mut i32) (i32.const 0)) - (global $w (mut i32) (i32.const 0)) (global $K (mut i32) (i32.const 0)) (export "__growWasmMemory" (func $__growWasmMemory)) (export "_free" (func $fb)) @@ -9012,13 +9009,8 @@ (i32.eqz (global.get $v) ) - (block - (global.set $v - (local.get $0) - ) - (global.set $w - (local.get $1) - ) + (global.set $v + (local.get $0) ) ) ) @@ -9054,9 +9046,6 @@ (global.set $r (local.get $0) ) - (global.set $s - (local.get $1) - ) ) (func $nb (; has Stack IR ;) (param $0 i32) (result i32) (call $ja |