]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: apply optimization for readonly globals on wasm
authorAgniva De Sarker <agnivade@yahoo.co.in>
Tue, 9 Jul 2019 18:30:13 +0000 (00:00 +0530)
committerAgniva De Sarker <agniva.quicksilver@gmail.com>
Wed, 28 Aug 2019 05:55:52 +0000 (05:55 +0000)
commit7be97af2ff6d4bdc8a52cb72677bbd68703489fd
tree2c1f3e4e4631ab0c375d563773212cc46e699966
parent07f04607370bf46c6f3a12ac3e182068da403b86
cmd/compile: apply optimization for readonly globals on wasm

Extend the optimization introduced in CL 141118 to the wasm architecture.

And for reference, the rules trigger 212 times while building std and cmd

$GOOS=js GOARCH=wasm gotip build std cmd
$grep -E "Wasm.rules:44(1|2|3|4)" rulelog | wc -l
212

Updates #26498

Change-Id: I153684a2b98589ae812b42268da08b65679e09d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/185477
Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Richard Musiol <neelance@gmail.com>
src/cmd/compile/internal/ssa/gen/Wasm.rules
src/cmd/compile/internal/ssa/rewriteWasm.go
test/codegen/strings.go