re PR target/66785 (internal compiler error in record_operand_use)
authorBernd Schmidt <bernds@redhat.com>
Tue, 17 Nov 2015 21:20:20 +0000 (21:20 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Tue, 17 Nov 2015 21:20:20 +0000 (21:20 +0000)
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

gcc/ChangeLog
gcc/regrename.c
gcc/regrename.h

index 70e7f20407976f07e95fa274cf3715eb94130d6b..cdd7036a7fb328d1a9f4196a0386a355ba6b4966 100644 (file)
@@ -1,3 +1,11 @@
+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>
 
        PR 48568
index d41410a9348b7611f9c96333de815609b8e3a2e1..e126fcc74039ca0467411bdd15c2b1bd3ee9489a 100644 (file)
@@ -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;
index 77cc2fe29c421dbb3449a71122dc9a3db6427744..801e0d25278bbfb4e3fe96e92fbf1b38f8a4684d 100644 (file)
@@ -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];