------- Comment #5 from dann at godzilla dot ics dot uci dot edu 2007-01-28 22:04 ------- (In reply to comment #2) > i.e. it misses to initialize the temporary with the result. Otherwise you > can play with variants of the following patch:
Richard, have you tried to make this patch work? It seems that with all the work that goes into inlining now, this might help a bit by making some function bodies smaller and and allowing the inliner to better estimate the actual size... > > Index: gimplify.c > =================================================================== > *** gimplify.c (revision 114599) > --- gimplify.c (working copy) > *************** gimplify_return_expr (tree stmt, tree *p > *** 1111,1116 **** > --- 1111,1124 ---- > if (!result_decl > || aggregate_value_p (result_decl, TREE_TYPE (current_function_decl))) > result = result_decl; > + else if (/*is_gimple_formal_tmp_reg (TREE_OPERAND (ret_expr, 1)) > + ||*/ is_gimple_min_invariant (TREE_OPERAND (ret_expr, 1)) > + /*is_gimple_val (TREE_OPERAND (ret_expr, 1))*/) > + { > + TREE_OPERAND (stmt, 0) = TREE_OPERAND (ret_expr, 1); > + > + return GS_ALL_DONE; > + } > else if (gimplify_ctxp->return_temp) > result = gimplify_ctxp->return_temp; > else > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27798