From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42088 invoked by alias); 29 Apr 2015 22:33:25 -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 42071 invoked by uid 89); 29 Apr 2015 22:33:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_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; Wed, 29 Apr 2015 22:33:23 +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 (8.14.4/8.14.4) with ESMTP id t3TMXJSF030080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 29 Apr 2015 18:33:19 -0400 Received: from localhost.localdomain (ovpn-113-143.phx2.redhat.com [10.3.113.143]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3TMXJUV012887; Wed, 29 Apr 2015 18:33:19 -0400 Message-ID: <55415C2E.9010001@redhat.com> Date: Wed, 29 Apr 2015 22:55: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: Jiong Wang CC: "gcc-patches@gcc.gnu.org" Subject: Re: [Patch/rtl-expand] Take tree range info into account to improve LSHIFT_EXP expanding References: <5539A922.7060708@redhat.com> <554054E9.4030400@redhat.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg01946.txt.bz2 On 04/29/2015 03:36 PM, Jiong Wang wrote: > > Jeff Law writes: > >> On 04/27/2015 02:21 PM, Jiong Wang wrote: >> >>> Jeff, >>> >>> Sorry, I can't understand the meaning of "overlap between t_low and low", >>> assume "right" in "right value" means the opposite of "left" not >>> "correct". >>> >>> So what you mean is t_low and low share the same pseudo regiser? >> My concern is sharing the same pseudo or memory location. But thinking >> more about it, the shifted value has to have range information, so it >> must have been an SSA_NAME, right? If so, then it can't overlap with >> the destination, so this is a non-issue. Sorry for the confusion. > > Thanks for the light. By looking at related code, looks like even it's > SSA_NAME, it's still possible to share the same pseudo given the > destination is in the same SSA map parition after ssa name coleascing? If they're the same size and have non-overlapping lifetimes, then yes, they could be the same pseudo. That ought to be easy to check. Thankfully we don't have to worry about MEMs, which is a harder check. > OK. I will rework the patch, and I found there is a function named > "expand_doubleword_shift" which looks like a more natural place to do > this optimization, although it's hard to get range info there. I will do > further explore on this. Sounds good. jeff