This is the mail archive of the gcc@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: reg+reg addressing mode on SPARC


Joe Buck <jbuck@synopsys.com> writes:

  > > GCC seems to be using the reg+reg addressing mode quite a lot, even 
  > > when it's not a clear win. 
  > 
  > There is already a GNATS bug for the pessimal code we get for simple
  > Fortran-style loops in C/C++ on the Sparc (c++/2430).  This bad code has been
  > there for a while, and has the interesting effect that the Stepanov
  > benchmark reports a score below 1 on the Sparc (since the simple loop
  > is misoptimized but the more complex loops are not).
  > 
  > I'm not sure that the problem is addressing mode selection, though.
  > Seems to me that the failure may be at a higher level, having to do with
  > hoisting invariants out of loops.

That might as well be. 
Also if ADDRESS_COST means what I think it means, then it's not quite
right that reg+reg, reg+int or just reg all have the same cost: 1.
What do you think? 

        --dan


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