From 8a26ad39c470d050dee58212c00ab64fe8c696f3 Mon Sep 17 00:00:00 2001 From: Vladimir Makarov Date: Wed, 18 Sep 2013 19:12:16 +0000 Subject: [PATCH] lra-constraints.c (need_for_all_save_p): Use macro HARD_REGNO_CALL_PART_CLOBBERED. 2013-09-18 Vladimir Makarov * lra-constraints.c (need_for_all_save_p): Use macro HARD_REGNO_CALL_PART_CLOBBERED. * lra-lives.c (check_pseudos_live_through_calls): Use the macro to set up pseudo conflict hard regs. From-SVN: r202721 --- gcc/ChangeLog | 7 +++++++ gcc/lra-constraints.c | 4 +++- gcc/lra-lives.c | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ef0f379366..ad70c24516e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2013-09-18 Vladimir Makarov + + * lra-constraints.c (need_for_all_save_p): Use macro + HARD_REGNO_CALL_PART_CLOBBERED. + * lra-lives.c (check_pseudos_live_through_calls): Use the macro to + set up pseudo conflict hard regs. + 2013-09-18 Michael Meissner PR target/58452 diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index e87ba91f3c7..f9652c773cd 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -4335,7 +4335,9 @@ need_for_call_save_p (int regno) return (usage_insns[regno].calls_num < calls_num && (overlaps_hard_reg_set_p (call_used_reg_set, - PSEUDO_REGNO_MODE (regno), reg_renumber[regno]))); + PSEUDO_REGNO_MODE (regno), reg_renumber[regno]) + || HARD_REGNO_CALL_PART_CLOBBERED (reg_renumber[regno], + PSEUDO_REGNO_MODE (regno)))); } /* Global registers occurring in the current EBB. */ diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c index 6eaeb2d7779..f3bad974a87 100644 --- a/gcc/lra-lives.c +++ b/gcc/lra-lives.c @@ -457,11 +457,17 @@ lra_setup_reload_pseudo_preferenced_hard_reg (int regno, static inline void check_pseudos_live_through_calls (int regno) { + int hr; + if (! sparseset_bit_p (pseudos_live_through_calls, regno)) return; sparseset_clear_bit (pseudos_live_through_calls, regno); IOR_HARD_REG_SET (lra_reg_info[regno].conflict_hard_regs, call_used_reg_set); + + for (hr = 0; hr < FIRST_PSEUDO_REGISTER; hr++) + if (HARD_REGNO_CALL_PART_CLOBBERED (hr, PSEUDO_REGNO_MODE (regno))) + SET_HARD_REG_BIT (lra_reg_info[regno].conflict_hard_regs, hr); #ifdef ENABLE_CHECKING lra_reg_info[regno].call_p = true; #endif -- 2.30.2