diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-10-01 12:55:16 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-10-01 12:55:16 +0000 |
commit | 3366b37850b0b41d1cc80d82224b4c7804ad2158 (patch) | |
tree | 39fe33d319af91269d37e3cb912d72e2d9ea3830 /gcc | |
parent | 6bc89193bcf3c616e22d0f422e42e685f1d7796a (diff) | |
download | gcc-3366b37850b0b41d1cc80d82224b4c7804ad2158.zip gcc-3366b37850b0b41d1cc80d82224b4c7804ad2158.tar.gz gcc-3366b37850b0b41d1cc80d82224b4c7804ad2158.tar.bz2 |
Fix reload after function-abi patches (PR91948)
The code was passing a pseudo rather than its allocated hard reg
to ira_need_caller_save_p. Running under valgrind to reproduce
the failure also showed that ALLOCNO_CROSSED_CALLS_ABIS wasn't
being explicitly initialised.
2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
gcc/
PR rtl-optimization/91948
* ira-build.c (ira_create_allocno): Initialize
ALLOCNO_CROSSED_CALLS_ABIS.
* ira-color.c (allocno_reload_assign): Pass hard_regno rather
than regno to ira_need_caller_save_p.
From-SVN: r276407
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ira-build.c | 1 | ||||
-rw-r--r-- | gcc/ira-color.c | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ce7109f..ab81f41 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-10-01 Richard Sandiford <richard.sandiford@arm.com> + + PR rtl-optimization/91948 + * ira-build.c (ira_create_allocno): Initialize + ALLOCNO_CROSSED_CALLS_ABIS. + * ira-color.c (allocno_reload_assign): Pass hard_regno rather + than regno to ira_need_caller_save_p. + 2019-10-01 Alexandre Oliva <oliva@adacore.com> * config/i386/i386-options.c diff --git a/gcc/ira-build.c b/gcc/ira-build.c index 222956e..47ce189 100644 --- a/gcc/ira-build.c +++ b/gcc/ira-build.c @@ -504,6 +504,7 @@ ira_create_allocno (int regno, bool cap_p, ALLOCNO_CALL_FREQ (a) = 0; ALLOCNO_CALLS_CROSSED_NUM (a) = 0; ALLOCNO_CHEAP_CALLS_CROSSED_NUM (a) = 0; + ALLOCNO_CROSSED_CALLS_ABIS (a) = 0; CLEAR_HARD_REG_SET (ALLOCNO_CROSSED_CALLS_CLOBBERED_REGS (a)); #ifdef STACK_REGS ALLOCNO_NO_STACK_REG_P (a) = false; diff --git a/gcc/ira-color.c b/gcc/ira-color.c index 9197db9..42309b9 100644 --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -4398,7 +4398,7 @@ allocno_reload_assign (ira_allocno_t a, HARD_REG_SET forbidden_regs) ? ALLOCNO_CLASS_COST (a) : ALLOCNO_HARD_REG_COSTS (a)[ira_class_hard_reg_index [aclass][hard_regno]])); - if (ira_need_caller_save_p (a, regno)) + if (ira_need_caller_save_p (a, hard_regno)) { ira_assert (flag_caller_saves); caller_save_needed = 1; |