This is the mail archive of the
mailing list for the GCC project.
Re: [BENCH] Improvements to popping x87 stack in reg-stack.c
- From: Roger Sayle <roger at eyesopen dot com>
- To: Uros Bizjak <uros at kss-loka dot si>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 29 Nov 2004 07:12:51 -0700 (MST)
- Subject: Re: [BENCH] Improvements to popping x87 stack in reg-stack.c
On Mon, 29 Nov 2004, Uros Bizjak wrote:
> I have some benchmark numbers for povray-3.50c, with your patch for
> Unpatched povray:
> grep fxch povray | wc -l
> Patched povray:
> grep fxch bbb | wc -l
This observed increase in the number of fxch instructions is likely
another side-effect of reg-stack's lack of stack planning. Currently
most stacks are assigned in an "arbitrary permutation" left over from
the previous block. We've now altered this arbitrary random permutation,
so some basic blocks may see an increase in shuffling and others will
see a decrease. The compensation code on edges, though, is always
As I mentioned in a previous e-mail, I doubt there's anything that
can be done about this existing deficiency in gcc's 4.0 timeframe.
Indeed, the negligible performance improvements of my patch, would
appear to also make it unsuitable for 4.0.
> that double pop can be implemented using fcompp instruction
> (pentopt.pdf, page 126, section 19.1). As your patch groups FFREEs
> together, perhaps they can be implemented in the recommended way
> with fcompp?
This further optimization is certainly easier to implement following
this round of changes.