public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Bernd Schmidt <bschmidt@redhat.com>
Cc: Bernd Edlinger <bernd.edlinger@hotmail.de>,
	Jakub Jelinek <jakub@redhat.com>,
		Eric Botcazou <ebotcazou@libertysurf.fr>,
	Richard Sandiford <rdsandiford@googlemail.com>,
		"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	Matthew Fortune <Matthew.Fortune@imgtec.com>,
		Nick Clifton <nickc@redhat.com>
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)
Date: Mon, 01 Feb 2016 12:49:00 -0000	[thread overview]
Message-ID: <CAFiYyc23+RRf_Jzc+Jcwwz2cNRzY9O3DrMuuGQ60Gu3_bdefpg@mail.gmail.com> (raw)
In-Reply-To: <56AF4D19.2000809@redhat.com>

On Mon, Feb 1, 2016 at 1:18 PM, Bernd Schmidt <bschmidt@redhat.com> wrote:
> 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).

What prevents motion of those across a stack adjustment (thus a place
they are _not_ valid?)

Richard.

>
> Bernd

  reply	other threads:[~2016-02-01 12:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-23 13:25 [PATCH] Skip re-computing the mips frame info after reload completed Bernd Edlinger
2016-01-24 21:57 ` Matthew Fortune
2016-01-25  7:44   ` AW: " Bernd Edlinger
2016-01-25 19:57     ` Matthew Fortune
2016-01-26 21:18       ` 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) Richard Sandiford
2016-01-27 21:09         ` Bernd Edlinger
2016-01-28 22:17           ` Richard Sandiford
2016-01-29 17:54             ` Bernd Edlinger
2016-01-27 23:36         ` Eric Botcazou
2016-01-29  1:09           ` Bernd Schmidt
2016-01-29 15:18             ` Bernd Edlinger
2016-01-29 15:41             ` Jakub Jelinek
2016-01-29 15:47               ` Bernd Schmidt
2016-01-29 19:42                 ` Bernd Edlinger
2016-02-01 12:18                   ` Bernd Schmidt
2016-02-01 12:49                     ` Richard Biener [this message]
2016-02-01 12:51                       ` Bernd Schmidt
2016-02-01 13:10                         ` Richard Biener
2016-02-01 13:19                     ` AW: " Bernd Edlinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFiYyc23+RRf_Jzc+Jcwwz2cNRzY9O3DrMuuGQ60Gu3_bdefpg@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=Matthew.Fortune@imgtec.com \
    --cc=bernd.edlinger@hotmail.de \
    --cc=bschmidt@redhat.com \
    --cc=ebotcazou@libertysurf.fr \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=nickc@redhat.com \
    --cc=rdsandiford@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).