]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use constants directly for fast map access calls
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 9 Feb 2017 22:00:23 +0000 (14:00 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Fri, 10 Feb 2017 04:57:20 +0000 (04:57 +0000)
commit5faba3057dacdf365572b89b4c9ec9e27f3a6133
treeec2e8e9d190c3da5561fdd2ce1bc17216907cd24
parent9ef65dbe0683634a2e8a557d12267d0309ae1570
cmd/compile: use constants directly for fast map access calls

CL 35554 taught order.go to use static variables
for constants that needed to be addressable for runtime routines.
However, there is one class of runtime routines that
do not actually need an addressable value: fast map access routines.
This CL teaches order.go to avoid using static variables
for addressability in those cases.
Instead, it avoids introducing a temp at all,
which the backend would just have to optimize away.

Fixes #19015.

Change-Id: I5ef780c604fac3fb48dabb23a344435e283cb832
Reviewed-on: https://go-review.googlesource.com/36693
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/asm_test.go
src/cmd/compile/internal/gc/order.go
src/cmd/compile/internal/gc/walk.go