Commit 7cc8342c by Richard Henderson Committed by Richard Henderson

stmt.c (expand_return): Remove always true predicate.

        * stmt.c (expand_return): Remove always true predicate.
        (expand_decl_cleanup_no_eh): Remove dead code.

From-SVN: r40916
parent ca3c1028
2001-03-27 Richard Henderson <rth@redhat.com> 2001-03-27 Richard Henderson <rth@redhat.com>
* stmt.c (expand_return): Remove always true predicate.
(expand_decl_cleanup_no_eh): Remove dead code.
* sched-deps.c (sched_analyze_insn): Consolidate scheduling * sched-deps.c (sched_analyze_insn): Consolidate scheduling
barrier code. Add a scheduling barrier if a non-call insn barrier code. Add a scheduling barrier if a non-call insn
can throw internally. can throw internally.
......
...@@ -2922,7 +2922,6 @@ expand_return (retval) ...@@ -2922,7 +2922,6 @@ expand_return (retval)
rtx result_rtl; rtx result_rtl;
register rtx val = 0; register rtx val = 0;
tree retval_rhs; tree retval_rhs;
int cleanups;
/* If function wants no value, give it none. */ /* If function wants no value, give it none. */
if (TREE_CODE (TREE_TYPE (TREE_TYPE (current_function_decl))) == VOID_TYPE) if (TREE_CODE (TREE_TYPE (TREE_TYPE (current_function_decl))) == VOID_TYPE)
...@@ -2933,17 +2932,6 @@ expand_return (retval) ...@@ -2933,17 +2932,6 @@ expand_return (retval)
return; return;
} }
/* Are any cleanups needed? E.g. C++ destructors to be run? */
/* This is not sufficient. We also need to watch for cleanups of the
expression we are about to expand. Unfortunately, we cannot know
if it has cleanups until we expand it, and we want to change how we
expand it depending upon if we need cleanups. We can't win. */
#if 0
cleanups = any_pending_cleanups (1);
#else
cleanups = 1;
#endif
if (retval == error_mark_node) if (retval == error_mark_node)
{ {
/* Treat this like a return of no value from a function that /* Treat this like a return of no value from a function that
...@@ -2962,9 +2950,7 @@ expand_return (retval) ...@@ -2962,9 +2950,7 @@ expand_return (retval)
else else
retval_rhs = NULL_TREE; retval_rhs = NULL_TREE;
/* Only use `last_insn' if there are cleanups which must be run. */ last_insn = get_last_insn ();
if (cleanups || cleanup_label != 0)
last_insn = get_last_insn ();
/* Distribute return down conditional expr if either of the sides /* Distribute return down conditional expr if either of the sides
may involve tail recursion (see test below). This enhances the number may involve tail recursion (see test below). This enhances the number
...@@ -3108,11 +3094,10 @@ expand_return (retval) ...@@ -3108,11 +3094,10 @@ expand_return (retval)
expand_value_return (result_reg); expand_value_return (result_reg);
} }
else if (cleanups else if (retval_rhs != 0
&& retval_rhs != 0 && !VOID_TYPE_P (TREE_TYPE (retval_rhs))
&& !VOID_TYPE_P (TREE_TYPE (retval_rhs)) && (GET_CODE (result_rtl) == REG
&& (GET_CODE (result_rtl) == REG || (GET_CODE (result_rtl) == PARALLEL)))
|| (GET_CODE (result_rtl) == PARALLEL)))
{ {
/* Calculate the return value into a temporary (usually a pseudo /* Calculate the return value into a temporary (usually a pseudo
reg). */ reg). */
...@@ -4122,25 +4107,6 @@ expand_decl_cleanup (decl, cleanup) ...@@ -4122,25 +4107,6 @@ expand_decl_cleanup (decl, cleanup)
return 1; return 1;
} }
/* Like expand_decl_cleanup, but suppress generating an exception handler
to perform the cleanup. */
#if 0
int
expand_decl_cleanup_no_eh (decl, cleanup)
tree decl, cleanup;
{
int save_eh = using_eh_for_cleanups_p;
int result;
using_eh_for_cleanups_p = 0;
result = expand_decl_cleanup (decl, cleanup);
using_eh_for_cleanups_p = save_eh;
return result;
}
#endif
/* Arrange for the top element of the dynamic cleanup chain to be /* Arrange for the top element of the dynamic cleanup chain to be
popped if we exit the current binding contour. DECL is the popped if we exit the current binding contour. DECL is the
associated declaration, if any, otherwise NULL_TREE. If the associated declaration, if any, otherwise NULL_TREE. If the
......
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