From a5d33e7faaa965565f9ca1d0c23c3077389f2389 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 8 May 2018 07:57:49 -0700 Subject: More reducer improvements (#1533) * Add a helper class to iterate over all a node's children, and use that when attempting to replace a node with its children. * If a child has a different type than the parent, try to replace the parent with a conversion + the child (for example, a call may receive two f32 inputs and return an i32; we can try to replace the call with one of those f32s and a conversion to an i32). * When possible, try to replace the function body with a child even if the child has a different type, by changing the function return value. --- test/binaryen.js/kitchen-sink.js.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/binaryen.js') diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt index f5d76899d..5eed6c26f 100644 --- a/test/binaryen.js/kitchen-sink.js.txt +++ b/test/binaryen.js/kitchen-sink.js.txt @@ -29,8 +29,8 @@ BinaryenReturnId: 20 BinaryenHostId: 21 BinaryenNopId: 22 BinaryenUnreachableId: 23 -BinaryenAtomicCmpxchgId: 24 -BinaryenAtomicRMWId: 25 +BinaryenAtomicCmpxchgId: 25 +BinaryenAtomicRMWId: 24 BinaryenAtomicWaitId: 26 BinaryenAtomicWakeId: 27 getExpressionInfo={"id":16,"type":3,"op":6} -- cgit v1.2.3