OSDN Git Service

2011-05-26 Vladimir Makarov <vmakarov@redhat.com>
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 May 2011 21:01:57 +0000 (21:01 +0000)
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 May 2011 21:01:57 +0000 (21:01 +0000)
PR rtl-optimization/49154
* ira.c (setup_pressure_classes): Process class without sublcasses
as a candidate for pressure classes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174309 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ira.c

index 60553d5..8e487e4 100644 (file)
@@ -1,3 +1,9 @@
+2011-05-26  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR rtl-optimization/49154
+       * ira.c (setup_pressure_classes): Process class without sublcasses
+       as a candidate for pressure classes.
+
 2011-05-26  Richard Sandiford  <rdsandiford@googlemail.com>
 
        PR rtl-optimization/48575
index 358ad0a..222d48e 100644 (file)
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -799,7 +799,12 @@ setup_pressure_classes (void)
     {
       if (ira_available_class_regs[cl] == 0)
        continue;
-      if (ira_available_class_regs[cl] != 1)
+      if (ira_available_class_regs[cl] != 1
+         /* A register class without subclasses may contain a few
+            hard registers and movement between them is costly
+            (e.g. SPARC FPCC registers).  We still should consider it
+            as a candidate for a pressure class.  */
+         && alloc_reg_class_subclasses[cl][0] != LIM_REG_CLASSES)
        {
          /* Check that the moves between any hard registers of the
             current class are not more expensive for a legal mode