public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6435] ira: Fix s390 build
@ 2022-01-11 12:47 Richard Sandiford
0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2022-01-11 12:47 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:a923fa6d3b0424cb0eb50de49877515e802c4cb0
commit r12-6435-ga923fa6d3b0424cb0eb50de49877515e802c4cb0
Author: Richard Sandiford <richard.sandiford@arm.com>
Date: Tue Jan 11 12:47:05 2022 +0000
ira: Fix s390 build
My g:01f3e6a40e7202310abbeb41c345d325bd69554f broke the s390
build because the rclass variable was still needed by the
IRA_HARD_REGNO_ADD_COST_MULTIPLIER code.
gcc/
* ira-costs.c (ira_tune_allocno_costs): Fix missing rclass
definition in IRA_HARD_REGNO_ADD_COST_MULTIPLIER code.
Diff:
---
gcc/ira-costs.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c
index cbb58d32be8..1e4cf5a35e4 100644
--- a/gcc/ira-costs.c
+++ b/gcc/ira-costs.c
@@ -2351,10 +2351,13 @@ ira_tune_allocno_costs (void)
if (ira_need_caller_save_p (a, regno))
cost += ira_caller_save_cost (a);
#ifdef IRA_HARD_REGNO_ADD_COST_MULTIPLIER
- cost += ((ira_memory_move_cost[mode][rclass][0]
- + ira_memory_move_cost[mode][rclass][1])
- * ALLOCNO_FREQ (a)
- * IRA_HARD_REGNO_ADD_COST_MULTIPLIER (regno) / 2);
+ {
+ auto rclass = REGNO_REG_CLASS (regno);
+ cost += ((ira_memory_move_cost[mode][rclass][0]
+ + ira_memory_move_cost[mode][rclass][1])
+ * ALLOCNO_FREQ (a)
+ * IRA_HARD_REGNO_ADD_COST_MULTIPLIER (regno) / 2);
+ }
#endif
if (INT_MAX - cost < reg_costs[j])
reg_costs[j] = INT_MAX;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-11 12:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 12:47 [gcc r12-6435] ira: Fix s390 build Richard Sandiford
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).