This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Sibcalls and exceptions
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com
- Date: 25 Nov 2001 09:41:14 -0200
- Subject: Sibcalls and exceptions
- Organization: GCC Team, Red Hat
Mark,
I don't see why this patch:
2001-06-05 Mark Mitchell <mark@codesourcery.com>
* toplev.c (main): Disable sibling-call optimization if we are
handling exceptions.
is necessary. The following patches, installed long before yours:
2000-11-30 Richard Henderson <rth@redhat.com>
* calls.c (expand_call): Emit queued insns before creating
the tail recursion sequence.
2000-11-21 Richard Henderson <rth@redhat.com>
* c-common.c (c_unsafe_for_reeval): New function.
(add_c_tree_codes): Register it.
* c-common.h: Declare it.
* tree.c (lang_unsafe_for_reeval): New hook.
(unsafe_for_reeval): Call it.
* tree.h: Declare it.
were enough to fix a testcase I had for an old branch, without
disabling the optimization, and, in fact, they have also fixed the
problem reported in PR2975. I've just tried reverting your patch, and
I still could compile the testcase in PR2975 without any problems, and
didn't get any regressions on athlon-pc-linux-gnu. So, is this ok to
install, or is there any other reason I and the testsuite are missing
to keep sibcalls disabled in the presence of exceptions?
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* toplev.c (process_options): Don't force
flag_optimize_sibling_calls to zero just because exceptions are
enabled.
Index: gcc/toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.543
diff -u -p -r1.543 toplev.c
--- gcc/toplev.c 2001/11/23 02:05:19 1.543
+++ gcc/toplev.c 2001/11/25 11:32:08
@@ -4813,12 +4813,6 @@ process_options ()
warning ("-Wuninitialized is not supported without -O");
}
- /* We do not currently support sibling-call optimization in the
- presence of exceptions. See PR2975 for a test-case that will
- fail if we try to combine both of these features. */
- if (flag_exceptions)
- flag_optimize_sibling_calls = 0;
-
#ifdef OVERRIDE_OPTIONS
/* Some machines may reject certain combinations of options. */
OVERRIDE_OPTIONS;
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me