From: Jeff Law <law@redhat.com>
To: James Cowgill <James.Cowgill@imgtec.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] [PR rtl-optimization/65618] Fix MIPS ADA bootstrap failure
Date: Sun, 01 Jan 2017 22:27:00 -0000 [thread overview]
Message-ID: <0e65e936-dbd9-5fb4-5a8d-fa885c585a09@redhat.com> (raw)
In-Reply-To: <c79f44f2-3006-b878-9c1c-4a406f50bb99@imgtec.com>
On 12/20/2016 07:38 AM, James Cowgill wrote:
> Hi,
>
> On 19/12/16 21:43, Jeff Law wrote:
>> On 12/19/2016 08:44 AM, James Cowgill wrote:
>>> 2016-12-16 James Cowgill <James.Cowgill@imgtec.com>
>>>
>>> PR rtl-optimization/65618
>>> * emit-rtl.c (try_split): Update "after" when moving a
>>> NOTE_INSN_CALL_ARG_LOCATION.
>>>
>>> diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
>>> index 7de17454037..6be124ac038 100644
>>> --- a/gcc/emit-rtl.c
>>> +++ b/gcc/emit-rtl.c
>>> @@ -3742,6 +3742,11 @@ try_split (rtx pat, rtx_insn *trial, int last)
>>> next = NEXT_INSN (next))
>>> if (NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
>>> {
>>> + /* Advance after to the next instruction if it is about to
>>> + be removed. */
>>> + if (after == next)
>>> + after = NEXT_INSN (after);
>>> +
>>> remove_insn (next);
>>> add_insn_after (next, insn, NULL);
>>> break;
>>>
>> So the thing I don't like when looking at this code is we set AFTER
>> immediately upon entry to try_split. But we don't use it until near the
>> very end of try_split. That's just asking for trouble.
>>
>> Can we reasonably initialize AFTER just before it's used?
>
> I wasn't sure but looking closer I think that would be fine. This patch
> also works and does what Richard Sandiford suggested in the PR.
>
> 2016-12-20 James Cowgill <James.Cowgill@imgtec.com>
>
> PR rtl-optimization/65618
> * emit-rtl.c (try_split): Move initialization of "before" and
> "after" to just before the call to emit_insn_after_setloc.
OK.
jeff
next prev parent reply other threads:[~2017-01-01 22:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-19 15:44 James Cowgill
2016-12-19 21:47 ` Jeff Law
2016-12-20 14:45 ` James Cowgill
2017-01-01 22:27 ` Jeff Law [this message]
2017-01-03 11:04 ` James Cowgill
2017-01-03 18:41 ` Jeff Law
2017-01-11 16:50 ` Maciej W. Rozycki
2017-01-11 17:00 ` James Cowgill
2017-01-11 17:22 ` Maciej W. Rozycki
2017-01-12 11:12 ` James Cowgill
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=0e65e936-dbd9-5fb4-5a8d-fa885c585a09@redhat.com \
--to=law@redhat.com \
--cc=James.Cowgill@imgtec.com \
--cc=gcc-patches@gcc.gnu.org \
/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).