------- Additional Comments From law at redhat dot com  2004-10-18 18:31 -------
Subject: Re:  Missed jump threading
        optimization

On Mon, 2004-10-18 at 11:30, steven at gcc dot gnu dot org wrote:
> ------- Additional Comments From steven at gcc dot gnu dot org  2004-10-18 17:30 
> -------
> Diego told me to bug Law.  Obedient as I always am, I hereby 
> do so :-) 
>  
> Jeff, this is a missed jump threading opportunity, the default 
> case can be threaded here.  Any ideas how to fix this? 
I don't see a good way to fix this.  There's lots of interconnected
issues that would need to be addressed.

Clearly we need better range information so that we can determine
that i != 0 on the default case leaving the first switch statement
(or we would need to avoid collapsing empty cases to the default
label until expansion).

Second, we need to rewrite the jump threading selection code; that's
on the queue.  Specifically we need to drop the requirement that
the statements at the start of the intermediate block are nops.
The SSA update code is already prepared to handle this change, so
it really ought to be isolated in the jump threading selection
code.


Given those two improvements we'd have a chance of threading the
default case out of the first switch statement.

jeff





-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18046

Reply via email to