[gcc(refs/vendors/ibm/heads/perf)] One more patch for PR93564: Prefer smaller hard regno when we do not honor reg alloc order.
Jiu Fu Guo
guojiufu@gcc.gnu.org
Thu Mar 19 05:58:04 GMT 2020
https://gcc.gnu.org/g:f3ce088645e5305d932380c7520809181b2d2eb9
commit f3ce088645e5305d932380c7520809181b2d2eb9
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date: Fri Feb 28 11:27:30 2020 -0500
One more patch for PR93564: Prefer smaller hard regno when we do not honor reg alloc order.
2020-02-28 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/93564
* ira-color.c (assign_hard_reg): Prefer smaller hard regno when we
do not honor reg alloc order.
Diff:
---
gcc/ChangeLog | 6 ++++++
gcc/ira-color.c | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f6a9ae2375e..1451807f7d9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2020-02-28 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/93564
+ * ira-color.c (assign_hard_reg): Prefer smaller hard regno when we
+ do not honor reg alloc order.
+
2020-02-27 Joel Hutton <Joel.Hutton@arm.com>
PR target/87612
diff --git a/gcc/ira-color.c b/gcc/ira-color.c
index 0ffdd192020..a2bf108c38e 100644
--- a/gcc/ira-color.c
+++ b/gcc/ira-color.c
@@ -1925,7 +1925,9 @@ assign_hard_reg (ira_allocno_t a, bool retry_p)
}
if (min_cost > cost)
min_cost = cost;
- if (min_full_cost > full_cost)
+ if (min_full_cost > full_cost
+ || (!HONOR_REG_ALLOC_ORDER && min_full_cost == full_cost
+ && best_hard_regno > hard_regno))
{
min_full_cost = full_cost;
best_hard_regno = hard_regno;
More information about the Gcc-cvs
mailing list