r256412 - in /trunk/gcc/go/gofrontend: MERGE ex...
ian@gcc.gnu.org
ian@gcc.gnu.org
Tue Jan 9 23:56:00 GMT 2018
Author: ian
Date: Tue Jan 9 23:56:54 2018
New Revision: 256412
URL: https://gcc.gnu.org/viewcvs?rev=256412&root=gcc&view=rev
Log:
compiler: use temporary variable for stack allocation
Currently, allocation expression that can be allocated on stack
is implemented with __builtin_alloca, which turns into
__morestack_allocate_stack_space, which may call C malloc. This
may be slow. Also if this happens during certain runtime
functions (e.g. write barrier), bad things might happen (when
the escape analysis is enabled for the runtime). Make a temporary
variable on stack for the allocation instead.
Also remove the write barrier in the assignment in building heap
expression when it is stack allocated.
Reviewed-on: https://go-review.googlesource.com/86242
Modified:
trunk/gcc/go/gofrontend/MERGE
trunk/gcc/go/gofrontend/expressions.cc
More information about the Gcc-cvs
mailing list