aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2005-06-23 10:44:21 -0400
committerJason Merrill <jason@gcc.gnu.org>2005-06-23 10:44:21 -0400
commitfa47911c5600725d7d72e224e4a61829267b00b9 (patch)
tree672b804a497a6d4d52b747f00969c6d7b30ebbfb /gcc/tree.h
parentf565b0a1a58554b7dd3cbd540f6dca295bd0cdbe (diff)
downloadgcc-fa47911c5600725d7d72e224e4a61829267b00b9.zip
gcc-fa47911c5600725d7d72e224e4a61829267b00b9.tar.gz
gcc-fa47911c5600725d7d72e224e4a61829267b00b9.tar.bz2
re PR c++/19317 (removing a temporary return value when we cannot)
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. From-SVN: r101269
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index c434f2f..831856d 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -337,7 +337,7 @@ struct tree_common GTY(())
TREE_PRIVATE in
..._DECL
- CALL_EXPR_HAS_RETURN_SLOT_ADDR in
+ CALL_EXPR_RETURN_SLOT_OPT in
CALL_EXPR
DECL_BY_REFERENCE in
PARM_DECL, RESULT_DECL
@@ -980,9 +980,9 @@ extern void tree_operand_check_failed (int, enum tree_code,
an exception. In a CALL_EXPR, nonzero means the call cannot throw. */
#define TREE_NOTHROW(NODE) ((NODE)->common.nothrow_flag)
-/* In a CALL_EXPR, means that the address of the return slot is part of the
- argument list. */
-#define CALL_EXPR_HAS_RETURN_SLOT_ADDR(NODE) ((NODE)->common.private_flag)
+/* In a CALL_EXPR, means that it's safe to use the target of the call
+ expansion as the return slot for a call that returns in memory. */
+#define CALL_EXPR_RETURN_SLOT_OPT(NODE) ((NODE)->common.private_flag)
/* In a RESULT_DECL or PARM_DECL, means that it is passed by invisible
reference (and the TREE_TYPE is a pointer to the true type). */