Commit e2ee9912 by Richard Henderson

calls.c (expand_call): Disable tail call generation once rtx_equal_function_value_matters is false.

        * calls.c (expand_call): Disable tail call generation once
        rtx_equal_function_value_matters is false.

        * reg-stack.c (convert_regs_1): Treat EDGE_ABNORMAL_CALL edges
        like EDGE_EH edges.

From-SVN: r33431
parent 1cfdcc15
2000-04-26 Jason Merrill <jason@casey.cygnus.com> 2000-04-25 Richard Henderson <rth@cygnus.com>
* calls.c (expand_call): Disable tail call generation once
rtx_equal_function_value_matters is false.
* reg-stack.c (convert_regs_1): Treat EDGE_ABNORMAL_CALL edges
like EDGE_EH edges.
2000-04-25 Jason Merrill <jason@casey.cygnus.com>
* dwarf2out.c (add_bound_info): Don't crash on an unexpanded SAVE_EXPR. * dwarf2out.c (add_bound_info): Don't crash on an unexpanded SAVE_EXPR.
......
...@@ -2106,11 +2106,18 @@ expand_call (exp, target, ignore) ...@@ -2106,11 +2106,18 @@ expand_call (exp, target, ignore)
pushed these optimizations into -O2. Don't try if we're already pushed these optimizations into -O2. Don't try if we're already
expanding a call, as that means we're an argument. Similarly, if expanding a call, as that means we're an argument. Similarly, if
there's pending loops or cleanups we know there's code to follow there's pending loops or cleanups we know there's code to follow
the call. */ the call.
If rtx_equal_function_value_matters is false, that means we've
finished with regular parsing. Which means that some of the
machinery we use to generate tail-calls is no longer in place.
This is most often true of sjlj-exceptions, which we couldn't
tail-call to anyway. */
try_tail_call = 0; try_tail_call = 0;
if (flag_optimize_sibling_calls if (flag_optimize_sibling_calls
&& currently_expanding_call == 1 && currently_expanding_call == 1
&& rtx_equal_function_value_matters
&& stmt_loop_nest_empty () && stmt_loop_nest_empty ()
&& ! any_pending_cleanups (1)) && ! any_pending_cleanups (1))
{ {
......
...@@ -2550,7 +2550,7 @@ convert_regs_1 (file, block) ...@@ -2550,7 +2550,7 @@ convert_regs_1 (file, block)
/* Care for EH edges specially. The normal return path may return /* Care for EH edges specially. The normal return path may return
a value in st(0), but the EH path will not, and there's no need a value in st(0), but the EH path will not, and there's no need
to add popping code to the edge. */ to add popping code to the edge. */
if (e->flags & EDGE_EH) if (e->flags & (EDGE_EH | EDGE_ABNORMAL_CALL))
{ {
/* Assert that the lifetimes are as we expect -- one value /* Assert that the lifetimes are as we expect -- one value
live at st(0) on the end of the source block, and no live at st(0) on the end of the source block, and no
......
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