From: "Pranav Bhandarkar" <pranav.bhandarkar@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: [RFC] Patch to keep CSE from removing a necessary load
Date: Wed, 01 Aug 2007 13:49:00 -0000 [thread overview]
Message-ID: <649555d50708010649n4fa492fo15f9d666db14d33@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
Hi,
Subsequent to the following discussion
http://gcc.gnu.org/ml/gcc/2007-07/msg00878.html
I have the following patch. It gave no regressions with the GCC
testsuite on my port ( private port) and a proprietary testsuite.
Thanks,
Pranav
ChangeLog
* lower-subreg.c (remove_retval_note): Remove REG_EQUAL note too
if it exists in an insn containing REG_RETVAL note.
[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 677 bytes --]
Index: lower-subreg.c
===================================================================
--- lower-subreg.c (revision 127059)
+++ lower-subreg.c (working copy)
@@ -586,9 +586,10 @@
static void
remove_retval_note (rtx insn1)
{
- rtx note0, insn0, note1, insn;
+ rtx note0, insn0, note1, note2, insn;
note1 = find_reg_note (insn1, REG_RETVAL, NULL);
+ note2 = find_reg_note (insn1, REG_EQUAL, NULL);
if (note1 == NULL_RTX)
return;
@@ -598,6 +599,9 @@
remove_note (insn0, note0);
remove_note (insn1, note1);
+ if (note2)
+ remove_note (insn1, note2);
+
for (insn = insn0; insn != insn1; insn = NEXT_INSN (insn))
{
while (1)
reply other threads:[~2007-08-01 13:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=649555d50708010649n4fa492fo15f9d666db14d33@mail.gmail.com \
--to=pranav.bhandarkar@gmail.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).