This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch to fix PR80148
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 24 Mar 2017 14:48:22 -0400
- Subject: patch to fix PR80148
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=vmakarov at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 531063F722
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 531063F722
The following patch fixes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80148
The test file is too big so there is no a testcase.
The patch was successfully bootstrapped and tested on x86-64.
Committed as rev. 246467.
Index: ChangeLog
===================================================================
--- ChangeLog (revision 246466)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2017-03-24 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/80148
+ * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
+ to consider in curr_insn_transform.
+
2017-03-24 Jakub Jelinek <jakub@redhat.com>
* genrecog.c (validate_pattern): Add VEC_SELECT validation.
Index: lra-assigns.c
===================================================================
--- lra-assigns.c (revision 246466)
+++ lra-assigns.c (working copy)
@@ -1507,6 +1507,14 @@ assign_by_spills (void)
sorted_pseudos[nfails++] = conflict_regno;
former_reload_pseudo_spill_p = true;
}
+ else
+ /* It is better to do reloads before spilling as after the
+ spill-subpass we will reload memory instead of pseudos
+ and this will make reusing reload pseudos more
+ complicated. Going directly to the spill pass in such
+ case might result in worse code performance or even LRA
+ cycling if we have few registers. */
+ bitmap_set_bit (&all_spilled_pseudos, conflict_regno);
if (lra_dump_file != NULL)
fprintf (lra_dump_file, " Spill %s r%d(hr=%d, freq=%d)\n",
pseudo_prefix_title (conflict_regno), conflict_regno,