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: [PATCH] var-tracking.c speedups


Hi,

On Wed, 24 Jun 2009, Jakub Jelinek wrote:

> > > BTW, var-tracking.c calls rtx_equal_p in a weird way:
> > >                   if ((REG_P (vui[jj].lc->loc)
> > >                        && REG_P (node->loc)
> > >                        && REGNO (vui[jj].lc->loc) == REGNO (node->loc))
> > >                       || rtx_equal_p (vui[jj].lc->loc, node->loc))
> > > If that is because it doesn't care about REG mode, when it already knows
> > > that it is a REG it shouldn't call rtx_equal_p at all.
> > 
> > It has to ignore the mode.  A hardreg contains some new value no matter 
> > which mode it was in and no matter what mode the value currently in that
> > hardreg had.
> 
> Ok.  Still, if REG_P (vui[jj].lc->loc), then everything we wanted to check
> has been already checked, so the call to rtx_equal_p will return always
> false.

Well, yes, but if !REG_P you need to call it.  It's superfluous if REG_P, 
true.  I'm not arguing that your proposal wouldn't be an improvement, just 
explaining why it can't rely on only rtx_equal_p to do its work.


Ciao,
Michael.


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