diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-23 14:44:21 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-23 14:44:21 +0000 |
commit | ea523851e65ca645bcddff0657ed711cd846f9e6 (patch) | |
tree | 672b804a497a6d4d52b747f00969c6d7b30ebbfb /gcc/calls.c | |
parent | 44cb69ffb21cd8ef9163ffbc022ec4195f6201d9 (diff) | |
download | gcc-ea523851e65ca645bcddff0657ed711cd846f9e6.tar.gz |
PR c++/19317
Leave the return slot target in the MODIFY_EXPR rather than making
it an argument, but only use it if the CALL_EXPR has a flag set.
* tree.h (CALL_EXPR_HAS_RETURN_SLOT_ADDR): Rename to
CALL_EXPR_RETURN_SLOT_OPT.
* calls.c (expand_call): Adjust.
* tree-inline.c (expand_call_inline): Adjust.
* tree-pretty-print.c (dump_generic_node): Adjust.
And set the flag as appropriate.
* gimplify.c (gimplify_modify_expr_rhs): Set
CALL_EXPR_HAS_RETURN_SLOT_ADDR where the LHS is obviously safe.
* tree-nrv.c (execute_return_slot_opt): Set
CALL_EXPR_HAS_RETURN_SLOT_ADDR based on escape analysis.
* tree-pass.h: Declare pass_return_slot.
* tree-optimize.c (init_tree_optimization_passes): Add it.
* cp/semantics.c (simplify_aggr_init_expr): Use
CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101269 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 3c4cbf8949a..043888e6bde 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1964,17 +1964,7 @@ expand_call (tree exp, rtx target, int ignore) { struct_value_size = int_size_in_bytes (TREE_TYPE (exp)); - if (CALL_EXPR_HAS_RETURN_SLOT_ADDR (exp)) - { - /* The structure value address arg is already in actparms. - Pull it out. It might be nice to just leave it there, but - we need to set structure_value_addr. */ - tree return_arg = TREE_VALUE (actparms); - actparms = TREE_CHAIN (actparms); - structure_value_addr = expand_expr (return_arg, NULL_RTX, - VOIDmode, EXPAND_NORMAL); - } - else if (target && MEM_P (target)) + if (target && MEM_P (target) && CALL_EXPR_RETURN_SLOT_OPT (exp)) structure_value_addr = XEXP (target, 0); else { |