aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/gc
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-01-15 00:56:02 -0800
committerMatthew Dempsky <mdempsky@google.com>2021-01-15 16:13:14 +0000
commit14537e6e5410b403add59bb41d3954bdab0ade3e (patch)
treef16ecf4df3bf211aa4cbfc746c327f55f2cee0c3 /src/cmd/compile/internal/gc
parentab523fc510aadb82dc39dec89741fcbb90093ff0 (diff)
downloadgo-14537e6e5410b403add59bb41d3954bdab0ade3e.tar.gz
go-14537e6e5410b403add59bb41d3954bdab0ade3e.zip
[dev.regabi] cmd/compile: move stkobj symbol generation to SSA
The code for allocating linksyms and recording that we need runtime type descriptors is now concurrent-safe, so move it to where those symbols are actually needed to reduce complexity and risk of failing to generate all needed symbols in advance. For #43701. Change-Id: I759d2508213ac9a4e0b504b51a75fa10dfa37a8d Reviewed-on: https://go-review.googlesource.com/c/go/+/284076 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Trust: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/gc')
-rw-r--r--src/cmd/compile/internal/gc/compile.go16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/cmd/compile/internal/gc/compile.go b/src/cmd/compile/internal/gc/compile.go
index a8a0106320..6e347bf0f1 100644
--- a/src/cmd/compile/internal/gc/compile.go
+++ b/src/cmd/compile/internal/gc/compile.go
@@ -13,7 +13,6 @@ import (
"cmd/compile/internal/base"
"cmd/compile/internal/ir"
"cmd/compile/internal/liveness"
- "cmd/compile/internal/reflectdata"
"cmd/compile/internal/ssagen"
"cmd/compile/internal/typecheck"
"cmd/compile/internal/types"
@@ -84,21 +83,6 @@ func prepareFunc(fn *ir.Func) {
walk.Walk(fn)
ir.CurFunc = nil // enforce no further uses of CurFunc
typecheck.DeclContext = ir.PEXTERN
-
- // Make sure type syms are declared for all types that might
- // be types of stack objects. We need to do this here
- // because symbols must be allocated before the parallel
- // phase of the compiler.
- for _, n := range fn.Dcl {
- if liveness.ShouldTrack(n) && n.Addrtaken() {
- reflectdata.WriteType(n.Type())
- // Also make sure we allocate a linker symbol
- // for the stack object data, for the same reason.
- if fn.LSym.Func().StackObjects == nil {
- fn.LSym.Func().StackObjects = base.Ctxt.Lookup(fn.LSym.Name + ".stkobj")
- }
- }
- }
}
// compileFunctions compiles all functions in compilequeue.