This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [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:54:16 -0400
- Subject: Re: [PATCH] Fix PR41313 by restoring original conditional logic
- References: <20091003012631.GA12949@bromo.med.uc.edu>
On Fri, Oct 02, 2009 at 09:26:31PM -0400, Jack Howarth wrote:
> 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
> ))))
This apears to be the original posting to gcc-patches concerning
the code in question...
http://gcc.gnu.org/ml/gcc-patches/2004-02/msg02617.html
Note the description...
* opts.c (decode_options): Code to handle new flag,
flag_reorder_blocks_and_partition; also to turn it off if
flag_exceptions is on.
(common_handle_option): Code to handle new flag,
flag_reorder_blocks_and_partition.
This behavior needs to be on the darwin target.
Jack