diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-08-07 20:01:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-07 20:01:07 -0700 |
commit | 9f8fa5a14d3b48c650c2574529fd95c329cb5358 (patch) | |
tree | ad447fed7ee7cc588a4372aa64d121993f1f2ada /test/ctor-eval/basics-flatten.wast.out | |
parent | 353e2c4fcb7662b8c73f5673fd0fc21bcb7287c6 (diff) | |
download | binaryen-9f8fa5a14d3b48c650c2574529fd95c329cb5358.tar.gz binaryen-9f8fa5a14d3b48c650c2574529fd95c329cb5358.tar.bz2 binaryen-9f8fa5a14d3b48c650c2574529fd95c329cb5358.zip |
wasm-ctor-eval improvements (#1631)
* When we eval a ctor, don't just nop the function body that no longer needs to be executed, also remove the export (as we report the ctor being evalled, and the outside will no longer call it).
* Run the pass to remove unused global things. This can usually remove evalled ctors (unless something else happens to call them, which can't happen normally as LLVM wouldn't use a ctor in another place, but e.g. duplicate function merging might merge a ctor with another function).
Diffstat (limited to 'test/ctor-eval/basics-flatten.wast.out')
-rw-r--r-- | test/ctor-eval/basics-flatten.wast.out | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/test/ctor-eval/basics-flatten.wast.out b/test/ctor-eval/basics-flatten.wast.out index b3b937c59..4273c256a 100644 --- a/test/ctor-eval/basics-flatten.wast.out +++ b/test/ctor-eval/basics-flatten.wast.out @@ -1,32 +1,8 @@ (module (type $v (func)) - (table 1 1 anyfunc) - (elem (i32.const 0) $call-indirect) (memory $0 256 256) (data (i32.const 10) "nas\00\00\00aka\00yzkx waka wakm\00\00\00\00\00\00C") - (export "test1" (func $test1)) - (export "test2" (func $test2)) - (export "test3" (func $test3)) - (func $test1 (; 0 ;) (type $v) - (nop) - ) - (func $test2 (; 1 ;) (type $v) - (nop) - ) - (func $test3 (; 2 ;) (type $v) - (nop) - ) - (func $safe-to-call (; 3 ;) (type $v) - (i32.store8 - (i32.const 10) - (i32.const 110) - ) - (i32.store8 - (i32.const 33) - (i32.const 109) - ) - ) - (func $call-indirect (; 4 ;) (type $v) + (func $call-indirect (; 0 ;) (type $v) (i32.store8 (i32.const 40) (i32.const 67) |