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: rth@cygnus.com
- Subject: Re: Jump optimizations (was Re: g77 performance on ALPHA)
- From: John Wehle <john@feith.com>
- Date: Thu, 2 Sep 1999 16:23:02 -0400 (EDT)
- Cc: law@cygnus.com, torvalds@transmeta.com, gcc@gcc.gnu.org, toon@moene.indiv.nluug.nl, martin.kahlert@provi.de
> On Thu, Sep 02, 1999 at 02:56:32PM -0400, John Wehle wrote:
> > This patch handles:
> >
> > if (x < a)
> > goto l1;
> > .
> > goto l1:
> [...]
> > I'm playing with the notion of trying to handle:
> > if (x < a)
> > goto l2;
> > if (x >= a)
> > goto l1;
>
> I don't want to add anything like this to jump as-is.
Were you speaking of both cases, or just about:
l1:
if (x < a)
goto l2;
...
if (x >= a)
goto l1;
l2:
> If we were to handle this at all, it should be done with some
> form of value-range propogation, and it should be done on CFGs
> with global data flow. It'd be faster, catch more cases, and
> be generally more Correct. Much of the infrastructure exists
> in gcse.c and lcm.c if you want to work on this.
The gcse pass runs before loop. Are you suggesting adding another
pass, or just making jump smarter by using information and routines
supplied by gcse and lcm? Any feel for how useful value-range
propogation is (outside of fixing the unroll problem)?
> I certainly believe you'll get better return on investment by
> working on unroll.
Okay, I'll look closer at fixing this problem in unroll, though the gcse
and lcm stuff sounds interesting.
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------