summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2023-01-17 10:59:25 -0800
committerMatthew Dempsky <mdempsky@google.com>2023-01-17 22:13:42 +0000
commitf773bef9ab837db1bd81df375a701196b23ac510 (patch)
tree69c69d4999ba1a8fc5082fae8b2b5e6c28a5e7ba /lib
parentd45df06663c88984b75052fd0631974916b1bddb (diff)
downloadgo-git-f773bef9ab837db1bd81df375a701196b23ac510.tar.gz
cmd/compile: fix static init inlining for hidden node fields
Unified IR added several new IR fields for holding *runtime._type expressions. To avoid throwing off any frontend semantics (particularly inlining cost heuristics), they were marked as `mknode:"-"` so that code wouldn't visit them. Unfortunately, this has a bad interaction with the static init inlining optimization, because the latter relies on ir.EditChildren to substitute all parameters. This potentially includes dictionary parameters, which can appear within the new RType fields. This CL adds a new ir.EditChildrenWithHidden function that also edits these fields, and switches staticinit to use it. Longer term, we should unhide the RType fields so that ir.EditChildren visits them normally, but that's scarier so late in the release cycle. Fixes #57778. Change-Id: I98c1e8cf366156dc0c81a0cb79029cc5e59c476f Reviewed-on: https://go-review.googlesource.com/c/go/+/461686 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions