mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: mark static slice backing arrays as noalg
file before after Δ % addr2line 4413296 4404160 -9136 -0.207% api 5982648 5978232 -4416 -0.074% asm 5075640 5057656 -17984 -0.354% buildid 2886200 2881304 -4896 -0.170% cgo 4854168 4844936 -9232 -0.190% compile 19694784 19680752 -14032 -0.071% cover 5278008 5269256 -8752 -0.166% dist 3699528 3690984 -8544 -0.231% doc 4694824 4690408 -4416 -0.094% fix 3411336 3411048 -288 -0.008% link 6721496 6703320 -18176 -0.270% nm 4371152 4357904 -13248 -0.303% objdump 4760960 4747680 -13280 -0.279% pack 2340824 2336520 -4304 -0.184% pprof 14810820 14801188 -9632 -0.065% test2json 2861896 2857528 -4368 -0.153% trace 11681076 11676228 -4848 -0.042% vet 8285464 8276184 -9280 -0.112% total 115824120 115665288 -158832 -0.137% Change-Id: I66e1985c3a81cd9b2aa72cb4b4a8aa1781e473b9 Reviewed-on: https://go-review.googlesource.com/c/go/+/228222 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
parent
34e38ac99f
commit
2222e0601a
1 changed files with 1 additions and 0 deletions
|
|
@ -217,6 +217,7 @@ func (s *InitSchedule) staticassign(l *Node, r *Node) bool {
|
||||||
// Init slice.
|
// Init slice.
|
||||||
bound := r.Right.Int64()
|
bound := r.Right.Int64()
|
||||||
ta := types.NewArray(r.Type.Elem(), bound)
|
ta := types.NewArray(r.Type.Elem(), bound)
|
||||||
|
ta.SetNoalg(true)
|
||||||
a := staticname(ta)
|
a := staticname(ta)
|
||||||
s.inittemps[r] = a
|
s.inittemps[r] = a
|
||||||
slicesym(l, a, bound)
|
slicesym(l, a, bound)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue