This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/859: sparc-specific pessimal code for simple loop
- To: Richard Henderson <rth at redhat dot com>
- Subject: Re: c/859: sparc-specific pessimal code for simple loop
- From: Bernd Schmidt <bernds at redhat dot com>
- Date: Wed, 22 Nov 2000 10:50:37 +0000 (GMT)
- cc: jakub at redhat dot com, davem at redhat dot com, gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, jbuck at synopsys dot com
On Tue, 21 Nov 2000, Richard Henderson wrote:
>
> Joe, as for the lack of strength-reduction here, this is something
> that I've mentioned before to Bernd. It is fallout from some code
> he wrote a while back to improve the overly aggressive GIV reduction
> problem on SMALL_REGISTER_CLASS machines. In response he outlined
> some thoughts on how to better to choose groups of GIVs to reduce.
> At the moment I don't recall what state that patch was in...
I wrote a patch, then found out while testing it that the problem is
quite a bit more complex than I'd thought.
The basic problem is, if we have a giv that is computed in several
steps, then usually the intermediate results are also givs. We usually
don't want to reduce the intermediate givs, but the final one. Suppose
we have
/ G2
G1- G3
\ G4- G5
\ G6
then the best candidates for reducing are G2, G3, G5, G6. The benefit
for reducing all four of them should include the benefit of reducing
G1 and G4, since these will no longer be necessary after reducing the
group G2,3,5,6. However, if we don't decide to reduce (e.g.) G5, then
G4 should be considered separately.
Interaction with giv combination makes this problem even more interesting.
I could make another attempt to get it right this or next week. I'd
welcome any suggestions for a good algorithm.
Bernd