From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45245 invoked by alias); 6 Nov 2015 19:30:39 -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 45236 invoked by uid 89); 6 Nov 2015 19:30:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham 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; Fri, 06 Nov 2015 19:30:38 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 2ED86A4519; Fri, 6 Nov 2015 19:30:37 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-107.phx2.redhat.com [10.3.113.107]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA6JUaPr014839; Fri, 6 Nov 2015 14:30:36 -0500 Subject: Re: regrename: Fix for earlyclobber operands To: Bernd Schmidt , GCC Patches References: <563C86EA.3070000@t-online.de> From: Jeff Law Message-ID: <563CFFDC.10204@redhat.com> Date: Fri, 06 Nov 2015 19:30:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <563C86EA.3070000@t-online.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00713.txt.bz2 On 11/06/2015 03:54 AM, Bernd Schmidt wrote: > I have a patch which makes use of the renamer more often, and this > exposed a bug with earlyclobber operands. The code that does the > terminate_write step has the following comment: > > /* Step 5: Close open chains that overlap writes. Similar to > step 2, we hide in-out operands, since we do not want to > close these chains. We also hide earlyclobber operands, > since we've opened chains for them in step 1, and earlier > chains they would overlap with must have been closed at > the previous insn at the latest, as such operands cannot > possibly overlap with any input operands. */ > > That's all right as far as it goes, but the problem is that this means > there isn't a terminate_write step for earlyclobbers. > > The following seems like the simplest possible fix. It was bootstrapped > and tested with -frename-registers enabled at -O1 on x86_64-linux. Ok? > > (Incidentally there are some avx tests that fail if they are renamed, > apparently because the scan-assembler doesn't allow register numbers > like %zmm10. avx512bw-vptestmb-1.c is one of those). > > > Bernd > > rr-ec-term.diff > > > * regrename.c (record_out_operands): Terminate earlyclobbered > operands here. Do you want to terminate those chains after step 6 is complete so that the earlyclobber output conflicts with all the other outputs? Isn't that how we typically do things for earlyclobbers in life analysis? earlyclobbers birth before the insn so they conflict with the inputs and die after the insn so they conflict with the outputs? Or am I fundamentally wrong in even thinking about this in a manner similar to lifetime analysis? Jeff