re PR rtl-optimization/46178 (gcc.target/i386/(u)divmod-[58].c FAIL: ICE: in dec_regi...
authorChung-Lin Tang <cltang@codesourcery.com>
Fri, 18 Feb 2011 17:26:31 +0000 (17:26 +0000)
committerChung-Lin Tang <cltang@gcc.gnu.org>
Fri, 18 Feb 2011 17:26:31 +0000 (17:26 +0000)
2011-02-18  Chung-Lin Tang  <cltang@codesourcery.com>

PR rtl-optimization/46178
* ira.c (setup_hard_regno_class): Use ira_class_translate[] to
compute ira_hard_regno_cover_class[].

From-SVN: r170277

gcc/ChangeLog
gcc/ira.c

index 3e31b747d3e098fab8269f7d109fb47d16b4a314..32b49216726b75937417da452b0836ce9055e06f 100644 (file)
@@ -1,3 +1,9 @@
+2011-02-18  Chung-Lin Tang  <cltang@codesourcery.com>
+
+       PR rtl-optimization/46178
+       * ira.c (setup_hard_regno_class): Use ira_class_translate[] to
+       compute ira_hard_regno_cover_class[].
+
 2011-02-18  Richard Guenther  <rguenther@suse.de>
 
        PR lto/47798
index 5f27fc2f320d68d8fb45659cd9a88a615adfa37a..68d47fbb2d5616d4e869ac403363664c4ec6e6af 100644 (file)
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -1033,22 +1033,14 @@ find_reg_class_closure (void)
 static void
 setup_hard_regno_cover_class (void)
 {
-  int i, j;
-  enum reg_class cl;
+  int i;
 
   for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
     {
-      ira_hard_regno_cover_class[i] = NO_REGS;
-      for (j = 0; j < ira_reg_class_cover_size; j++)
-       {
-         cl = ira_reg_class_cover[j];
-         if (ira_class_hard_reg_index[cl][i] >= 0)
-           {
-             ira_hard_regno_cover_class[i] = cl;
-             break;
-           }
-       }
-
+      ira_hard_regno_cover_class[i]
+       = (TEST_HARD_REG_BIT (no_unit_alloc_regs, i)
+          ? NO_REGS
+          : ira_class_translate[REGNO_REG_CLASS (i)]);
     }
 }