This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Jump optimizations (was Re: g77 performance on ALPHA)


  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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]