This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cfgrtl
- From: law at redhat dot com
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 04 Feb 2002 13:11:05 -0700
- Subject: Re: cfgrtl
- Reply-to: law at redhat dot com
In message <20020204191500.GF26798@atrey.karlin.mff.cuni.cz>, Jan Hubicka
writes
> This should be removed by delete_dead_jumptables in flow.c.
That only happens when we're doing life analysis -- which we do not do every
time we optimize the CFG.
> At time of implementing try_redirect_edge_and_branch, the idea of deleting
> tablejump when existing instruction still may reference it looked very
> curious, so thats why it is in the code.
Huh? I don't follow.
The code in question is replacing a "complicated" jump with a simple jump. It
does so by first emitting the simple jump, then it deletes the complicated
jump via delete_insn_chain.
This leaves an unreferenced label and jump table in the insn stream that will
not be removed by any of the code in cfg*.c because the dead instructions
are actually outside basic blocks (remember, the label and jump table are
not in any basic block, they sit between basic blocks). My patch removes
the label & jump table after the only reference to them is removed.
> One of drawbacks of your sollution is the fact that we will create
> DELETED_LABEL note during delete_insn_chain that will not be elliminated
> and remaing in the soutput sequence.
That shouldn't be a significant problem. It's certainly less of a problem
than having an unreferenced jump table in the stream which in turn references
labels that were removed from the stream (on the assumption the unused jump
table would be removed).
jeff