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]
Other format: [Raw text]

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


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