This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Jump optimizations (was Re: g77 performance on ALPHA)
- To: John Wehle <john at feith dot com>
- Subject: Re: Jump optimizations (was Re: g77 performance on ALPHA)
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 02 Sep 1999 13:19:14 -0600
- cc: torvalds at transmeta dot com, gcc at gcc dot gnu dot org, toon at moene dot indiv dot nluug dot nl, rth at cygnus dot com, martin dot kahlert at provi dot de
- Reply-To: law at cygnus dot com
In message <199909021856.OAA08487@jwlab.FEITH.COM>you write:
> "thread_jumps" handles conditional jumps to conditional jumps.
> For example:
>
> if (x < a)
> goto l1;
> .
> .
> .
> l1:
> if (x < a)
> goto l2;
> .
> .
> .
> l2:
>
> This patch handles:
>
> if (x < a)
> goto l1;
> .
> .
> .
> if (x < a)
> goto l1:
> .
> .
> .
> l1:
>
> Which is isn't a case of needing to thread jumps though it's similar.
Similar enough that I would think you could get this optimization with a simple
change to thread jumps. But maybe I'm wrong.
> I'm playing with the notion of trying to handle:
>
> if (x < a)
> goto l2;
> l1:
> if (x < a)
> goto l2;
> .
> .
> .
> if (x >= a)
> goto l1;
> l2:
>
> However, it's not clear to me if these optimizations are useful outside
> of cleaning up unrolling, in which case perhaps the time is better spent
> making unroll smarter.
value range propagation.
jeff