From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50241 invoked by alias); 3 Nov 2015 03:14:00 -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 50113 invoked by uid 89); 3 Nov 2015 03:13:48 -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; Tue, 03 Nov 2015 03:13:29 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 0A02AC0A1B1A; Tue, 3 Nov 2015 03:13:27 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-134.phx2.redhat.com [10.3.113.134]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA33DN1j021507; Mon, 2 Nov 2015 22:13:24 -0500 Subject: Re: [PR67891] drop is_gimple_reg test from set_parm_rtl To: Alexandre Oliva , Richard Biener References: <20150810082355.GA31149@arm.com> <55C8BFC3.3030603@redhat.com> <55E72D4C.40705@arm.com> <55FC3171.7040509@arm.com> Cc: =?UTF-8?Q?Uro=c5=a1_Bizjak?= , Alan Lawrence , James Greenhalgh , "H.J. Lu" , Segher Boessenkool , GCC Patches , Christophe Lyon , David Edelsohn , Eric Botcazou From: Jeff Law Message-ID: <56382653.4060605@redhat.com> Date: Tue, 03 Nov 2015 03:14: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: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00151.txt.bz2 On 11/02/2015 06:11 PM, Alexandre Oliva wrote: > On Oct 14, 2015, Richard Biener wrote: > >> On Wed, Oct 14, 2015 at 5:25 AM, Alexandre Oliva wrote: >>> On Oct 12, 2015, Richard Biener wrote: >>> >>>> On Sat, Oct 10, 2015 at 3:16 PM, Alexandre Oliva wrote: >>>>> On Oct 9, 2015, Richard Biener wrote: >>>>> >>>>>> Ok. Note that I think emit_block_move shouldn't mess with the addressable flag. >>>>> >>>>> I have successfully tested a patch that stops it from doing so, >>>>> reverting https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429#c11 but >>>>> according to bugs 49429 and 49454, it looks like removing it would mess >>>>> with escape analysis introduced in r175063 for bug 44194. The thread >>>>> that introduces the mark_addressable calls suggests some discomfort with >>>>> this solution, and even a suggestion that the markings should be >>>>> deferred past the end of expand, but in the end there was agreement to >>>>> go with it. https://gcc.gnu.org/ml/gcc-patches/2011-06/msg01746.html >>> >>>> Aww, indeed. Of course the issue is that we don't track pointers to the >>>> stack introduced during RTL properly. >>> >>>> Thanks for checking. Might want to add a comment before that >>>> addressable setting now that you've done the archeology. >>> >>> I decided to give the following approach a try instead. The following >>> patch was regstrapped on x86_64-linux-gnu and i686-linux-gnu. >>> Ok to install? > >> It looks ok to me but lacks a comment in mark_addressable_1 why we >> do this queueing when currently expanding to RTL. > >>> +/* Mark X as addressable or queue it up if called during expand. */ >>> + >>> +static void >>> +mark_addressable_1 (tree x) > > How about this: > > /* Mark X as addressable or queue it up if called during expand. We > don't want to apply it immediately during expand because decls are > made addressable at that point due to RTL-only concerns, such as > uses of memcpy for block moves, and TREE_ADDRESSABLE changes > is_gimple_reg, which might make it seem like a variable that used > to be a gimple_reg shouldn't have been an SSA name. So we queue up > this flag setting and only apply it when we're done with GIMPLE and > only RTL issues matter. */ Sounds good. jeff