mirror of
https://github.com/golang/go
synced 2025-05-05 03:21:36 +00:00
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>
This commit is contained in:
src/cmd/compile/internal
test
@ -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
|
||||
|
Reference in New Issue
Block a user