This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: surprising? register allocator performance in gcc 2.95.3
- To: redstone at cs dot washington dot edu (Joshua Redstone)
- Subject: Re: surprising? register allocator performance in gcc 2.95.3
- From: Joern Rennecke <amylaar at redhat dot com>
- Date: Sat, 9 Jun 2001 00:59:21 +0100 (BST)
- Cc: gcc at gcc dot gnu dot org, redstone at cs dot washington dot edu (Joshua Redstone)
> 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.
The register allocator makes no attempt to use fewer callee-saved registers
than are available. And since no shrink-wrapping is implemented, all of
callee-saved registers that are used need to be saved at the start of the
function, and restored at the end.