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 1/n] Add conditional compare support


Hi,

On Wed, 18 Sep 2013, Zhenqiang Chen wrote:

> The patch is updated according to your comments. It is a basic support,
> which does not touch ifcombine and jump related optimizations yet.
> 
> Current method is:
> 1) In fold-const, if HAVE_conditional_compare, set
> LOGICAL_OP_NON_SHORT_CIRCUIT
>    to optimize_function_for_speed_p. So we do not depend on BRANCH_COST.
> 2) Identify CCMP during expanding. A CCMP candidate is a BIT_AND_EXPR
>    or BIT_IOR_EXPR, whose operators are compares.
> 3) Add a new op in optab to expand the CCMP to optimized RTL,

In addition to what Richi said, some comments on style/naming: Settle 
either on "ccmp" or "conditional_compare" (or some shorter variant) 
consistently, for the whole patch (as part of the patterns, as part of 
function names, as part of macro names).

+static bool
+is_conditional_compare_candidate_p (gimple g)
+{

Either is_<name> or <name>_p, choose one, not a mix.  RTL code (and me) 
prefers the _p variant.


Ciao,
Michael.


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