This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Fix gcc.misc-tests/bprob-1.c [patch]
- From: law at redhat dot com
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 31 Jan 2003 09:48:19 -0700
- Subject: Re: [tree-ssa] Fix gcc.misc-tests/bprob-1.c [patch]
- Reply-to: law at redhat dot com
In message <20030131163228.GB24389@tornado.toronto.redhat.com>, Diego Novillo w
rites:
>This fixes the regression that Jeff spotted yesterday. The
>problem was that now that we coalesce labels, the CFG cleanup
>pass was missing live labels because it only checked the first
>label in each block. This code:
>
> switch (4)
> {
> case 1:
> ...
> break;
>
> case 3:
> case 4:
> ...
> break;
> }
>
>would get wiped out because the 'case 4' label is not first in
>the block.
>
>Bootstrapped and tested on x86.
>
>
>Diego.
>
>
>
> * tree-cfg.c (find_taken_edge_cond_expr): New function.
> (find_taken_edge_switch_expr): New function.
> (value_matches_some_label): New function.
> (find_taken_edge): Re-structure to use the three new functions.
Which makes me wonder if this is why the compiler was able to
compile insn-attrtab.c faster after the coalescing patch. If we
were incorrectly wiping out code, then, well there'd be less for
the backend optimizers (particularly gcse) to do...
jeff