]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: stop analyze NameOffsetExpr.Name_ in escape analysis
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Sat, 16 Jan 2021 17:17:59 +0000 (00:17 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Sun, 17 Jan 2021 06:37:18 +0000 (06:37 +0000)
commit88956fc4b1a44efe847fa07a8ebc21a49ff811e1
treef4c56af173c318a3b73dd5025926a3f521361335
parent7ce2a8383d154ca1860286a9b5c8a1e6cf151a90
[dev.regabi] cmd/compile: stop analyze NameOffsetExpr.Name_ in escape analysis

It is always used with global variables, so we can skip analyze it, the
same as what we are doing for ONAME/PEXTERN nodes.

While at it, add a Fatalf check to ensure NewNameOffsetExpr is only
called for global variables.

For #43737

Change-Id: Iac444ed8d583baba5042bea096531301843b1e8f
Reviewed-on: https://go-review.googlesource.com/c/go/+/284118
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/escape/escape.go
src/cmd/compile/internal/ir/expr.go