From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23179 invoked by alias); 12 Aug 2011 10:01:22 -0000 Received: (qmail 23169 invoked by uid 22791); 12 Aug 2011 10:01:21 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SARE_LWSHORTT X-Spam-Check-By: sourceware.org Received: from mail-yw0-f47.google.com (HELO mail-yw0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Aug 2011 10:01:07 +0000 Received: by ywe9 with SMTP id 9so1928756ywe.20 for ; Fri, 12 Aug 2011 03:01:07 -0700 (PDT) Received: by 10.236.181.169 with SMTP id l29mr2302275yhm.22.1313143267225; Fri, 12 Aug 2011 03:01:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.41.16 with HTTP; Fri, 12 Aug 2011 03:00:27 -0700 (PDT) In-Reply-To: <4E43E6BC.90003@redhat.com> References: <4E431BD8.8060705@redhat.com> <4E43E6BC.90003@redhat.com> From: "Paulo J. Matos" Date: Fri, 12 Aug 2011 10:01:00 -0000 Message-ID: Subject: Re: Move insn out of the way To: Vladimir Makarov Cc: Richard Guenther , gcc@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-08/txt/msg00243.txt.bz2 On Thu, Aug 11, 2011 at 3:27 PM, Vladimir Makarov wro= te: > =C2=A0Yes, that is mostly correct. =C2=A0The first could be done by -fweb= (if the live > range where the pseudo is equal to the constant is disjoint). =C2=A0The f= irst > could be done also by Jeff Law's project which can provide splitting not > only on the border of loops. > I was thinking that one possible solution in the short term would be to add a new pass just before IRA which does constant assignment moves. So, an insn where a register which is assigned a constant can be moved as much as possible to the place right before the use of the register or if there's no use of the register inside the current BB, it can be moved as the last instruction of the BB. What do you think about this? Would this work? I know it's not very general, however, it's useful at least for my backend to get this right as soon as possible due to several size test failures we have which are a consequence of this problem. Paulo Matos