From a2fca965807a62f6c84739df88bcffbb7c7b74e4 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 5 May 2023 10:19:58 -0700 Subject: Generate unique block names when inlining (#5697) Each time we inline we put the contents in a block. Before we used the same name each time we inlined the same method, and as a result had many conflicts if a function was inlined many times. With this PR we emit a different name each time. This is not 100% NFC as it does change block names, which is observable in the IR (as can be seen in the test updates). This helps #5696 in speeding up UniqueNameManner. --- test/wasm2js/unary-ops.2asm.js.opt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/wasm2js/unary-ops.2asm.js.opt') diff --git a/test/wasm2js/unary-ops.2asm.js.opt b/test/wasm2js/unary-ops.2asm.js.opt index 76f3e1222..681891f81 100644 --- a/test/wasm2js/unary-ops.2asm.js.opt +++ b/test/wasm2js/unary-ops.2asm.js.opt @@ -79,7 +79,7 @@ function asmFunc(imports) { function legalstub$9($0, $1_1, $2, $3) { var $4 = 0, $5 = 0, $6_1 = 0, $7_1 = 0; - __inlined_func$__wasm_ctz_i64 : { + __inlined_func$__wasm_ctz_i64$3 : { if ($1_1 | $0) { $4 = $1_1 - 1 | 0; $5 = $4 + 1 | 0; @@ -90,7 +90,7 @@ function asmFunc(imports) { $0 = ($0 | 0) == 32 ? $7_1 : $0; $1_1 = 63 - $0 | 0; i64toi32_i32$HIGH_BITS = 0 - ($0 >>> 0 > 63) | 0; - break __inlined_func$__wasm_ctz_i64; + break __inlined_func$__wasm_ctz_i64$3; } i64toi32_i32$HIGH_BITS = 0; $1_1 = 64; -- cgit v1.2.3