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]

Re: [trunk] patch to remove REG_NO_CONFLICT_BLOCKS


Ralf Wildenhues wrote:
* Kenneth Zadeck wrote on Mon, Apr 21, 2008 at 10:02:11PM CEST:
Ralf Wildenhues wrote:
The file df-byte-scan.c is missing from the commit.

Cheers,
Ralf
committed as revision 134528
sorry

Thanks for the quick fix, but now the compilation of the file fails: (admittedly I haven't started from a clean build tree)

Cheers,
Ralf

gcc -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber ../../gcc/gcc/df-byte-scan.c -o df-byte-scan.o
In file included from ../../gcc/gcc/df.h:29,
from ../../gcc/gcc/df-byte-scan.c:27:
../../gcc/gcc/bitmap.h:48: error: field 'obstack' has incomplete type
make[2]: *** [df-byte-scan.o] Error 1
Committed with bonzini's change as revision 134529.

2008-04-24 Kenneth Zadeck <zadeck@naturalbridge.com>
* sbitmap.c (sbitmap_range_empty_p): New function.
* sbitmap.h (sbitmap_range_empty_p): New function.
* bitmap.h: Now includes obstack.h.



Index: sbitmap.c
===================================================================
--- sbitmap.c	(revision 134522)
+++ sbitmap.c	(working copy)
@@ -1,5 +1,5 @@
 /* Simple bitmaps.
-   Copyright (C) 1999, 2000, 2002, 2003, 2004, 2006, 2007
+   Copyright (C) 1999, 2000, 2002, 2003, 2004, 2006, 2007, 2008
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -273,6 +273,57 @@ sbitmap_empty_p (const_sbitmap bmap)
   return true;
 }
 
+/* Return false if any of the N bits are set in MAP starting at
+   START.  */
+
+bool 
+sbitmap_range_empty_p (const_sbitmap bmap, unsigned int start, unsigned int n)
+{
+  unsigned int i = start / SBITMAP_ELT_BITS;
+  SBITMAP_ELT_TYPE elm;
+  unsigned int shift = start % SBITMAP_ELT_BITS;
+
+  gcc_assert (bmap->n_bits >= start + n);
+
+  elm = bmap->elms[i];
+  elm = elm >> shift;
+
+  if (shift + n <= SBITMAP_ELT_BITS)
+    {
+      /* The bits are totally contained in a single element.  */
+      if (shift + n < SBITMAP_ELT_BITS)
+        elm &= ((1 << n) - 1);
+      return (elm == 0);
+    }
+
+  if (elm) 
+    return false;
+
+  n -= SBITMAP_ELT_BITS - shift;
+  i++;
+
+  /* Deal with full elts.  */
+  while (n >= SBITMAP_ELT_BITS)
+    {
+      if (bmap->elms[i])
+	return false;
+      i++;
+      n -= SBITMAP_ELT_BITS;
+    }
+
+  /* The leftover bits.  */
+  if (n)
+    {
+      elm = bmap->elms[i];
+      elm &= ((1 << n) - 1);
+      return (elm == 0);
+    }  
+
+  return true;
+}
+
+
+
 /* Zero all elements in a bitmap.  */
 
 void
Index: sbitmap.h
===================================================================
--- sbitmap.h	(revision 134522)
+++ sbitmap.h	(working copy)
@@ -1,5 +1,5 @@
 /* Simple bitmaps.
-   Copyright (C) 1999, 2000, 2002, 2003, 2004, 2006, 2007 
+   Copyright (C) 1999, 2000, 2002, 2003, 2004, 2006, 2007, 2008
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -219,6 +219,7 @@ extern void sbitmap_copy (sbitmap, const
 extern void sbitmap_copy_n (sbitmap, const_sbitmap, unsigned int);
 extern int sbitmap_equal (const_sbitmap, const_sbitmap);
 extern bool sbitmap_empty_p (const_sbitmap);
+extern bool sbitmap_range_empty_p (const_sbitmap, unsigned int, unsigned int);
 extern void sbitmap_zero (sbitmap);
 extern void sbitmap_ones (sbitmap);
 extern void sbitmap_vector_zero (sbitmap *, unsigned int);
Index: bitmap.h
===================================================================
--- bitmap.h	(revision 134522)
+++ bitmap.h	(working copy)
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3.  
 #define GCC_BITMAP_H
 #include "hashtab.h"
 #include "statistics.h"
+#include "obstack.h"
 
 /* Fundamental storage type for bitmap.  */
 

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