From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88072 invoked by alias); 6 Nov 2015 09:13:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 88061 invoked by uid 89); 6 Nov 2015 09:13:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 X-HELO: mail-qg0-f53.google.com Received: from mail-qg0-f53.google.com (HELO mail-qg0-f53.google.com) (209.85.192.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 06 Nov 2015 09:13:34 +0000 Received: by qgad10 with SMTP id d10so86970418qga.3 for ; Fri, 06 Nov 2015 01:13:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=44/06Do+NBrZEsVHVDifG5XLR5oh1T9JtqU+UKbM2Fw=; b=cfhYHB9fHyr9ZlqxMqp/iaQt1idTOo1F1Dl0eeR6iOFFWeQ2r3YL1a+caS5chVeEhW W+IYRwrTM4OA2mdbimraOd4c4xJfvRHP75/NJ1Hd4Yr1OfTfkzOuY/eYe/aJ4cwZ9KqA 3/8BQBY29VnCQGutGRIQ89W1C1M6rfM7DQ8D3EFc0eTSVh3XG0chqS7zGCR7Gq1hyuYE B5mYaBYGi6Q4NmzmkITrY/mnxxntM5esbvCD6gmVLDY1vTfFpttMuTy8yXcUXwu4C6bj xWZ6V026XYiACnEye0ShwEx8hUfbyNkYGOP/VnGbAGb6mW4xTFA2gzFSKkScmcZcxvZX oymQ== X-Gm-Message-State: ALoCoQn8H0XlOeI/l994NSZinElbfJA+JIPrlRY6HvbcODM38W7rD5H5IsZkWA4XTHussb4tSrzB MIME-Version: 1.0 X-Received: by 10.140.43.183 with SMTP id e52mr12362139qga.38.1446801211960; Fri, 06 Nov 2015 01:13:31 -0800 (PST) Received: by 10.140.29.136 with HTTP; Fri, 6 Nov 2015 01:13:31 -0800 (PST) In-Reply-To: <1446651440-23017-1-git-send-email-james.greenhalgh@arm.com> References: <5639E633.7030705@redhat.com> <1446651440-23017-1-git-send-email-james.greenhalgh@arm.com> Date: Fri, 06 Nov 2015 09:13:00 -0000 Message-ID: Subject: Re: [Patch ifcvt] Teach RTL ifcvt to handle multiple simple set instructions From: Christophe Lyon To: James Greenhalgh Cc: "gcc-patches@gcc.gnu.org" , bernds_cb1@t-online.de, Jeff Law , ebotcazou@libertysurf.fr, steven@gcc.gnu.org, Kyrylo Tkachov , Richard Biener Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00567.txt.bz2 On 4 November 2015 at 16:37, James Greenhalgh wrote: > > On Wed, Nov 04, 2015 at 12:04:19PM +0100, Bernd Schmidt wrote: >> On 10/30/2015 07:03 PM, James Greenhalgh wrote: >> >+ i = tmp_i; <- Should be cleaned up >> >> Maybe reword as "Subsequent passes are expected to clean up the >> extra moves", otherwise it sounds like a TODO item. >> >> >+ read back in anotyher SET, as might occur in a swap idiom or >> >> Typo. >> >> >+ if (find_reg_note (insn, REG_DEAD, new_val) != NULL_RTX) >> >+ { >> >+ /* The write to targets[i] is only live until the read >> >+ here. As the condition codes match, we can propagate >> >+ the set to here. */ >> >+ new_val = SET_SRC (single_set (unmodified_insns[i])); >> >+ } >> >> Shouldn't use braces around single statements (also goes for the >> surrounding for loop). >> >> >+ /* We must have at least one real insn to convert, or there will >> >+ be trouble! */ >> >+ unsigned count = 0; >> >> The comment seems a bit strange in this context - I think it's left >> over from the earlier version? >> >> As far as I'm concerned this is otherwise ok. > > Thanks, > > I've updated the patch with those issues addressed. As the cost model was > controversial in an earlier revision, I'll leave this on list for 24 hours > and, if nobody jumps in to object, commit it tomorrow. > > I've bootstrapped and tested the updated patch on x86_64-none-linux-gnu > just to check that I got the braces right, with no issues. > The new test does not pass on some ARM configurations, I filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68232 Christophe. > Thanks, > James > > --- > gcc/ > > 2015-11-04 James Greenhalgh > > * ifcvt.c (bb_ok_for_noce_convert_multiple_sets): New. > (noce_convert_multiple_sets): Likewise. > (noce_process_if_block): Call them. > > gcc/testsuite/ > > 2015-11-04 James Greenhalgh > > * gcc.dg/ifcvt-4.c: New. >