During the lowering phase, the variable arguments to a varargs call are packaged up into a temporary slice object; the storage for this slice was being unconditionally allocated on the heap. Heap allocation is not necessary, however, if the varargs call correspond to an "append", since the append runtime routine only reads the slice storage (as opposed to stashing away the storage pointer). Enhance the lowering code to keep the slice storage on the stack for append() calls, to improve performance. Addresses issue golang/go#17304. Reviewed-on: https://go-review.googlesource.com/30136 From-SVN: r240853
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
gofrontend | Loading commit data... | |
ChangeLog | Loading commit data... | |
Make-lang.in | Loading commit data... | |
README.gcc | Loading commit data... | |
config-lang.in | Loading commit data... | |
gccgo.texi | Loading commit data... | |
go-backend.c | Loading commit data... | |
go-c.h | Loading commit data... | |
go-gcc-diagnostics.cc | Loading commit data... | |
go-gcc.cc | Loading commit data... | |
go-lang.c | Loading commit data... | |
go-linemap.cc | Loading commit data... | |
go-location.h | Loading commit data... | |
go-sha1.cc | Loading commit data... | |
go-system.h | Loading commit data... | |
gospec.c | Loading commit data... | |
lang-specs.h | Loading commit data... | |
lang.opt | Loading commit data... |