diff mbox

RFA: a patch for PR49154

Message ID 4DDD7429.7010201@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov May 25, 2011, 9:27 p.m. UTC
The following patch solves problem 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49154 for SPARC.  SPARC FPCC 
registers were excluded from pressure classes because the movement 
between them is costly.  Therefore the assert was triggered again.  
Common logic says that it should be a pressure class because the 
registers are common and that is attributed that the class has no 
subclasses.

The patch was bootstrapped on x86-64 and teststed on the same targets 
(about 10 of them) + regular SPARC (without soft floating point).


Ok to commit?

2011-05-25  Vladimir Makarov <vmakarov@redhat.com>

         PR rtl-optimization/49154
         * ira.c (setup_pressure_classes): Process class without sublcasses
         as a candidate for pressure classes.

Comments

Jeff Law May 26, 2011, 4:41 p.m. UTC | #1
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/25/11 15:27, Vladimir Makarov wrote:
> The following patch solves problem
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49154 for SPARC.  SPARC FPCC
> registers were excluded from pressure classes because the movement
> between them is costly.  Therefore the assert was triggered again. 
> Common logic says that it should be a pressure class because the
> registers are common and that is attributed that the class has no
> subclasses.
> 
> The patch was bootstrapped on x86-64 and teststed on the same targets
> (about 10 of them) + regular SPARC (without soft floating point).
> 
> 
> Ok to commit?
> 
> 2011-05-25  Vladimir Makarov <vmakarov@redhat.com>
> 
>         PR rtl-optimization/49154
>         * ira.c (setup_pressure_classes): Process class without sublcasses
>         as a candidate for pressure classes.
OK
Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJN3oKyAAoJEBRtltQi2kC767sH/2V5jrDzAt4zDLpS1go78QBq
l03YV1rfy/MG19HBcFcS0rNcGXHUobo0dQxS8woqY75GOmU29HpLuyh5ps6l18gK
YX4gWvbJADnOK9eyFQ0TjdGLAZCx6w4SMcIpUpurYh8e6iFqBUbHEf+KvO5bIhiE
EkXhMcMy3fX/EWmvK7kJWkKGAxYDI3mvyz6RUB0oMlgK1PcW5eW7IQWPXnerHRTi
dNdaVZ6VUiJVPyehKKxfIAsmZM6K0R6q6jYsAGx+ewOtjRq5Vz6gQkAhJKgZ7uGM
747LXBlLRmyS9giGehviqPsep5m5/u2eb/uiVu4ypAGUj7iFeePJY6B1tbiPETA=
=5Ps1
-----END PGP SIGNATURE-----
diff mbox

Patch

Index: ira.c
===================================================================
--- ira.c	(revision 174219)
+++ ira.c	(working copy)
@@ -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