aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-06-04 13:20:35 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-06-04 13:20:35 -0700
commit1696785eabbaabfbc6615177fd150589a894e743 (patch)
treeb6a449952428dd425e1dd64b2a2783a7d8f2379f /gcc
parent2846f342f96b63bf3e565a8462d4c059f6a36743 (diff)
downloadgcc-1696785eabbaabfbc6615177fd150589a894e743.zip
gcc-1696785eabbaabfbc6615177fd150589a894e743.tar.gz
gcc-1696785eabbaabfbc6615177fd150589a894e743.tar.bz2
sibcall.c (optimize_sibling_and_tail_recursive_call): Suppress optimization if current_function_calls_setjmp.
* sibcall.c (optimize_sibling_and_tail_recursive_call): Suppress optimization if current_function_calls_setjmp. From-SVN: r42880
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/sibcall.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b835dd9..0fb8a8c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-04 Richard Henderson <rth@redhat.com>
+
+ * sibcall.c (optimize_sibling_and_tail_recursive_call): Suppress
+ optimization if current_function_calls_setjmp.
+
2001-06-04 Joseph S. Myers <jsm28@cam.ac.uk>
* doc/c-tree.texi: Fix documentation of TREE_STRING_LENGTH for
diff --git a/gcc/sibcall.c b/gcc/sibcall.c
index 53ce431..eefe080 100644
--- a/gcc/sibcall.c
+++ b/gcc/sibcall.c
@@ -617,11 +617,15 @@ optimize_sibling_and_tail_recursive_calls ()
/* See if there are any reasons we can't perform either sibling or
tail call optimizations. We must be careful with stack slots
- which are live at potential optimization sites. ?!? The first
+ which are live at potential optimization sites. ??? The first
test is overly conservative and should be replaced. */
if (frame_offset
/* Can't take address of local var if used by recursive call. */
|| current_function_uses_addressof
+ /* Any function that calls setjmp might have longjmp called from
+ any called function. ??? We really should represent this
+ properly in the CFG so that this needn't be special cased. */
+ || current_function_calls_setjmp
/* Can't if more than one successor or single successor is not
exit block. These two tests prevent tail call optimization
in the presense of active exception handlers. */