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]

[bitmap] cleanup


this one's been bothering me, so I decided to fix it.

booted and tested on i686-pc-linux-gnu, installed as obvious.

nathan
--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

2004-11-24  Nathan Sidwell  <nathan@codesourcery.com>

	* bitmap.c (INLINE): Do not define.
	(bitmap_elem_to_freelist, bitmap_element_free,
	bitmap_element_allocate, bitmap_clear, bitmap_element_zerop,
	bitmap_element_link, bitmap_find_bit): Use inline keyword/macro.

Index: bitmap.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/bitmap.c,v
retrieving revision 1.61
diff -c -3 -p -r1.61 bitmap.c
*** bitmap.c	22 Nov 2004 12:23:43 -0000	1.61
--- bitmap.c	24 Nov 2004 15:14:44 -0000
*************** Software Foundation, 59 Temple Place - S
*** 29,44 ****
  #include "ggc.h"
  #include "bitmap.h"
  
- /* Obstack to allocate bitmap elements from.  */
- 
- #ifndef INLINE
- #ifndef __GNUC__
- #define INLINE
- #else
- #define INLINE __inline__
- #endif
- #endif
- 
  /* Global data */
  bitmap_element bitmap_zero_bits;  /* An element of all zero bits.  */
  bitmap_obstack bitmap_default_obstack;    /* The default bitmap obstack.  */
--- 29,34 ----
*************** static bitmap_element *bitmap_find_bit (
*** 56,62 ****
  
  
  /* Add ELEM to the appropriate freelist.  */
! static INLINE void
  bitmap_elem_to_freelist (bitmap head, bitmap_element *elt)
  {
    bitmap_obstack *bit_obstack = head->obstack;
--- 46,52 ----
  
  
  /* Add ELEM to the appropriate freelist.  */
! static inline void
  bitmap_elem_to_freelist (bitmap head, bitmap_element *elt)
  {
    bitmap_obstack *bit_obstack = head->obstack;
*************** bitmap_elem_to_freelist (bitmap head, bi
*** 76,82 ****
  /* Free a bitmap element.  Since these are allocated off the
     bitmap_obstack, "free" actually means "put onto the freelist".  */
  
! static INLINE void
  bitmap_element_free (bitmap head, bitmap_element *elt)
  {
    bitmap_element *next = elt->next;
--- 66,72 ----
  /* Free a bitmap element.  Since these are allocated off the
     bitmap_obstack, "free" actually means "put onto the freelist".  */
  
! static inline void
  bitmap_element_free (bitmap head, bitmap_element *elt)
  {
    bitmap_element *next = elt->next;
*************** bitmap_element_free (bitmap head, bitmap
*** 104,110 ****
  
  /* Allocate a bitmap element.  The bits are cleared, but nothing else is.  */
  
! static INLINE bitmap_element *
  bitmap_element_allocate (bitmap head)
  {
    bitmap_element *element;
--- 94,100 ----
  
  /* Allocate a bitmap element.  The bits are cleared, but nothing else is.  */
  
! static inline bitmap_element *
  bitmap_element_allocate (bitmap head)
  {
    bitmap_element *element;
*************** bitmap_elt_clear_from (bitmap head, bitm
*** 150,156 ****
  
  /* Clear a bitmap by freeing the linked list.  */
  
! INLINE void
  bitmap_clear (bitmap head)
  {
    bitmap_element *element, *next;
--- 140,146 ----
  
  /* Clear a bitmap by freeing the linked list.  */
  
! inline void
  bitmap_clear (bitmap head)
  {
    bitmap_element *element, *next;
*************** bitmap_malloc_free (bitmap map)
*** 268,274 ****
  
  /* Return nonzero if all bits in an element are zero.  */
  
! static INLINE int
  bitmap_element_zerop (bitmap_element *element)
  {
  #if BITMAP_ELEMENT_WORDS == 2
--- 258,264 ----
  
  /* Return nonzero if all bits in an element are zero.  */
  
! static inline int
  bitmap_element_zerop (bitmap_element *element)
  {
  #if BITMAP_ELEMENT_WORDS == 2
*************** bitmap_element_zerop (bitmap_element *el
*** 286,292 ****
  
  /* Link the bitmap element into the current bitmap linked list.  */
  
! static INLINE void
  bitmap_element_link (bitmap head, bitmap_element *element)
  {
    unsigned int indx = element->indx;
--- 276,282 ----
  
  /* Link the bitmap element into the current bitmap linked list.  */
  
! static inline void
  bitmap_element_link (bitmap head, bitmap_element *element)
  {
    unsigned int indx = element->indx;
*************** bitmap_copy (bitmap to, bitmap from)
*** 421,427 ****
     would hold the bitmap's bit to make eventual allocation
     faster.  */
  
! static INLINE bitmap_element *
  bitmap_find_bit (bitmap head, unsigned int bit)
  {
    bitmap_element *element;
--- 411,417 ----
     would hold the bitmap's bit to make eventual allocation
     faster.  */
  
! static inline bitmap_element *
  bitmap_find_bit (bitmap head, unsigned int bit)
  {
    bitmap_element *element;

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