]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: preserve name association when eliding copies in expand_calls
authorCherry Zhang <cherryyz@google.com>
Sun, 11 Apr 2021 16:07:33 +0000 (12:07 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 12 Apr 2021 17:08:49 +0000 (17:08 +0000)
commit33d99905daee9fc847ceb9e2a7e9a26427b7b41d
tree6ed0e7fe6a724b07c6c6e84fe24905a209b6eb2d
parent70ed28e5f763d08ee0d3be7bde14b35ce3d6322e
cmd/compile: preserve name association when eliding copies in expand_calls

If v is a Copy of x, we will rewrite v to x. If v has a name
associated to it, let the name associate to x.

Under register ABI, this helps associate in-register Arg values
to the parameters' names. (But does not address all cases.)

Change-Id: I47c779e56c9d0823a88890497e32326bc0290f82
Reviewed-on: https://go-review.googlesource.com/c/go/+/309330
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/compile/internal/ssa/expand_calls.go