diff options
author | Alon Zakai <azakai@google.com> | 2024-01-31 14:31:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-31 14:31:47 -0800 |
commit | b5938499432a1251d94e8e7b534f14919fdaf81c (patch) | |
tree | 9aa561092be9f107bdecfa1ef228531ece0c32db /test | |
parent | dfcae55bd02747cb1eaf8410c02ac4d53ee1fd01 (diff) | |
download | binaryen-b5938499432a1251d94e8e7b534f14919fdaf81c.tar.gz binaryen-b5938499432a1251d94e8e7b534f14919fdaf81c.tar.bz2 binaryen-b5938499432a1251d94e8e7b534f14919fdaf81c.zip |
Revert "Stop propagating/inlining string constants (#6234)" (#6258)
This reverts commit 9090ce56fcc67e15005aeedc59c6bc6773220f11.
This has the effect of once more propagating string constants from
globals to other places (and from non-globals too), which is useful
for various optimizations even if it isn't useful in the final output.
To fix the final output problem, #6257 added a pass that is run at the
end to collect string.const to globals, which allows us to once more
propagate strings in the optimizer, now without a downside.
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/passes/precompute-gc.wast | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/lit/passes/precompute-gc.wast b/test/lit/passes/precompute-gc.wast index 603788f8c..8d4b56ce7 100644 --- a/test/lit/passes/precompute-gc.wast +++ b/test/lit/passes/precompute-gc.wast @@ -1021,10 +1021,10 @@ ;; CHECK-NEXT: (string.const "hello, world") ;; CHECK-NEXT: ) ;; CHECK-NEXT: (call $strings - ;; CHECK-NEXT: (local.get $s) + ;; CHECK-NEXT: (string.const "hello, world") ;; CHECK-NEXT: ) ;; CHECK-NEXT: (call $strings - ;; CHECK-NEXT: (local.get $s) + ;; CHECK-NEXT: (string.const "hello, world") ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $strings (param $param (ref string)) @@ -1032,9 +1032,7 @@ (local.set $s (string.const "hello, world") ) - ;; The constant string could be propagated twice, to both of these calls, but - ;; we do not do so as it might cause more allocations to happen. - ;; TODO if VMs optimize that, handle it + ;; The constant string should be propagated twice, to both of these calls. (call $strings (local.get $s) ) |