This is the mail archive of the gcc-patches@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: Speed up genattrtab


On 06/15/2010 07:57 PM, Dave Korn wrote:
On 15/06/2010 18:19, Mark Mitchell wrote:
Michael Matz wrote:

This speeds up genattrtab to be no time issue during bootstrap anymore.

The speed difference
of the compiler is acceptable I think, actually even speeding up the
compiler sometimes (probably cache effects, because the .text size of
insn-attrtab is _much_ smaller) or being in the noise.

I certainly see how this benefits us as GCC developers.

90 seconds out of a whole build, or did I misread something?

90 seconds out of "touch something.md; make cc1" is significant. It's the most sensitive part for day-to-day backend development.


Here is Michael's data reformatted:

	big_u			kde_u		
	clean	try		clean	try	
alpha	43.21	43.26   0.12%	32.52	32.50  -0.06%
arm	49.25	49.85   1.22%	37.89	38.10   0.55%
crisv32	36.17	36.21   0.11%	27.33	27.43   0.37%
hppa	46.77	46.97   0.43%	31.97	31.84  -0.41%
i386	33.51	33.78   0.81%	29.93	30.12	 0.63%
ia64	66.55	66.62   0.11%	49.81	49.81	 0.00%
mips	51.23	50.77  -0.90%			
powerpc	49.74	49.38  -0.72%	34.15	34.71	 1.64%
s390x	47.26	47.41   0.32%	32.83	33.64	 2.47%
sh	50.99	50.79  -0.39%	38.09	38.13	 0.11%
sparc	44.21	43.27  -2.13%	32.98	32.93	-0.15%
x86_64	28.78	28.96   0.63%	28.72	28.96	 0.84%

It's a tougher call than it seems... Unfortunately, of the four likely most used platforms (i386, x86_64, mips and arm) three are degraded consistently, and the fourth lacks one of the two data points. That's indeed not too good. :-/

Compiling genattrtab at -O1 saves half of the time on x86_64, and cfgcleanup goes from 20 to 0.7 seconds. So it should be worthwhile investigating _which_ cfgcleanup pass is spending so much time. Compiling insn-recog.c at -O1 instead saves 30% of the compilation time.

I used to like Michael's patches a lot but nowadays parallelization of the build is much better thanks to more cores in the systems. Since genattrtab can run in parallel with most of the rest of the build, what we need to save time on is "touch x.md; make -j6 cc1" (with the insn-attrtab.c move-if-changed rule disabled of course). Maybe -O1 is enough together with Jakub's old patch to split insn-attrtab.c into four or eight files. Moreover, the "split" idea could be applied to insn-recog.c too.

Michael, can you get numbers for your testcases when you compile "clean" insn-attrtab.c and/or insn-recog.c with -O1?

Paolo


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