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: Use cbranch optabs in ifcvt.c


On 08/24/2015 05:20 AM, Richard Sandiford wrote:
Similarly to the patch for cmpstr(n), this patch uses the optabs
interface for cbranchcc4 instead of using HAVE_cbranchcc4 directly.
I've cached the result in a pass-local variable (valid only for
the duration of the pass).

The references to incscc and decscc are dead.  The only reference
to them in the documentation is:

     Some machines can also perform @code{and} or @code{plus} operations on
     condition code values with less instructions than the corresponding
     @samp{cstore@var{mode}4} insn followed by @code{and} or @code{plus}.  On those
     machines, define the appropriate patterns.  Use the names @code{incscc}
     and @code{decscc}, respectively, for the patterns which perform
     @code{plus} or @code{minus} operations on condition code values.  See
     @file{rs6000.md} for some examples.  The GNU Superoptimizer can be used to
     find such instruction sequences on other machines.

which is in tm.texi rather than md.texi.  This seems hopelessly out of
date, not least because rs6000.md has no incscc or decscc patterns.
If the "appropriate patterns" are just combine patterns, perhaps we
should just delete the whole paragraph?
I think the whole paragraph should just go away. We don't do anything with those special patterns anymore. The PA still defines them, but they're just combiner patterns in the end.





Tested on x86_64-linux-gnu.  OK to install?

Thanks,
Richard

gcc/
	* ifcvt.c (HAVE_incscc, HAVE_decscc, HAVE_cbranchcc4): Delete.
	(have_cbranchcc4): New variable.
	(cc_in_cond, noce_emit_cmove, noce_get_alt_condition)
	(noce_get_condition): Use it instead of HAVE_cbranchcc4.
	(if_convert): Initialize have_cbranchcc4.
OK.
jeff


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