From: bernds Date: Tue, 17 Nov 2015 21:20:20 +0000 (+0000) Subject: PR target/66785 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c28a3eb1de65dfec722f0064f1c9cdba9f65dbf;p=thirdparty%2Fgcc.git PR target/66785 * regrename.c (record_operand_use): Keep track of failed operands and stop appending if we see any. * regrename.h (struct operand_rr_info): Add a failed field and shrink n_chains to short. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230499 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 70e7f2040797..cdd7036a7fb3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-11-17 Bernd Schmidt + + PR target/66785 + * regrename.c (record_operand_use): Keep track of failed operands + and stop appending if we see any. + * regrename.h (struct operand_rr_info): Add a failed field and shrink + n_chains to short. + 2015-11-17 Sandra Loosemore PR 48568 diff --git a/gcc/regrename.c b/gcc/regrename.c index d41410a9348b..e126fcc74039 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -203,8 +203,13 @@ mark_conflict (struct du_head *chains, unsigned id) static void record_operand_use (struct du_head *head, struct du_chain *this_du) { - if (cur_operand == NULL) + if (cur_operand == NULL || cur_operand->failed) return; + if (head->cannot_rename) + { + cur_operand->failed = true; + return; + } gcc_assert (cur_operand->n_chains < MAX_REGS_PER_ADDRESS); cur_operand->heads[cur_operand->n_chains] = head; cur_operand->chains[cur_operand->n_chains++] = this_du; diff --git a/gcc/regrename.h b/gcc/regrename.h index 77cc2fe29c42..801e0d25278b 100644 --- a/gcc/regrename.h +++ b/gcc/regrename.h @@ -72,7 +72,8 @@ struct du_chain struct operand_rr_info { /* The number of chains recorded for this operand. */ - int n_chains; + short n_chains; + bool failed; /* Holds either the chain for the operand itself, or for the registers in a memory operand. */ struct du_chain *chains[MAX_REGS_PER_ADDRESS];