Commit 6f4a43e0 by Zack Weinberg

stmt.c (expand_return): If asked to return the RESULT_DECL, just call…

stmt.c (expand_return): If asked to return the RESULT_DECL, just call expand_value_return on result_rtl.

	* stmt.c (expand_return): If asked to return the RESULT_DECL,
	just call expand_value_return on result_rtl.

From-SVN: r85795
parent 1a186ec5
2004-08-10 Zack Weinberg <zack@codesourcery.com>
* stmt.c (expand_return): If asked to return the RESULT_DECL,
just call expand_value_return on result_rtl.
2004-08-10 Richard Henderson <rth@redhat.com> 2004-08-10 Richard Henderson <rth@redhat.com>
* builtins.def (BUILT_IN_STACK_ALLOC): Remove. * builtins.def (BUILT_IN_STACK_ALLOC): Remove.
...@@ -107,7 +112,7 @@ ...@@ -107,7 +112,7 @@
* config/arm/t-bpabi: New file. * config/arm/t-bpabi: New file.
* doc/tm.texi (TARGET_LIBGCC_FUNCS): New entry. * doc/tm.texi (TARGET_LIBGCC_FUNCS): New entry.
(TARGET_LIB_INT_CMP_BIASED): Likewise. (TARGET_LIB_INT_CMP_BIASED): Likewise.
2004-08-10 David Edelsohn <edelsohn@gnu.org> 2004-08-10 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000-protos.h (expand_block_clear): Declare. * config/rs6000/rs6000-protos.h (expand_block_clear): Declare.
...@@ -121,7 +126,7 @@ ...@@ -121,7 +126,7 @@
* varasm.c (unlikely_section_label): New global variable. * varasm.c (unlikely_section_label): New global variable.
(unlikely_text_section_name): New global variable. (unlikely_text_section_name): New global variable.
(text_section): Remove alignment statement. (text_section): Remove alignment statement.
(unlikely_text_section): Remove alignment statement; use (unlikely_text_section): Remove alignment statement; use
unlikely_section_label rather than hard-coded string. unlikely_section_label rather than hard-coded string.
(assemble_start_function): Initialize unlikely_section_label and (assemble_start_function): Initialize unlikely_section_label and
unlikely_text_section_name; make sure cold section is properly unlikely_text_section_name; make sure cold section is properly
...@@ -138,7 +143,7 @@ ...@@ -138,7 +143,7 @@
("*tmqi_mem"): Remove SUBREG from pattern. ("*tmqi_mem"): Remove SUBREG from pattern.
("*anddi3_cconly"): Prevent accidentally matching TM pattern. ("*anddi3_cconly"): Prevent accidentally matching TM pattern.
("*andsi3_cconly"): Likewise. ("*andsi3_cconly"): Likewise.
2004-08-10 H.J. Lu <hongjiu.lu@intel.com> 2004-08-10 H.J. Lu <hongjiu.lu@intel.com>
PR target/16909 PR target/16909
...@@ -171,9 +176,9 @@ ...@@ -171,9 +176,9 @@
* tree-cfg.c (bsi_insert_before, bsi_insert_after): Call modify_stmt * tree-cfg.c (bsi_insert_before, bsi_insert_after): Call modify_stmt
after linking stmt into the program. after linking stmt into the program.
(bsi_remove): Don't call modify_stmt. (bsi_remove): Don't call modify_stmt.
* tree-complex.c (update_complex_assignment, * tree-complex.c (update_complex_assignment,
expand_complex_comparison): Call modify_stmt after changing the stmt. expand_complex_comparison): Call modify_stmt after changing the stmt.
* tree-outof-ssa.c (rewrite_trees): Call modify_stmt only if not * tree-outof-ssa.c (rewrite_trees): Call modify_stmt only if not
removing the stmt. removing the stmt.
* tree-ssa-ccp.c (substitute_and_fold): Call modify_stmt after changing * tree-ssa-ccp.c (substitute_and_fold): Call modify_stmt after changing
the stmt, and only if needed. the stmt, and only if needed.
...@@ -182,14 +187,14 @@ ...@@ -182,14 +187,14 @@
(simplify_rhs_and_lookup_avail_expr): Don't take an annotation param. (simplify_rhs_and_lookup_avail_expr): Don't take an annotation param.
(simplify_cond_and_lookup_avail_expr): Use modify_stmt. (simplify_cond_and_lookup_avail_expr): Use modify_stmt.
(simplify_switch_and_lookup_avail_expr): Don't take an annotation param. (simplify_switch_and_lookup_avail_expr): Don't take an annotation param.
(eliminate_redundant_computations): Don't pass an annotation. Call (eliminate_redundant_computations): Don't pass an annotation. Call
modify_stmt rather than setting the annotation directly. modify_stmt rather than setting the annotation directly.
(record_equivalences_from_stmt): Remove unused local 'j'. (record_equivalences_from_stmt): Remove unused local 'j'.
(cprop_operand): Take a stmt rather than an annotation as a parameter. (cprop_operand): Take a stmt rather than an annotation as a parameter.
Call modify_stmt. Call modify_stmt.
(cprop_into_stmt): Pass stmt rather than annotation. (cprop_into_stmt): Pass stmt rather than annotation.
(update_rhs_and_lookup_avail_expr): Call modify_stmt. (update_rhs_and_lookup_avail_expr): Call modify_stmt.
* tree-ssa-loop-im.c (schedule_sm): Call get_stmt_ann rather than * tree-ssa-loop-im.c (schedule_sm): Call get_stmt_ann rather than
modify_stmt. modify_stmt.
* tree-ssa.c (propagate_into_addr): Dont call modify_stmt. * tree-ssa.c (propagate_into_addr): Dont call modify_stmt.
......
...@@ -1635,8 +1635,6 @@ expand_return (tree retval) ...@@ -1635,8 +1635,6 @@ expand_return (tree retval)
expand_null_return (); expand_null_return ();
return; return;
} }
else if (TREE_CODE (retval) == RESULT_DECL)
retval_rhs = retval;
else if ((TREE_CODE (retval) == MODIFY_EXPR else if ((TREE_CODE (retval) == MODIFY_EXPR
|| TREE_CODE (retval) == INIT_EXPR) || TREE_CODE (retval) == INIT_EXPR)
&& TREE_CODE (TREE_OPERAND (retval, 0)) == RESULT_DECL) && TREE_CODE (TREE_OPERAND (retval, 0)) == RESULT_DECL)
...@@ -1646,6 +1644,11 @@ expand_return (tree retval) ...@@ -1646,6 +1644,11 @@ expand_return (tree retval)
result_rtl = DECL_RTL (DECL_RESULT (current_function_decl)); result_rtl = DECL_RTL (DECL_RESULT (current_function_decl));
/* If we are returning the RESULT_DECL, then the value has already
been stored into it, so we don't have to do anything special. */
if (TREE_CODE (retval_rhs) == RESULT_DECL)
expand_value_return (result_rtl);
/* If the result is an aggregate that is being returned in one (or more) /* If the result is an aggregate that is being returned in one (or more)
registers, load the registers here. The compiler currently can't handle registers, load the registers here. The compiler currently can't handle
copying a BLKmode value into registers. We could put this code in a copying a BLKmode value into registers. We could put this code in a
...@@ -1653,9 +1656,9 @@ expand_return (tree retval) ...@@ -1653,9 +1656,9 @@ expand_return (tree retval)
call/return), but until this feature is generally usable it is kept here call/return), but until this feature is generally usable it is kept here
(and in expand_call). */ (and in expand_call). */
if (retval_rhs != 0 else if (retval_rhs != 0
&& TYPE_MODE (TREE_TYPE (retval_rhs)) == BLKmode && TYPE_MODE (TREE_TYPE (retval_rhs)) == BLKmode
&& REG_P (result_rtl)) && REG_P (result_rtl))
{ {
int i; int i;
unsigned HOST_WIDE_INT bitpos, xbitpos; unsigned HOST_WIDE_INT bitpos, xbitpos;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment