diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-01-09 23:56:54 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-01-09 23:56:54 +0000 |
commit | 7117ebbd34484609c88543527496d128014dc0d2 (patch) | |
tree | 2e759dfa0ae434d9a556946c8dabf9047e2fc444 /gcc/predict.c | |
parent | 4a59d4472b9a0a4c25c4483a03c71def7cb3aa8c (diff) | |
download | gcc-7117ebbd34484609c88543527496d128014dc0d2.zip gcc-7117ebbd34484609c88543527496d128014dc0d2.tar.gz gcc-7117ebbd34484609c88543527496d128014dc0d2.tar.bz2 |
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
From-SVN: r256412
Diffstat (limited to 'gcc/predict.c')
0 files changed, 0 insertions, 0 deletions