Commit d534bf56 by Bernd Schmidt Committed by Bernd Schmidt

re PR target/66785 (internal compiler error in record_operand_use)

	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.

From-SVN: r230499
parent 9f50f67c
2015-11-17 Bernd Schmidt <bschmidt@redhat.com>
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 <sandra@codesourcery.com> 2015-11-17 Sandra Loosemore <sandra@codesourcery.com>
PR 48568 PR 48568
...@@ -203,8 +203,13 @@ mark_conflict (struct du_head *chains, unsigned id) ...@@ -203,8 +203,13 @@ mark_conflict (struct du_head *chains, unsigned id)
static void static void
record_operand_use (struct du_head *head, struct du_chain *this_du) record_operand_use (struct du_head *head, struct du_chain *this_du)
{ {
if (cur_operand == NULL) if (cur_operand == NULL || cur_operand->failed)
return; return;
if (head->cannot_rename)
{
cur_operand->failed = true;
return;
}
gcc_assert (cur_operand->n_chains < MAX_REGS_PER_ADDRESS); gcc_assert (cur_operand->n_chains < MAX_REGS_PER_ADDRESS);
cur_operand->heads[cur_operand->n_chains] = head; cur_operand->heads[cur_operand->n_chains] = head;
cur_operand->chains[cur_operand->n_chains++] = this_du; cur_operand->chains[cur_operand->n_chains++] = this_du;
......
...@@ -72,7 +72,8 @@ struct du_chain ...@@ -72,7 +72,8 @@ struct du_chain
struct operand_rr_info struct operand_rr_info
{ {
/* The number of chains recorded for this operand. */ /* 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 /* Holds either the chain for the operand itself, or for the registers in
a memory operand. */ a memory operand. */
struct du_chain *chains[MAX_REGS_PER_ADDRESS]; struct du_chain *chains[MAX_REGS_PER_ADDRESS];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment