From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28503 invoked by alias); 1 Feb 2016 12:18:40 -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 28491 invoked by uid 89); 1 Feb 2016 12:18:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=SFP 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; Mon, 01 Feb 2016 12:18:38 +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 194B65A41; Mon, 1 Feb 2016 12:18:37 +0000 (UTC) Received: from localhost.localdomain (vpn1-4-171.ams2.redhat.com [10.36.4.171]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u11CIXpo017547; Mon, 1 Feb 2016 07:18:34 -0500 Subject: Re: Is it OK for rtx_addr_can_trap_p_1 to attempt to compute the frame layout? (was Re: [PATCH] Skip re-computing the mips frame info after reload completed) To: Bernd Edlinger , Jakub Jelinek References: <6D39441BF12EF246A7ABCE6654B023536A705EB0@LEMAIL01.le.imgtec.org> <87y4bcavl5.fsf_-_@googlemail.com> <1634352.Ak3Qm2WKut@polaris> <56AABBC5.6090309@redhat.com> <20160129154141.GS3017@tucnak.redhat.com> <56AB8989.5050705@redhat.com> Cc: Eric Botcazou , Richard Sandiford , "gcc-patches@gcc.gnu.org" , Matthew Fortune , Nick Clifton From: Bernd Schmidt Message-ID: <56AF4D19.2000809@redhat.com> Date: Mon, 01 Feb 2016 12:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.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: 2016-02/txt/msg00020.txt.bz2 On 01/29/2016 08:42 PM, Bernd Edlinger wrote: > On 29.01.2016 16:47 Bernd Schmidt wrote: >> >> Yes. What is the problem with that? If we have (plus sfp const_int) at >> any point before reload, we can check whether that offset is inside >> frame_size. If it isn't or if the offset isn't known, it could trap. >> >> > > Usually we have "if (x==1234) { read MEM[FP+x]; }", so wo don't know, > and then after reload: "if (x==1234) { read MEM[SP+x+sp_fp_offset]; }" > but wait, in the if statement we know, that x==1234, so everything > turns in one magic constant, and we have a totally new constant offset > from the SP register "if (x==1234) { read MEM[SP+1234+sp_fp_offset]; }". > Now if rtx_addr_can_trap_p(MEM[SP+1234+sp_fp_offset]) says it cannot > trap we think we do not need the if at all => BANG. What are you trying to say here? As far as I can tell this isn't a problem with my proposed solution (set MEM_NOTRAP_P for valid SFP+x offsets). Bernd