summaryrefslogtreecommitdiff
path: root/test/unit.fromasm.imprecise
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2019-02-26 16:15:04 -0800
committerGitHub <noreply@github.com>2019-02-26 16:15:04 -0800
commitc6237e8ea6236aa4a622cae64517cc3fd4f27b83 (patch)
tree0446fe737565914b63d2cf9cc56c29456ebe3f18 /test/unit.fromasm.imprecise
parent8b698a87ba2c7891a8c17c07744bf3fcfe49f691 (diff)
downloadbinaryen-c6237e8ea6236aa4a622cae64517cc3fd4f27b83.tar.gz
binaryen-c6237e8ea6236aa4a622cae64517cc3fd4f27b83.tar.bz2
binaryen-c6237e8ea6236aa4a622cae64517cc3fd4f27b83.zip
Dead return value elimination in DeadArgumentElimination (#1917)
* Finds functions whose return value is always dropped, and removes the return. * Run multiple iterations of the pass, as one can enable others. * Do not run DeadArgumentElimination at all if debug info is present (with these improvements, it became much more likely to destroy debug info). Saves 2.5% on hello world, because of some simple libc calls.
Diffstat (limited to 'test/unit.fromasm.imprecise')
-rw-r--r--test/unit.fromasm.imprecise42
1 files changed, 9 insertions, 33 deletions
diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise
index 7ff7a4c18..bf5a9ae22 100644
--- a/test/unit.fromasm.imprecise
+++ b/test/unit.fromasm.imprecise
@@ -1086,31 +1086,7 @@
(i32.const 30)
)
)
- (func $sqrts (; 52 ;) (; has Stack IR ;) (param $0 f64) (result f64)
- (f64.add
- (f64.sqrt
- (local.get $0)
- )
- (f64.promote_f32
- (f32.sqrt
- (f32.demote_f64
- (local.get $0)
- )
- )
- )
- )
- )
- (func $keepAlive (; 53 ;) (; has Stack IR ;)
- (drop
- (call $sqrts
- (f64.const 3.14159)
- )
- )
- (drop
- (call $sqrts
- (f64.const 2.18281)
- )
- )
+ (func $keepAlive (; 52 ;) (; has Stack IR ;)
(call_indirect (type $FUNCSIG$vi)
(i32.const 0)
(i32.const 17)
@@ -1149,16 +1125,16 @@
)
)
)
- (func $vi (; 54 ;) (; has Stack IR ;) (param $0 i32)
+ (func $vi (; 53 ;) (; has Stack IR ;) (param $0 i32)
(nop)
)
- (func $ii (; 55 ;) (; has Stack IR ;) (param $0 i32) (result i32)
+ (func $ii (; 54 ;) (; has Stack IR ;) (param $0 i32) (result i32)
(local.get $0)
)
- (func $legalstub$conversions (; 56 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 f64)
+ (func $legalstub$conversions (; 55 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 f64)
(nop)
)
- (func $legalstub$frem_float (; 57 ;) (; has Stack IR ;) (result f64)
+ (func $legalstub$frem_float (; 56 ;) (; has Stack IR ;) (result f64)
(f64.promote_f32
(f32.demote_f64
(call $f64-rem
@@ -1168,16 +1144,16 @@
)
)
)
- (func $legalstub$fr (; 58 ;) (; has Stack IR ;) (param $0 f64)
+ (func $legalstub$fr (; 57 ;) (; has Stack IR ;) (param $0 f64)
(nop)
)
- (func $legalstub$ceiling_32_64 (; 59 ;) (; has Stack IR ;) (param $0 f64) (param $1 f64)
+ (func $legalstub$ceiling_32_64 (; 58 ;) (; has Stack IR ;) (param $0 f64) (param $1 f64)
(nop)
)
- (func $legalstub$bitcasts (; 60 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64)
+ (func $legalstub$bitcasts (; 59 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64)
(nop)
)
- (func $legalstub$exported_f32_user (; 61 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 f64) (result f64)
+ (func $legalstub$exported_f32_user (; 60 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 f64) (result f64)
(f64.promote_f32
(f32.demote_f64
(local.get $1)