diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-06-12 16:04:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-12 16:04:20 -0700 |
commit | 93c65f98b7a9b0977578dbf55778529efec646f1 (patch) | |
tree | 6ecff0871299000cbae500a31dd68a2a903803f7 /test/merge | |
parent | d1448e7903ed175eca23a3867b348bad42d36271 (diff) | |
download | binaryen-93c65f98b7a9b0977578dbf55778529efec646f1.tar.gz binaryen-93c65f98b7a9b0977578dbf55778529efec646f1.tar.bz2 binaryen-93c65f98b7a9b0977578dbf55778529efec646f1.zip |
Optimize/merge duplicate function types (#1041)
Diffstat (limited to 'test/merge')
-rw-r--r-- | test/merge/basics.wast.combined.finalized.opt | 8 | ||||
-rw-r--r-- | test/merge/basics.wast.combined.opt | 8 | ||||
-rw-r--r-- | test/merge/dylib.wasm.combined.finalized.opt | 10 | ||||
-rw-r--r-- | test/merge/dylib.wasm.combined.opt | 10 | ||||
-rw-r--r-- | test/merge/fusing.wast.combined.finalized.opt | 3 | ||||
-rw-r--r-- | test/merge/fusing.wast.combined.opt | 3 | ||||
-rw-r--r-- | test/merge/post-instantiate-a.wast.combined.finalized.opt | 1 | ||||
-rw-r--r-- | test/merge/post-instantiate-a.wast.combined.opt | 1 | ||||
-rw-r--r-- | test/merge/post-instantiate-b.wast.combined.finalized.opt | 1 | ||||
-rw-r--r-- | test/merge/post-instantiate-b.wast.combined.opt | 1 | ||||
-rw-r--r-- | test/merge/printf.wast.combined.finalized.opt | 2 | ||||
-rw-r--r-- | test/merge/printf.wast.combined.opt | 2 |
12 files changed, 14 insertions, 36 deletions
diff --git a/test/merge/basics.wast.combined.finalized.opt b/test/merge/basics.wast.combined.finalized.opt index 320ba8fa7..119851fb0 100644 --- a/test/merge/basics.wast.combined.finalized.opt +++ b/test/merge/basics.wast.combined.finalized.opt @@ -1,8 +1,6 @@ (module (type $ii (func (param i32 i32))) (type $FUNCSIG$v (func)) - (type $ii$0 (func (param i32 i32))) - (type $FUNCSIG$v$0 (func)) (import "env" "memory" (memory $0 256)) (import "env" "table" (table 18 anyfunc)) (import "env" "some-func" (func $some-func)) @@ -48,12 +46,12 @@ (nop) (call $willCollide) ) - (func $only-b (type $FUNCSIG$v$0) + (func $only-b (type $FUNCSIG$v) (nop) (call $only-b) (call $some-func-b) (call $some-collide$0) - (call_indirect $ii$0 + (call_indirect $ii (i32.const 12) (i32.const 34) (i32.const 56) @@ -79,7 +77,7 @@ (i32.const 5678) ) ) - (func $willCollide$0 (type $FUNCSIG$v$0) + (func $willCollide$0 (type $FUNCSIG$v) (nop) (call $willCollide$0) ) diff --git a/test/merge/basics.wast.combined.opt b/test/merge/basics.wast.combined.opt index ba8ab6220..c595d00da 100644 --- a/test/merge/basics.wast.combined.opt +++ b/test/merge/basics.wast.combined.opt @@ -1,8 +1,6 @@ (module (type $ii (func (param i32 i32))) (type $FUNCSIG$v (func)) - (type $ii$0 (func (param i32 i32))) - (type $FUNCSIG$v$0 (func)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) (import "env" "memory" (memory $0 256)) @@ -56,12 +54,12 @@ (nop) (call $willCollide) ) - (func $only-b (type $FUNCSIG$v$0) + (func $only-b (type $FUNCSIG$v) (nop) (call $only-b) (call $some-func-b) (call $some-collide$0) - (call_indirect $ii$0 + (call_indirect $ii (i32.const 12) (i32.const 34) (i32.const 56) @@ -115,7 +113,7 @@ (i32.const 5678) ) ) - (func $willCollide$0 (type $FUNCSIG$v$0) + (func $willCollide$0 (type $FUNCSIG$v) (nop) (call $willCollide$0) ) diff --git a/test/merge/dylib.wasm.combined.finalized.opt b/test/merge/dylib.wasm.combined.finalized.opt index eda229e34..e5a26a5d3 100644 --- a/test/merge/dylib.wasm.combined.finalized.opt +++ b/test/merge/dylib.wasm.combined.finalized.opt @@ -1,11 +1,7 @@ (module - (type $0 (func (param i32 i32))) (type $1 (func (param i32) (result i32))) (type $2 (func (result i32))) (type $3 (func)) - (type $0$0 (func (param i32 i32))) - (type $1$0 (func (result i32))) - (type $2$0 (func)) (import "env" "_puts" (func $import$1 (param i32) (result i32))) (import "env" "memory" (memory $0 256)) (import "env" "table" (table 8 anyfunc)) @@ -55,7 +51,7 @@ ) ) ) - (func $_foo (type $1$0) (result i32) + (func $_foo (type $2) (result i32) (local $var$0 i32) (block $label$0 i32 (block $label$1 i32 @@ -66,10 +62,10 @@ ) ) ) - (func $runPostSets$0 (type $2$0) + (func $runPostSets$0 (type $3) (nop) ) - (func $__post_instantiate$0 (type $2$0) + (func $__post_instantiate$0 (type $3) (block $label$0 (block $label$1 (set_global $global$0$0 diff --git a/test/merge/dylib.wasm.combined.opt b/test/merge/dylib.wasm.combined.opt index 404281cda..1954735d9 100644 --- a/test/merge/dylib.wasm.combined.opt +++ b/test/merge/dylib.wasm.combined.opt @@ -1,11 +1,7 @@ (module - (type $0 (func (param i32 i32))) (type $1 (func (param i32) (result i32))) (type $2 (func (result i32))) (type $3 (func)) - (type $0$0 (func (param i32 i32))) - (type $1$0 (func (result i32))) - (type $2$0 (func)) (import "env" "memoryBase" (global $import$0 i32)) (import "env" "_puts" (func $import$1 (param i32) (result i32))) (import "env" "memory" (memory $0 256)) @@ -61,7 +57,7 @@ ) ) ) - (func $_foo (type $1$0) (result i32) + (func $_foo (type $2) (result i32) (local $var$0 i32) (block $label$0 i32 (block $label$1 i32 @@ -72,10 +68,10 @@ ) ) ) - (func $runPostSets$0 (type $2$0) + (func $runPostSets$0 (type $3) (nop) ) - (func $__post_instantiate$0 (type $2$0) + (func $__post_instantiate$0 (type $3) (block $label$0 (block $label$1 (set_global $global$0$0 diff --git a/test/merge/fusing.wast.combined.finalized.opt b/test/merge/fusing.wast.combined.finalized.opt index 202c566e1..9df0a5cdc 100644 --- a/test/merge/fusing.wast.combined.finalized.opt +++ b/test/merge/fusing.wast.combined.finalized.opt @@ -1,6 +1,5 @@ (module (type $FUNCSIG$v (func)) - (type $FUNCSIG$v$0 (func)) (import "env" "memory" (memory $0 256)) (import "env" "table" (table 8 anyfunc)) (global $a-global i32 (i32.const 0)) @@ -20,7 +19,7 @@ (get_global $b-global) ) ) - (func $bar-func (type $FUNCSIG$v$0) + (func $bar-func (type $FUNCSIG$v) (nop) (drop (get_global $a-global) diff --git a/test/merge/fusing.wast.combined.opt b/test/merge/fusing.wast.combined.opt index 1a09fb784..c8d58890e 100644 --- a/test/merge/fusing.wast.combined.opt +++ b/test/merge/fusing.wast.combined.opt @@ -1,6 +1,5 @@ (module (type $FUNCSIG$v (func)) - (type $FUNCSIG$v$0 (func)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) (import "env" "memory" (memory $0 256)) @@ -23,7 +22,7 @@ (get_global $b-global) ) ) - (func $bar-func (type $FUNCSIG$v$0) + (func $bar-func (type $FUNCSIG$v) (nop) (drop (get_global $a-global) diff --git a/test/merge/post-instantiate-a.wast.combined.finalized.opt b/test/merge/post-instantiate-a.wast.combined.finalized.opt index 2fc7dbdb3..d0a9b4a6a 100644 --- a/test/merge/post-instantiate-a.wast.combined.finalized.opt +++ b/test/merge/post-instantiate-a.wast.combined.finalized.opt @@ -1,6 +1,5 @@ (module (type $0 (func)) - (type $0$0 (func)) (memory $0 1) (data (i32.const 1024) "") (export "__post_instantiate" (func $0)) diff --git a/test/merge/post-instantiate-a.wast.combined.opt b/test/merge/post-instantiate-a.wast.combined.opt index 8f190f187..b4ecf737b 100644 --- a/test/merge/post-instantiate-a.wast.combined.opt +++ b/test/merge/post-instantiate-a.wast.combined.opt @@ -1,6 +1,5 @@ (module (type $0 (func)) - (type $0$0 (func)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) (memory $0 0) diff --git a/test/merge/post-instantiate-b.wast.combined.finalized.opt b/test/merge/post-instantiate-b.wast.combined.finalized.opt index f335f08d9..367bd834b 100644 --- a/test/merge/post-instantiate-b.wast.combined.finalized.opt +++ b/test/merge/post-instantiate-b.wast.combined.finalized.opt @@ -1,5 +1,4 @@ (module - (type $0 (func)) (type $0$0 (func)) (memory $0 1) (data (i32.const 1024) "") diff --git a/test/merge/post-instantiate-b.wast.combined.opt b/test/merge/post-instantiate-b.wast.combined.opt index 1a85ff79d..b847fc5e8 100644 --- a/test/merge/post-instantiate-b.wast.combined.opt +++ b/test/merge/post-instantiate-b.wast.combined.opt @@ -1,5 +1,4 @@ (module - (type $0 (func)) (type $0$0 (func)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) diff --git a/test/merge/printf.wast.combined.finalized.opt b/test/merge/printf.wast.combined.finalized.opt index 92e17f720..a801ab875 100644 --- a/test/merge/printf.wast.combined.finalized.opt +++ b/test/merge/printf.wast.combined.finalized.opt @@ -1,7 +1,5 @@ (module (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$iii$0 (func (param i32 i32) (result i32))) - (type $1 (func)) (import "env" "memory" (memory $0 256)) (import "env" "table" (table 8 anyfunc)) diff --git a/test/merge/printf.wast.combined.opt b/test/merge/printf.wast.combined.opt index e01710fd1..ae913e40e 100644 --- a/test/merge/printf.wast.combined.opt +++ b/test/merge/printf.wast.combined.opt @@ -1,7 +1,5 @@ (module (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$iii$0 (func (param i32 i32) (result i32))) - (type $1 (func)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) (import "env" "memory" (memory $0 256)) |