This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR41313 by restoring original conditional logic
- From: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: mrs at apple dot com, jakub at redhat dot com
- Date: Fri, 2 Oct 2009 21:26:31 -0400
- Subject: [PATCH] Fix PR41313 by restoring original conditional logic
The commit of r150553 broke the original logic of the conditionals
testing when partitioning optimization should be disabled on darwin.
This was originally introduced in...
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/opts.c.diff?r1=1.63&r2=1.64
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/opts.c.diff?r1=1.98&r2=1.99
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/opts.c.diff?r1=1.104&r2=1.105
as well as other commits.
The patch below restores the original conditional logic by checking
for either TARGET_UNWIND_INFO or DWARF2_UNWIND_INFO so that the first
section of the conditional can function as before r150553 on darwin.
This patch eliminates the failures in the g++.dg/tree-prof/partition1.C
on x86_640-apple-darwin10 since hot/cold partitioning is properly
disabled for exception handling on darwin as before r150553. Bootstrap
and regession tested on x86_64-apple-darwin10. Okay for gcc trunk?
Jack
2009-10-02 Jack Howarth <howarth@bromo.med.uc.edu>
PR c++/41313
* gcc/opts.c: Allow -freorder-blocks-and-partition with
exceptions, unless SJLJ or TARGET_UNWIND_INFO or
DWARF2_UNWIND_INFO to restore original behavior on darwin.
Index: gcc/opts.c
===================================================================
--- gcc/opts.c (revision 152424)
+++ gcc/opts.c (working copy)
@@ -1039,7 +1039,7 @@
if (flag_exceptions && flag_reorder_blocks_and_partition
&& (USING_SJLJ_EXCEPTIONS
-#ifdef TARGET_UNWIND_INFO
+#if defined (TARGET_UNWIND_INFO) || defined (DWARF2_UNWIND_INFO)
|| 1
#endif
))
@@ -1056,7 +1056,7 @@
if (flag_unwind_tables && ! targetm.unwind_tables_default
&& flag_reorder_blocks_and_partition
&& (USING_SJLJ_EXCEPTIONS
-#ifdef TARGET_UNWIND_INFO
+#if defined (TARGET_UNWIND_INFO) || defined (DWARF2_UNWIND_INFO)
|| 1
#endif
))
@@ -1075,7 +1075,7 @@
&& (!targetm.have_named_sections
|| (flag_unwind_tables && targetm.unwind_tables_default
&& (USING_SJLJ_EXCEPTIONS
-#ifdef TARGET_UNWIND_INFO
+#if defined (TARGET_UNWIND_INFO) || defined (DWARF2_UNWIND_INFO)
|| 1
#endif
))))