Commit 3431f196 by Jim Wilson Committed by Jim Wilson

Fix 3 ia64 g++ testsuite failures, and groff miscompilation.

	* optimize.c (expand_call_inline): Emit the return label before
	evaluating the return value.

From-SVN: r32169
parent 0268c501
Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
* optimize.c (expand_call_inline): Emit the return label before
evaluating the return value.
2000-02-24 Mark Mitchell <mark@codesourcery.com>
* lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
......
......@@ -39,11 +39,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
are not needed.
o Provide heuristics to clamp inlining of recursive template
calls?
calls? */
o It looks like the return label is not being placed in the optimal
place. Shouldn't it come before the returned value? */
/* Data required for function inlining. */
typedef struct inline_data
......@@ -644,6 +641,13 @@ expand_call_inline (tp, walk_subtrees, data)
STMT_EXPR_STMT (expr)
= chainon (STMT_EXPR_STMT (expr), scope_stmt);
/* After the body of the function comes the RET_LABEL. This must come
before we evaluate the returned value below, because that evalulation
may cause RTL to be generated. */
STMT_EXPR_STMT (expr)
= chainon (STMT_EXPR_STMT (expr),
build_min_nt (LABEL_STMT, id->ret_label));
/* Finally, mention the returned value so that the value of the
statement-expression is the returned value of the function. */
STMT_EXPR_STMT (expr) = chainon (STMT_EXPR_STMT (expr), use_stmt);
......@@ -652,11 +656,6 @@ expand_call_inline (tp, walk_subtrees, data)
splay_tree_delete (id->decl_map);
id->decl_map = st;
/* After the body of the function comes the RET_LABEL. */
STMT_EXPR_STMT (expr)
= chainon (STMT_EXPR_STMT (expr),
build_min_nt (LABEL_STMT, id->ret_label));
/* The new expression has side-effects if the old one did. */
TREE_SIDE_EFFECTS (expr) = TREE_SIDE_EFFECTS (t);
......
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