aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcov-util.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2022-09-19 19:08:10 +0200
committerJason Merrill <jason@redhat.com>2022-09-29 13:48:20 -0400
commit32b2eb59fb904926eff77811e08766a8ae6804a7 (patch)
treeb5d170cf847014cde68feb6c197515e3d9fdec99 /libgcc/libgcov-util.c
parentaf9034827e8f06f10767064e9fc7443b94e08184 (diff)
downloadgcc-32b2eb59fb904926eff77811e08766a8ae6804a7.zip
gcc-32b2eb59fb904926eff77811e08766a8ae6804a7.tar.gz
gcc-32b2eb59fb904926eff77811e08766a8ae6804a7.tar.bz2
c++: reduce temporaries in ?:
When the sides of ?: are class prvalues, we wrap the COND_EXPR in a TARGET_EXPR so that both sides will initialize the same temporary. But in this case we were stripping the outer TARGET_EXPR and conditionally creating different temporaries, unnecessarily using extra stack. The recently added TARGET_EXPR_NO_ELIDE flag avoids this. gcc/cp/ChangeLog: * call.cc (build_conditional_expr): Set TARGET_EXPR_NO_ELIDE on the outer TARGET_EXPR. gcc/testsuite/ChangeLog: * g++.dg/tree-ssa/cond-temp1.C: New test.
Diffstat (limited to 'libgcc/libgcov-util.c')
0 files changed, 0 insertions, 0 deletions