From 764df76cb2dc6f3c0d6ae3cdf75eaf5cb3832a38 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Thu, 28 Jun 2018 03:43:48 +0000 Subject: [PATCH] lra-eliminations.c (update_reg_eliminate): Mark all spanning hard registers for Pmode. 2018-06-23 Dimitar Dimitrov * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard registers for Pmode. * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning hard registers for the clobbered pseudo. From-SVN: r262205 --- gcc/ChangeLog | 7 +++++++ gcc/lra-eliminations.c | 4 ++-- gcc/lra-lives.c | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc0550460b8..e1ba55e3f05 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-06-27 Dimitar Dimitrov + + * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard + registers for Pmode. + * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning + hard registers for the clobbered pseudo. + 2018-06-27 Paul Koning * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle diff --git a/gcc/lra-eliminations.c b/gcc/lra-eliminations.c index 21d8d5f8018..f5f104020b3 100644 --- a/gcc/lra-eliminations.c +++ b/gcc/lra-eliminations.c @@ -1264,13 +1264,13 @@ update_reg_eliminate (bitmap insns_with_changed_offsets) CLEAR_HARD_REG_SET (temp_hard_reg_set); for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++) if (elimination_map[ep->from] == NULL) - SET_HARD_REG_BIT (temp_hard_reg_set, ep->from); + add_to_hard_reg_set (&temp_hard_reg_set, Pmode, ep->from); else if (elimination_map[ep->from] == ep) { /* Prevent the hard register into which we eliminate from the usage for pseudos. */ if (ep->from != ep->to) - SET_HARD_REG_BIT (temp_hard_reg_set, ep->to); + add_to_hard_reg_set (&temp_hard_reg_set, Pmode, ep->to); if (maybe_ne (ep->previous_offset, ep->offset)) { bitmap_ior_into (insns_with_changed_offsets, diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c index 588bc09cb8e..920fd02b997 100644 --- a/gcc/lra-lives.c +++ b/gcc/lra-lives.c @@ -581,7 +581,8 @@ check_pseudos_live_through_calls (int regno, for (hr = 0; hr < FIRST_PSEUDO_REGISTER; hr++) if (targetm.hard_regno_call_part_clobbered (hr, PSEUDO_REGNO_MODE (regno))) - SET_HARD_REG_BIT (lra_reg_info[regno].conflict_hard_regs, hr); + add_to_hard_reg_set (&lra_reg_info[regno].conflict_hard_regs, + PSEUDO_REGNO_MODE (regno), hr); lra_reg_info[regno].call_p = true; if (! sparseset_bit_p (pseudos_live_through_setjumps, regno)) return; -- 2.30.2