This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Repost: RFA [4.1]: improvement to if-conversion and cross-jumping (PR20070)
Joern RENNECKE <joern.rennecke@st.com> writes:
> +/* Check if *XP is equivalent to Y. Until an an unreconcilable difference is
> + found, use in-group changes with validate_change on *XP to make register
> + assignments agree. It is the (not necessarily direct) callers
> + responsibility to verify / confirm / cancel these changes, as appropriate.
> + RVALUE indicates if the processed piece of rtl is used as a destination, in
> + which case we can't have different registers being an input. Returns
> + nonzero if the two blocks have been identified as equivalent, zero otherwise.
> + RVALUE == 0: destination
> + RVALUE == 1: source
> + RVALUE == -1: source, ignore SET_DEST of SET / clobber. */
> +bool
> +rtx_equiv_p (rtx *xp, rtx y, int rvalue, struct equiv_info *info)
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.
I also find the comment to be somewhat unclear; what does it mean "to
make register assignments agree?"
Ian