]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: don't always load type symbols
authorCherry Zhang <cherryyz@google.com>
Wed, 4 Mar 2020 03:50:34 +0000 (22:50 -0500)
committerCherry Zhang <cherryyz@google.com>
Wed, 4 Mar 2020 16:07:49 +0000 (16:07 +0000)
commit6ae47d1354d1157bbc9868fc296bfc43ea5b9083
treec65e252b881896ff0990a29936b33f31475f19ae
parent4df1db99c4e50483215e207c9895d48fa6e4ad12
[dev.link] cmd/link: don't always load type symbols

The type symbols were always loaded in LoadFull, as the old
sym.Symbol-based DWARF generation needs them to present. Now we
have converted the DWARF type generation pass, which uses the
loader symbols directly. No need to load the type symbols if they
are not live.

This reduces loaded symbols by ~18% for cmd/compile.

Change-Id: Ic1f6fcdff845f3c62784d05ad716b1742f249481
Reviewed-on: https://go-review.googlesource.com/c/go/+/222018
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/link/internal/loader/loader.go