summaryrefslogtreecommitdiff
path: root/src/cmd/dist/test.go
diff options
context:
space:
mode:
authoreric fang <eric.fang@arm.com>2023-05-05 01:07:25 +0000
committerEric Fang <eric.fang@arm.com>2023-05-16 01:01:38 +0000
commite0ceba8139c81d612ab6226e057fb3b01555b7f9 (patch)
treedfae2ccaba1861b7d1a8ed5346a8a8ddbcf0a8e4 /src/cmd/dist/test.go
parent5f345e8eb995409fec5e1abf231031613885f2ae (diff)
downloadgo-git-e0ceba8139c81d612ab6226e057fb3b01555b7f9.tar.gz
cmd/compile: enhance tighten pass for memory values
[This is a roll-forward of CL 458755, which was reverted due to make.bash being broken on GOAMD64=v3. But it turned out that the problem was caused by wrong bswap/load rewrite rules, and it was fixed in CL 492616.] This CL enhances the tighten pass. Previously if a value has memory arg, then the tighten pass won't move it, actually if the memory state is consistent among definition and use block, we can move the value. This CL optimizes this case. This is useful for the following situation: b1: x = load(...mem) if(...) goto b2 else b3 b2: use(x) b3: some_op_not_use_x For the micro-benchmark mentioned in #56620, the performance improvement is about 15%. There's no noticeable performance change in the go1 benchmark. Fixes #56620 Change-Id: I36ea68bed384986cd3ae81cb9e6efe84bb213adc Reviewed-on: https://go-review.googlesource.com/c/go/+/492895 Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Keith Randall <khr@google.com> Run-TryBot: Eric Fang <eric.fang@arm.com>
Diffstat (limited to 'src/cmd/dist/test.go')
0 files changed, 0 insertions, 0 deletions