-
- Downloads
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
Showing
- gcc/ChangeLog 19 additions, 0 deletionsgcc/ChangeLog
- gcc/calls.c 1 addition, 11 deletionsgcc/calls.c
- gcc/cp/ChangeLog 6 additions, 0 deletionsgcc/cp/ChangeLog
- gcc/cp/semantics.c 12 additions, 19 deletionsgcc/cp/semantics.c
- gcc/gimplify.c 40 additions, 0 deletionsgcc/gimplify.c
- gcc/testsuite/g++.dg/opt/nrv9.C 28 additions, 0 deletionsgcc/testsuite/g++.dg/opt/nrv9.C
- gcc/tree-inline.c 8 additions, 10 deletionsgcc/tree-inline.c
- gcc/tree-nrv.c 76 additions, 0 deletionsgcc/tree-nrv.c
- gcc/tree-optimize.c 1 addition, 0 deletionsgcc/tree-optimize.c
- gcc/tree-pass.h 1 addition, 0 deletionsgcc/tree-pass.h
- gcc/tree-pretty-print.c 2 additions, 2 deletionsgcc/tree-pretty-print.c
- gcc/tree.h 4 additions, 4 deletionsgcc/tree.h
Loading
Please register or sign in to comment