This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] for "Re: Compilation at -O3 Still Broken"
- From: ja2morri at csclub dot uwaterloo dot ca (James A. Morrison)
- To: Steven Bosscher <stevenb at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Ranjit Mathew <rmathew at gmail dot com>,rth at redhat dot com
- Date: 31 May 2004 21:29:20 -0400
- Subject: Re: [PATCH] for "Re: Compilation at -O3 Still Broken"
- References: <c9ekr8$bkl$1@sea.gmane.org> <200405312329.34253.stevenb@suse.de><200405312336.32244.stevenb@suse.de><200406010144.37668.stevenb@suse.de>
Steven Bosscher <stevenb@suse.de> writes:
> Hi,
>
> This fixes libjava's PR4766.java test case.
>
> We were removing labels that were still referenced
> from exception region structs. rth, are there other
> places you can think if that I've missed?
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu.
> OK for mainline?
>
> Gr.
> Steven
>
>
> * except.c (for_each_eh_region): New function.
> * except.h (for_each_eh_region): Add a prototype for it.
> * tree-cfg.c (update_eh_labels): New function, callback for
> for_each_eh_region.
> (label_for_bb): Make global static, unfortunately.
> (cleanup_dead_labels): Also update label references for
> exception regions.
>
> Index: except.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/except.c,v
> retrieving revision 1.271
> diff -c -3 -p -r1.271 except.c
> *** except.c 30 May 2004 07:12:48 -0000 1.271
> --- except.c 31 May 2004 21:53:42 -0000
> *************** for_each_eh_label_1 (void **pentry, void
> *** 2766,2771 ****
> --- 2766,2784 ----
> (*callback) (entry->label);
Should this be: callback (entry->label) ?
> return 1;
> }
> +
> + /* Invoke CALLBACK for every exception region in the current function. */
> +
> + void
> + for_each_eh_region (void (*callback) (struct eh_region *))
> + {
> + int i, n = cfun->eh->last_region_number;
> + for (i = 1; i <= n; ++i)
> + {
> + struct eh_region *region = cfun->eh->region_array[i];
> + (*callback) (region);
> + }
callback (region)?
--
Thanks,
Jim
http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim