This is the mail archive of the
mailing list for the GCC project.
RE: [PATCH 1/n] Add conditional compare support
- From: Michael Matz <matz at suse dot de>
- To: Zhenqiang Chen <zhenqiang dot chen at arm dot com>
- Cc: 'Richard Biener' <richard dot guenther at gmail dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 18 Sep 2013 17:00:32 +0200 (CEST)
- Subject: RE: [PATCH 1/n] Add conditional compare support
- Authentication-results: sourceware.org; auth=none
- References: <000001ce9e58$6dadf230$4909d690$ at arm dot com> <CAFiYyc25hLxrAnsOXbfqYo=Rsw_MDopxb66bygfac-CEsffOEw at mail dot gmail dot com> <521C9406 dot 6050901 at arm dot com> <CAFiYyc0zrBBUvRF0Vmv5PyvypfK75QYuc3D9AMTE+Fkh3nCq4Q at mail dot gmail dot com> <000001ceb453$ceaea3c0$6c0beb40$ at arm dot com>
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
> 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).
+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.