From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38511 invoked by alias); 11 May 2015 20:17:05 -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 38502 invoked by uid 89); 11 May 2015 20:17:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 11 May 2015 20:17:04 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 510AEBDD8F; Mon, 11 May 2015 20:17:03 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-21.phx2.redhat.com [10.3.113.21]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4BKH21H022447; Mon, 11 May 2015 16:17:02 -0400 Message-ID: <55510E3E.2040006@redhat.com> Date: Mon, 11 May 2015 20:17:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "Thomas Preud'homme" , "'Steven Bosscher'" CC: GCC Patches , Eric Botcazou Subject: Re: [PATCH, ping 1] Move insns without introducing new temporaries in loop2_invariant References: <001001d087e1$b2783c80$1768b580$@arm.com> In-Reply-To: <001001d087e1$b2783c80$1768b580$@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg01003.txt.bz2 On 05/06/2015 03:47 AM, Thomas Preud'homme wrote: > Ping? Something to consider as future work -- I'm pretty sure PRE sets up the same kind of problematical pattern with a new pseudo (reaching reg) holding the result of the redundant expression and the original evaluations turned into copies from the reaching reg to the final destination. That style is easy to prove correct. There was an issue with the copies not propagating away that was pretty inherent in the partial redundancy cases that I could probably dig out of my archives if you're interested. >> >> So here are the new ChangeLog entries: >> >> *** gcc/ChangeLog *** >> >> 2015-03-11 Thomas Preud'homme >> >> * loop-invariant.c (can_move_invariant_reg): New. >> (move_invariant_reg): Call above new function to decide whether >> instruction can just be moved, skipping creation of temporary >> register. >> >> *** gcc/testsuite/ChangeLog *** >> >> 2015-03-12 Thomas Preud'homme >> >> * gcc.dg/loop-8.c: New test. >> * gcc.dg/loop-9.c: New test. It looks like there's a variety of line wrapping issues. Please double-check line wrapping using an 80 column window. Minor I know, but the consistency with the rest of the code is good. >> >> + >> + /* Check that all uses reached by the def in insn would still be reached >> + it. */ >> + dest_regno = REGNO (reg); >> + for (use = DF_REG_USE_CHAIN (dest_regno); use; use = >> DF_REF_NEXT_REG (use)) [ ... ] So isn't this overly conservative if DEST_REGNO is set multiple times since it's going to look at all the uses, even those not necessarily reached by the original SET of DEST_REGNO? Or is that not an issue for some reason? And I'm not requiring you to make this optimal, but if I'm right, a comment here seems wise. I think with the wrapping nits fixed and closure on the multi-set issue noted immediately above and this will be good for the trunk. Jeff