]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: remove OutData
authorCherry Zhang <cherryyz@google.com>
Tue, 21 Jul 2020 18:32:09 +0000 (14:32 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 21 Jul 2020 21:23:44 +0000 (21:23 +0000)
commitee8541e5b83252fd025ce0ef3f02b3abd23b80f5
tree9d9da6753acd2e9642071bc677f27fbd7d906a6f
parentbf1816c7b7a2519176784f26639968ea47cdeb0b
[dev.link] cmd/link: remove OutData

OutData was used for a symbol to point to its data in the output
buffer, in order to apply relocations. Now we fold relocation
application to Asmb next to symbol data writing. We can just pass
the output data as a local variable.

Linking cmd/compile,

name         old time/op    new time/op    delta
Asmb_GC        19.0ms ±10%    16.6ms ± 9%  -12.50%  (p=0.032 n=5+5)

name         old alloc/op   new alloc/op   delta
Asmb_GC        3.78MB ± 0%    0.14MB ± 1%  -96.41%  (p=0.008 n=5+5)

name         old live-B     new live-B     delta
Asmb_GC         27.5M ± 0%     23.9M ± 0%  -13.24%  (p=0.008 n=5+5)

Change-Id: Id870a10dce2a0a7447a05029c6d0ab39b47d0a12
Reviewed-on: https://go-review.googlesource.com/c/go/+/244017
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/link/internal/ld/asmb.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/link.go
src/cmd/link/internal/ld/outbuf.go
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/mips/asm.go
src/cmd/link/internal/mips64/asm.go