This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Fix PR45051


On Wed, 28 Jul 2010, Bernd Schmidt wrote:
> On 07/28/2010 03:46 AM, Hans-Peter Nilsson wrote:
> > The SI r8/r9 ones (subreg, right) are arguably fishy, probably
> > related to FRAME_POINTER_REGNUM = r8 (i.e. using an eliminable
> > non-fixed register like m68k, not using a fake virtual register
> > like most other ports).  I believe IRA (or at least Vlad)
> > doesn't like that; see
> > <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41085#c2>.
> >
> > If you'd care to elaborate or confirm that your observation was
> > along those lines, it'd help.  Thanks.
>
> Huh, interesting.  Not sure about whether using a real reg as
> FRAME_POINTER_REGNUM is a problem, but I'd change it since eliminating a
> dummy reg into the hard frame pointer is pretty much standard practice
> these days and IMO somewhat cleaner.

IMO still not much cleanliness in each port doing that, it could
and should be handled by the generic parts of gcc, that and
similarly ARG_POINTER_REGNUM. ...but no, no such generic patch
forthcoming. :)

I do plan to "do what [almost] everybody else does" (it's not
that many lines for one), just want to have PR41085 fixed before
covering it up finally.  The below would answer any remaining
"does it actually pessimize code" question, assuming your patch
goes in unmodified.

> Also, have a look at
>
> http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00756.html

Wow, right on spot.

> The patch won't do anything on your port due to the FRAME_POINTER_REGNUM
> definition, but you could try deleting the entire if statement to see if
> that makes the unnecessary reloads go away.

As expected, it does make them go away.  Is there any point in
that if-statement, given the REG_CANNOT_CHANGE_MODE_P guard in
the if-statement above it?

Thanks.

brgds, H-P


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