diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2011-06-20 17:16:10 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2011-06-20 17:16:10 +0000 |
commit | 998c75b661fa518b79a33f523eb716c246cba756 (patch) | |
tree | 96ea288af6b7d30a2fff457fd710280aa4ed49cd /gcc | |
parent | 222d3b39a663cccdaa87d0b5cfb0cc4a591013b2 (diff) | |
download | gcc-998c75b661fa518b79a33f523eb716c246cba756.zip gcc-998c75b661fa518b79a33f523eb716c246cba756.tar.gz gcc-998c75b661fa518b79a33f523eb716c246cba756.tar.bz2 |
regrename.c (scan_rtx_reg): Handle the case where we write to an open chain in a smaller mode without...
* regrename.c (scan_rtx_reg): Handle the case where we write to an
open chain in a smaller mode without failing the entire block.
From-SVN: r175225
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/regrename.c | 17 |
2 files changed, 18 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 30b07fa..59300e5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-06-20 Bernd Schmidt <bernds@codesourcery.com> + + * regrename.c (scan_rtx_reg): Handle the case where we write to an + open chain in a smaller mode without failing the entire block. + 2011-06-20 H.J. Lu <hongjiu.lu@intel.com> PR middle-end/47725 diff --git a/gcc/regrename.c b/gcc/regrename.c index f313d08..b83c725 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -721,25 +721,34 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl, enum scan_actions action, In either case, we remove this element from open_chains. */ if ((action == terminate_dead || action == terminate_write) - && superset) + && (superset || subset)) { unsigned nregs; head->terminated = 1; + if (subset && !superset) + head->cannot_rename = 1; head->next_chain = closed_chains; closed_chains = head; bitmap_clear_bit (&open_chains_set, head->id); nregs = head->nregs; while (nregs-- > 0) - CLEAR_HARD_REG_BIT (live_in_chains, head->regno + nregs); + { + CLEAR_HARD_REG_BIT (live_in_chains, head->regno + nregs); + if (subset && !superset + && (head->regno + nregs < this_regno + || head->regno + nregs >= this_regno + this_nregs)) + SET_HARD_REG_BIT (live_hard_regs, head->regno + nregs); + } *p = next; if (dump_file) fprintf (dump_file, - "Closing chain %s (%d) at insn %d (%s)\n", + "Closing chain %s (%d) at insn %d (%s%s)\n", reg_names[head->regno], head->id, INSN_UID (insn), - scan_actions_name[(int) action]); + scan_actions_name[(int) action], + superset ? ", superset" : subset ? ", subset" : ""); } else if (action == terminate_dead || action == terminate_write) { |