From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62073 invoked by alias); 3 Nov 2015 01:11:24 -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 62060 invoked by uid 89); 3 Nov 2015 01:11:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.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 01:11:22 +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 530DA4C64A; Tue, 3 Nov 2015 01:11:20 +0000 (UTC) Received: from freie.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA31BFMZ031327 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 2 Nov 2015 20:11:18 -0500 Received: from livre.home (livre.home [172.31.160.2]) by freie.home (8.15.2/8.15.2) with ESMTP id tA31BApi018637; Mon, 2 Nov 2015 23:11:10 -0200 From: Alexandre Oliva To: Richard Biener Cc: =?utf-8?Q?Uro=C5=A1?= Bizjak , Alan Lawrence , Jeff Law , James Greenhalgh , "H.J. Lu" , Segher Boessenkool , GCC Patches , Christophe Lyon , David Edelsohn , Eric Botcazou Subject: Re: [PR67891] drop is_gimple_reg test from set_parm_rtl References: <20150810082355.GA31149@arm.com> <55C8BFC3.3030603@redhat.com> <55E72D4C.40705@arm.com> <55FC3171.7040509@arm.com> Date: Tue, 03 Nov 2015 01:11:00 -0000 In-Reply-To: (Richard Biener's message of "Wed, 14 Oct 2015 11:28:34 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2015-11/txt/msg00147.txt.bz2 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. */ -- Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/ You must be the change you wish to see in the world. -- Gandhi Be Free! -- http://FSFLA.org/ FSF Latin America board member Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer