This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Fix PR rtl-optimization/20017.
- From: Roger Sayle <roger at eyesopen dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Kazu Hirata <kazu at cs dot umass dot edu>, <gcc-patches at gcc dot gnu dot org>, <aj at suse dot de>
- Date: Sat, 19 Feb 2005 17:14:24 -0700 (MST)
- Subject: Re: [patch] Fix PR rtl-optimization/20017.
On Sat, 19 Feb 2005, Zack Weinberg wrote:
> Kazu Hirata <email@example.com> writes:
> > 1. CSE folds the switch statement into an unconditional jump (but
> > does not remove the dead jump table). This new unconditoinal
> > jump happens to jump to the next block. Since CFG clean up
> > makes no change to CFG, it does not call delete_dead_jumptables.
> To my mind CSE should recognize that it has converted a switch
> statement into an unconditional jump and therefore call
> delete_dead_jumptables itself. Do you have any idea whether or not
> this is feasible?
I agree with Zack that the long term approach to removing these dead
jump tables should be to get rid of them at the point we modify/delete
the table jump instruction. This should avoid ever having to call
delete_dead_jumptables, which has to scan the entire RTL stream.
Instead there are only a handful of places that perform this kind
of transformation and they only have to peek at the end of the current
Like with ssa-form, I believe that we should slowly move the RTL
optimizers to updating some fraction of the CFG incrementally.
If thats too difficult for now, we can always apply your suggested