This is the mail archive of the gcc-bugs@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: c/859: sparc-specific pessimal code for simple loop


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


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