aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/deadcode
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-01-05 03:27:46 -0800
committerMatthew Dempsky <mdempsky@google.com>2021-01-05 14:04:03 +0000
commite09783cbc0a7142719c6210b4eda7b21daad91d5 (patch)
treed008da0b27377e50bcce858983e86bc2b2004f59 /src/cmd/compile/internal/deadcode
parent9aa950c40789223d9e8df7d1ec657cd313e6c7aa (diff)
downloadgo-e09783cbc0a7142719c6210b4eda7b21daad91d5.tar.xz
[dev.regabi] cmd/compile: make ir.StaticValue safer
ir.StaticValue currently relies on CaptureVars setting Addrtaken for variables that are assigned within nested function literals. We want to move that logic to escape analysis, but ir.StaticValue is used in inlining and devirtualization, which happen before escape analysis. The long-term solution here is to generalize escape analysis's precise reassignment tracking for use by other optimization passes, but for now we just generalize ir.StaticValue to not depend on Addrtaken anymore. Instead, it now also pays attention to OADDR nodes as well as recurses into OCLOSURE bodies. Passes toolstash -cmp. Change-Id: I6114e3277fb70b235f4423d2983d0433c881f79f Reviewed-on: https://go-review.googlesource.com/c/go/+/281540 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/deadcode')
0 files changed, 0 insertions, 0 deletions