aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2022-07-22 14:58:40 -0700
committerKeith Randall <khr@golang.org>2022-08-18 17:36:38 +0000
commit908499adec185a672b337c84ca4cea0755f0d5cf (patch)
tree5eba5956e2a0f7499713b04ff825cb284599e200 /test/codegen
parent661146bc0bb0fad22d561eef2c0b48974aca32b6 (diff)
downloadgo-908499adec185a672b337c84ca4cea0755f0d5cf.tar.xz
cmd/compile: stop using VARKILL
With the introduction of stack objects, VARKILL information is no longer needed. With stack objects, an object is dead when there are no more static references to it, and the stack scanner can't find any live pointers to it. VARKILL information isn't used to establish live ranges for address-taken variables any more. In effect, the last static reference *is* the VARKILL, and there's an additional dynamic liveness check during stack scanning. Next CL will actually rip out the VARKILL opcodes. Change-Id: I030a2ab867445cf4e0e69397911f8a2e2f0ed07b Reviewed-on: https://go-review.googlesource.com/c/go/+/419234 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Keith Randall <khr@golang.org>
Diffstat (limited to 'test/codegen')
-rw-r--r--test/codegen/mapaccess.go50
1 files changed, 24 insertions, 26 deletions
diff --git a/test/codegen/mapaccess.go b/test/codegen/mapaccess.go
index a914a0c766..3d494e7cc7 100644
--- a/test/codegen/mapaccess.go
+++ b/test/codegen/mapaccess.go
@@ -234,29 +234,28 @@ func mapCompoundAssignmentString() {
var sinkAppend bool
-// TODO: optimization is not applied because of mapslow flag.
func mapAppendAssignmentInt8() {
m := make(map[int8][]int8, 0)
var k int8 = 0
- // 386:".*mapaccess"
- // amd64:".*mapaccess"
- // arm:".*mapaccess"
- // arm64:".*mapaccess"
+ // 386:-".*mapaccess"
+ // amd64:-".*mapaccess"
+ // arm:-".*mapaccess"
+ // arm64:-".*mapaccess"
m[k] = append(m[k], 1)
- // 386:".*mapaccess"
- // amd64:".*mapaccess"
- // arm:".*mapaccess"
- // arm64:".*mapaccess"
+ // 386:-".*mapaccess"
+ // amd64:-".*mapaccess"
+ // arm:-".*mapaccess"
+ // arm64:-".*mapaccess"
m[k] = append(m[k], 1, 2, 3)
a := []int8{7, 8, 9, 0}
- // 386:".*mapaccess"
- // amd64:".*mapaccess"
- // arm:".*mapaccess"
- // arm64:".*mapaccess"
+ // 386:-".*mapaccess"
+ // amd64:-".*mapaccess"
+ // arm:-".*mapaccess"
+ // arm64:-".*mapaccess"
m[k] = append(m[k], a...)
// Exceptions
@@ -394,29 +393,28 @@ func mapAppendAssignmentInt64() {
m[k] = append(m[k+1], 100)
}
-// TODO: optimization is not applied because of mapslow flag.
func mapAppendAssignmentComplex128() {
m := make(map[complex128][]complex128, 0)
var k complex128 = 0
- // 386:".*mapaccess"
- // amd64:".*mapaccess"
- // arm:".*mapaccess"
- // arm64:".*mapaccess"
+ // 386:-".*mapaccess"
+ // amd64:-".*mapaccess"
+ // arm:-".*mapaccess"
+ // arm64:-".*mapaccess"
m[k] = append(m[k], 1)
- // 386:".*mapaccess"
- // amd64:".*mapaccess"
- // arm:".*mapaccess"
- // arm64:".*mapaccess"
+ // 386:-".*mapaccess"
+ // amd64:-".*mapaccess"
+ // arm:-".*mapaccess"
+ // arm64:-".*mapaccess"
m[k] = append(m[k], 1, 2, 3)
a := []complex128{7, 8, 9, 0}
- // 386:".*mapaccess"
- // amd64:".*mapaccess"
- // arm:".*mapaccess"
- // arm64:".*mapaccess"
+ // 386:-".*mapaccess"
+ // amd64:-".*mapaccess"
+ // arm:-".*mapaccess"
+ // arm64:-".*mapaccess"
m[k] = append(m[k], a...)
// Exceptions