This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Blackfin: Fix problem in hardware loop discovery code


I ran across a testcase that made the compiler segfault while doing
hardware loop optimization.  When discovering suitable loops, we have
code to retry a bad loop with certain basic blocks added, but this
attempt to retry can fail.  If that happens, we must record the loop as
bad to prevent an attempt to optimize it later.

Committed as 144645.


Bernd
-- 
This footer brought to you by insane German lawmakers.
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif


Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 144643)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2009-03-05  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+	* config/bfin/bfin.c (bfin_discover_loop): When retrying fails, mark
+	the loop as bad.
+
 2009-03-05  Jakub Jelinek  <jakub@redhat.com>
 
 	PR debug/39379
Index: gcc/config/bfin/bfin.c
===================================================================
--- gcc/config/bfin/bfin.c	(revision 144643)
+++ gcc/config/bfin/bfin.c	(working copy)
@@ -4362,6 +4362,12 @@
 		      break;
 		    }
 		}
+	      if (!retry)
+		{
+		  if (dump_file)
+		    fprintf (dump_file, ";; No forwarder blocks found\n");
+		  loop->bad = 1;
+		}
 	    }
 	}
     }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]