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: Repost: RFA [4.1]: improvement to if-conversion and cross-jumping (PR20070)


Joern RENNECKE <joern.rennecke@st.com> writes:

> Ian Lance Taylor wrote:
> 
> >I think that it's very unwise to have a function named rtx_equiv_p
> >which makes changes to its operands.  The "_p" suffix implies that the
> >function is a predicate.  Predicates should never change their
> >operands.  The name rtx_equiv_p strongly suggests a function which
> >tests whether two rtx variables are equivalent.  That is not what this
> >function does.
> >
> Bernd asked for *_p names for these functions in:
> http://gcc.gnu.org/ml/gcc-patches/2005-11/msg02031.html .
> 
> Can you please discuss this with him and then tell me what consensus
> you reached (if any).

Basically I think rtx_equiv_p is a really bad name for a function
which is quite different from rtx_equal_p.

And, more generally, I think predicates shouldn't modify their
arguments.

Bernd, any comments?

> >I also find the comment to be somewhat unclear; what does it mean "to
> >make register assignments agree?"
> >
> For registers that are dead at the end, it means to make them identical.
> For registers that are live at the end and not written to within the
> block, it means to replace the original register in *xp with a
> placeholder register INFO->input_reg.

Can we put something like that in the comment?  Or is the algorithm
described in some other comment somewhere?

Ian


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