summaryrefslogtreecommitdiff
path: root/test/example
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-07-20 20:05:28 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-07-20 20:05:28 -0700
commitfa60ade30e03c6a13bbce26ff81c03ed1ae4da0b (patch)
treed45b2b08645ac004645dde875d22d1c66b15187d /test/example
parent56901f8cb6fb6db4622937479d3a375744289ff0 (diff)
downloadbinaryen-fa60ade30e03c6a13bbce26ff81c03ed1ae4da0b.tar.gz
binaryen-fa60ade30e03c6a13bbce26ff81c03ed1ae4da0b.tar.bz2
binaryen-fa60ade30e03c6a13bbce26ff81c03ed1ae4da0b.zip
more RemoveUnusedName opts: merge names when possible, and do block/loop merging based on their names
Diffstat (limited to 'test/example')
-rw-r--r--test/example/c-api-kitchen-sink.txt108
-rw-r--r--test/example/c-api-kitchen-sink.txt.txt54
2 files changed, 75 insertions, 87 deletions
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index 0d27fa464..64f5fc3b4 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -904,19 +904,17 @@ optimized:
)
)
(func $loop-tail (type $v)
- (block $block$3$break
- (loop $shape$0$continue
- (call_import $check
- (i32.const 0)
- )
- (call_import $check
- (i32.const 1)
- )
- (if
- (i32.const 10)
- (br $shape$0$continue)
- (br $block$3$break)
- )
+ (loop $block$3$break $shape$0$continue
+ (call_import $check
+ (i32.const 0)
+ )
+ (call_import $check
+ (i32.const 1)
+ )
+ (if
+ (i32.const 10)
+ (br $shape$0$continue)
+ (br $block$3$break)
)
)
(call_import $check
@@ -928,22 +926,20 @@ optimized:
(i32.const 0)
)
(block $block$7$break
- (block $block$4$break
- (loop $shape$1$continue
- (call_import $check
- (i32.const 1)
- )
- (br_if $block$7$break
- (i32.const 0)
- )
- (call_import $check
- (i32.const 2)
- )
- (if
- (i32.const -6)
- (br $block$4$break)
- (br $shape$1$continue)
- )
+ (loop $block$4$break $shape$1$continue
+ (call_import $check
+ (i32.const 1)
+ )
+ (br_if $block$7$break
+ (i32.const 0)
+ )
+ (call_import $check
+ (i32.const 2)
+ )
+ (if
+ (i32.const -6)
+ (br $block$4$break)
+ (br $shape$1$continue)
)
)
(call_import $check
@@ -2751,19 +2747,17 @@ optimized:
)
)
(func $loop-tail (type $v)
- (block $block$3$break
- (loop $shape$0$continue
- (call_import $check
- (i32.const 0)
- )
- (call_import $check
- (i32.const 1)
- )
- (if
- (i32.const 10)
- (br $shape$0$continue)
- (br $block$3$break)
- )
+ (loop $block$3$break $shape$0$continue
+ (call_import $check
+ (i32.const 0)
+ )
+ (call_import $check
+ (i32.const 1)
+ )
+ (if
+ (i32.const 10)
+ (br $shape$0$continue)
+ (br $block$3$break)
)
)
(call_import $check
@@ -2775,22 +2769,20 @@ optimized:
(i32.const 0)
)
(block $block$7$break
- (block $block$4$break
- (loop $shape$1$continue
- (call_import $check
- (i32.const 1)
- )
- (br_if $block$7$break
- (i32.const 0)
- )
- (call_import $check
- (i32.const 2)
- )
- (if
- (i32.const -6)
- (br $block$4$break)
- (br $shape$1$continue)
- )
+ (loop $block$4$break $shape$1$continue
+ (call_import $check
+ (i32.const 1)
+ )
+ (br_if $block$7$break
+ (i32.const 0)
+ )
+ (call_import $check
+ (i32.const 2)
+ )
+ (if
+ (i32.const -6)
+ (br $block$4$break)
+ (br $shape$1$continue)
)
)
(call_import $check
diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt
index 0ba8ccf94..96cbaaa00 100644
--- a/test/example/c-api-kitchen-sink.txt.txt
+++ b/test/example/c-api-kitchen-sink.txt.txt
@@ -897,19 +897,17 @@
)
)
(func $loop-tail (type $v)
- (block $block$3$break
- (loop $shape$0$continue
- (call_import $check
- (i32.const 0)
- )
- (call_import $check
- (i32.const 1)
- )
- (if
- (i32.const 10)
- (br $shape$0$continue)
- (br $block$3$break)
- )
+ (loop $block$3$break $shape$0$continue
+ (call_import $check
+ (i32.const 0)
+ )
+ (call_import $check
+ (i32.const 1)
+ )
+ (if
+ (i32.const 10)
+ (br $shape$0$continue)
+ (br $block$3$break)
)
)
(call_import $check
@@ -921,22 +919,20 @@
(i32.const 0)
)
(block $block$7$break
- (block $block$4$break
- (loop $shape$1$continue
- (call_import $check
- (i32.const 1)
- )
- (br_if $block$7$break
- (i32.const 0)
- )
- (call_import $check
- (i32.const 2)
- )
- (if
- (i32.const -6)
- (br $block$4$break)
- (br $shape$1$continue)
- )
+ (loop $block$4$break $shape$1$continue
+ (call_import $check
+ (i32.const 1)
+ )
+ (br_if $block$7$break
+ (i32.const 0)
+ )
+ (call_import $check
+ (i32.const 2)
+ )
+ (if
+ (i32.const -6)
+ (br $block$4$break)
+ (br $shape$1$continue)
)
)
(call_import $check