This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fnew-ra -- which architectures?
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 15 Jul 2002 21:14:30 -0400 (EDT)
- Subject: Re: -fnew-ra -- which architectures?
On Mon, 15 Jul 2002, Daniel Berlin wrote:
> On 16 Jul 2002, Falk Hueffner wrote:
>
> > Daniel Berlin <dberlin@dberlin.org> writes:
> >
> > > > Thanks, this fixes the problem. Improvements are moderate on my test
> > > > case, though:
> > > >
> > > > number of stack writes
> > > > gcc -O1 0
> > > > Compaq Compiler 11 (the caller saved registers)
> > > > gcc -O3 119
> > > > gcc -O3 -fnew-ra 101
> > > >
> > > > Are you interested in the test case?
> > >
> > > SUre, if course like, though a 20% reduction is nothing to sneeze
> > > at.
> >
> > It would be great normally, but in this case, most or all of the
> > stores could be eliminated, as -O1 shows, and I had hoped the new
> > regalloc would manage that.
> I'll need to see the case.
Analyzed.
The problem is you have about 50-80 (i'm too lazy to count by hand)
registers that are live for, well, ever, and conflict with each other.
The reason why is pre-register allocator scheduling, which is why it
occurs at -O >= 2.
With no register pressure heuristics in the scheduler, it's making moves
that are *horrendous* for performance.
add -fno-schedule-insns, and even at -O3, you'll see *0* spills.
We *really* need register pressure heuristics in the scheduler.
--Dan