[PATCH] Remove define_function_unit

Paolo Bonzini paolo.bonzini@polimi.it
Tue Jul 20 15:22:00 GMT 2004


> I'm curious why you took out a lot of code in genattrtab.c that
> appears to be doing optimization of the attribute calculation
> functions.   If it wasn't being applied to all attributes, shouldn't it
> have been?  Perhaps it wasn't doing any good?

I was surprised too, but it is not used indeed outside expand_units.

My guess is that it was too expensive.  Attribute optimization is 
overall quite heavyweight, and the code I took out included some 
explicit band-aids that switch from exponential to polynomial complexity 
as the description becomes larger.  Maybe Kenner knows more, I 
understand that he wrote that stuff.

If I had a few spare (machine) cycles, I'd try removing attribute 
optimization at all; Michael Matz once tested bootstrap times and it was 
faster, but real compilation speed is different of course.  IIRC 
attribute optimization took about 30% of a genattrtab run, and it 
triplicates the lines of insn-attrtab.c for the i386 machine 
description.  Most of it should be performed by GCC itself by now, or 
can be added there.

Paolo



More information about the Gcc-patches mailing list