This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 03/12] more removal of ifdef HAVE_cc0
- From: Trevor Saunders <tbsaunde at tbsaunde dot org>
- To: Jeff Law <law at redhat dot com>
- Cc: tbsaunde+gcc at tbsaunde dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 21 Apr 2015 11:23:58 -0400
- Subject: Re: [PATCH 03/12] more removal of ifdef HAVE_cc0
- Authentication-results: sourceware.org; auth=none
- References: <1429622658-9034-1-git-send-email-tbsaunde+gcc at tbsaunde dot org> <1429622658-9034-4-git-send-email-tbsaunde+gcc at tbsaunde dot org> <553655D2 dot 40200 at redhat dot com>
On Tue, Apr 21, 2015 at 07:51:14AM -0600, Jeff Law wrote:
> On 04/21/2015 07:24 AM, tbsaunde+gcc@tbsaunde.org wrote:
> >From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
> >
> >gcc/ChangeLog:
> >
> >2015-04-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
> >
> > * combine.c (find_single_use): Remove HAVE_cc0 ifdef for code
> > that is trivially ded on non cc0 targets.
> > (simplify_set): Likewise.
> > (mark_used_regs_combine): Likewise.
> > * cse.c (new_basic_block): Likewise.
> > (fold_rtx): Likewise.
> > (cse_insn): Likewise.
> > (cse_extended_basic_block): Likewise.
> > (set_live_p): Likewise.
> > * rtlanal.c (canonicalize_condition): Likewise.
> > * simplify-rtx.c (simplify_binary_operation_1): Likewise.
> OK. I find myself wondering if the conditionals should look like
> if (HAVE_cc0
> && (whatever))
>
> But I doubt it makes any measurable difference. It's something we can
> always add in the future if we feel the need to avoid the runtime checks for
> things that aren't ever going to happen on most modern targets.
yeah, it seems reasonably likely the branch predictor can deal with
this for us (I tried to ensure things handled this way didn't do much
other than a compare). If not well that's what profiling is for :-)
Trev
>
> jeff
>