This is the mail archive of the 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]

surprising? register allocator performance in gcc 2.95.3

Hi.  I've been fiddling around with the -ffixed-[regnum]
option in gcc version 2.95.3 20010315 on my alpha 21264 (XP1000)
running Tru64 Unix 4.0f.  I was timing some SPECInt95 applications
and noticed something odd.

The Alpha has 32 integer architectural registers.  I compiled
the SPECInt95 applications to use either only 24 registers or
16 registers (by using multiple -ffixed- options).  I wanted
to roughly measure how badly performance degrades when the
compiler is prevented from using 1/4 or 1/2 of the registers.

Surprisingly, certain applications sped up when compiled to
use fewer registers. 4 of the 8 SPECInt95 applications sped
up between 2 and 5% when complied to use only 24 of the 32
integer registers.

Does anyone have any ideas why this might be?

I assume that this result is just an artifact of the
heuristic nature of register allocator, but was wondering if
anyone had any insights.



P.S. Here's how I compiled the applicatios to use only 24 of the
32 registers.

gcc -c -O3 -mcpu=ev6 -ffixed-\$1 -ffixed-\$2 -ffixed-\$3
  -ffixed-\$4 -ffixed-\$5 -ffixed-\$6 -ffixed-\$7 -ffixed-\$8
  -ffixed-\$f0 -ffixed-\$f1 -ffixed-\$f2 -ffixed-\$f3
  -ffixed-\$f4 -ffixed-\$f5 -ffixed-\$f6 -ffixed-\$f7

P.S.S  It'd be interesting to see if the same thing happesn with the new
       registers allocator in the new-regalloc branch..

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