From: Vladimir Makarov <vmakarov@redhat.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [lra] patch to fix GCC testsuite degradations on x86
Date: Thu, 07 Jul 2011 19:53:00 -0000 [thread overview]
Message-ID: <4E1608FD.2000608@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 680 bytes --]
The following patch fixes all current GCC testsuite degradations of
IRA+LRA in comparison with IRA + reload on x86 bringing IRA+LRA having
less testsuite failures on x86 than IRA+reload.
The patch was successfully bootstrapped on x86-64, IA64, and ppc64.
2011-07-07 Vladimir Makarov <vmakarov@redhat.com>
* lra-int.h (lra_invalidate_insn_data): New prototype.
* lra.c (lra_invalidate_insn_data): Split out from ...
(lra_set_insn_deleted): ... here.
* lra-constraints.c (curr_insn_transform): Call
lra_invalidate_insn_data and return true for wrong asm insn.
(lra_constraints): Use dest_reg instead of SET_DEST (set).
[-- Attachment #2: july7.patch --]
[-- Type: text/plain, Size: 2091 bytes --]
Index: lra-int.h
===================================================================
--- lra-int.h (revision 175931)
+++ lra-int.h (working copy)
@@ -252,6 +252,7 @@ extern void lra_push_insn_and_update_ins
extern rtx lra_create_new_reg (enum machine_mode, rtx, enum reg_class,
const char *);
+extern void lra_invalidate_insn_data (rtx);
extern void lra_set_insn_deleted (rtx);
extern void lra_delete_dead_insn (rtx);
extern void lra_emit_add (rtx, rtx, rtx);
Index: lra.c
===================================================================
--- lra.c (revision 175931)
+++ lra.c (working copy)
@@ -107,13 +107,20 @@ lra_create_new_reg (enum machine_mode md
return new_reg;
}
+/* Invalidate INSN related info used by LRA. */
+void
+lra_invalidate_insn_data (rtx insn)
+{
+ lra_invalidate_insn_regno_info (insn);
+ invalidate_insn_recog_data (INSN_UID (insn));
+}
+
/* Mark INSN deleted and invalidate the insn related info used by
LRA. */
void
lra_set_insn_deleted (rtx insn)
{
- lra_invalidate_insn_regno_info (insn);
- invalidate_insn_recog_data (INSN_UID (insn));
+ lra_invalidate_insn_data (insn);
SET_INSN_DELETED (insn);
}
Index: lra-constraints.c
===================================================================
--- lra-constraints.c (revision 175931)
+++ lra-constraints.c (working copy)
@@ -2760,7 +2760,8 @@ curr_insn_transform (void)
"inconsistent operand constraints in an %<asm%>");
/* Avoid further trouble with this insn. */
PATTERN (curr_insn) = gen_rtx_USE (VOIDmode, const0_rtx);
- return false;
+ lra_invalidate_insn_data (curr_insn);
+ return true;
}
/* If the best alternative is with operands 1 and 2 swapped, swap
@@ -3273,7 +3274,7 @@ lra_constraints (bool first_p)
&& (! MEM_P (x) || MEM_READONLY_P (x)
|| in_list_p (curr_insn,
ira_reg_equiv
- [REGNO (SET_DEST (set))].init_insns)))
+ [REGNO (dest_reg)].init_insns)))
|| (SET_SRC (set) != get_equiv_substitution (SET_SRC (set))
&& in_list_p (curr_insn,
ira_reg_equiv
reply other threads:[~2011-07-07 19:29 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=4E1608FD.2000608@redhat.com \
--to=vmakarov@redhat.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).