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]

Re: egcs build report


| The only difference in performance is the extra time needed to link the larger
| object files.  I've seen SGI compilers with a similar option, where -g means
| turn off optimization, and -g2 means leave it on and accept the loss of some
| information.  This is one of the advantages of gcc/g77, that it is one of the
| fastest running compilers with debug.

That's true in general for almost all normal machines, but on VLIW machines,
such as the m32r, turning on -g does affect performance.  The reason is for
this machine class, instructions can be smaller than the fixed size instruction
word (on the m32r, instructions are either 16 bits or 32 bits, and each 32 bits
is an instruction word).  Thus, when the compiler wants to drop in a label to
mark where a statement begins, it might force the assembler to fill the current
instruction word with a nop, which means the code is bigger (ie, icache less
effective), and things might not execute in parallel like they might otherwise
(this doesn't affect the m32r, but does affect some other VLIW machines I've
done ports for).  Given the few public details about it, I suspect EPIC (ie,
Merced) will probably have the same problem (3 instructions in a 128 bit
instruction bundle).

--
Michael Meissner, Cygnus Solutions (Massachusetts office)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA
meissner@cygnus.com,	617-354-5416 (office),	617-354-7161 (fax)



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