[PATCH] Fix hard reg scheduling across calls (was: Re: haifa memory abuse)

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Sat Nov 25 05:45:00 GMT 2000


On Saturday 25 November 2000 06:09, Richard Henderson wrote:
> On Sat, Nov 25, 2000 at 01:33:28AM +0100, Franz Sirl wrote:
> > I suspect the r0 CLOBBER inside the PARALLEL is not correctly taken
> > into consideration. What routine would be responsible for recognizing the
> > CLOBBER?
>
> sched_analyze_* are responsible for setting up all the dependancy
> chains.  If you'll send me the .i file it should be fairly easy to
> track down, though I probably won't get to it until tomorrow.

I think I found it. Now that reg_last_uses and friends are zapped on every 
call insn, we can no longer allow scheduling across calls for hard registers, 
since we have not enough information anymore. The patch makes hard regs and 
pseudos symmetric.

Most probably sched_analyze_2 needs a similar fix, there is currently the 
same asymmetry between hard regs and pseudos.

Testcase on powerpc-linux-gnu was init_emit_once() in gcc/emit-rtl.c, 
compiled with -O2.

Patch passed bootstrap on powerpc-linux-gnu, testsuite is currently running. 
I guess this may fix the problem Neil and Andris are seeing on i586 too.

OK to commit?

Franz.

	* haifa-sched.c (sched_analyze_1): Don't schedule hard regs across
	calls.



More information about the Gcc-patches mailing list