summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2017-02-06 21:38:10 +0000
committerYvan Roux <yvan.roux@linaro.org>2017-02-11 09:25:32 +0000
commit25ff76c7b89746d5b2d5a01788a9d9dba61a984a (patch)
treebf48497792868031ce7df131c969749589e2618c
parent5c9160f44e50073bd9cd3d6b8770ff47b4a2dd22 (diff)
downloadgcc-25ff76c7b89746d5b2d5a01788a9d9dba61a984a.tar.gz
gcc/
Backport from trunk r230499. 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. Change-Id: I9dc44d22272863d5b3f491a87d169e5dc2eed7a2
-rw-r--r--gcc/regrename.c7
-rw-r--r--gcc/regrename.h3
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c
index 3d85b651583..2587143d233 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -215,8 +215,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 bbe156dbc4e..84112d63da4 100644
--- a/gcc/regrename.h
+++ b/gcc/regrename.h
@@ -68,7 +68,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];