public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* RFA: a patch for PR49154
@ 2011-05-25 23:14 Vladimir Makarov
  2011-05-26 17:59 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Makarov @ 2011-05-25 23:14 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jeffrey Law

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

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.


[-- Attachment #2: pr49154.patch --]
[-- Type: text/plain, Size: 761 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-26 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-25 23:14 RFA: a patch for PR49154 Vladimir Makarov
2011-05-26 17:59 ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).