public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: bitmaps in gcc
@ 2005-10-14 23:36 Meissner, Michael
  0 siblings, 0 replies; 4+ messages in thread
From: Meissner, Michael @ 2005-10-14 23:36 UTC (permalink / raw)
  To: Brian Makin, gcc

One of the classic places that sparse bitmaps were used in GCC in the
past is in register allocation phase, where you essentially have a 2D
sparse matrix with # of basic blocks on one axis and pseudo register
number on the other axis.  When you are compiling very large functions,
the number of basic blocks and the number of pseudo registers are very
large, and if the table wasn't compressed (most registers aren't live
past a single basic block) it was very significant.  I haven't looked at
this area in the last two years or so when I wasn't working on GCC, so
it might have changed.  Unfortunately I don't recall whether we were
using compressed bitmaps before I wrote the original versions of the
compressed bit vectors, but the idea was to encapsulate everything
within macros so it could be changed in the future.

-----Original Message-----
From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On Behalf Of
Brian Makin
Sent: Friday, October 14, 2005 1:27 PM
To: gcc@gcc.gnu.org
Subject: bitmaps in gcc


In reference to this on the wiki.

Bitmaps, also called sparse bit sets, are implemented using a linked
list with a cache. This is probably not the most time-efficient
representation, and it is not unusual for bitmap functions to show up
high on the execution profile. Bitmaps are used for many things, such as
for live register sets at the entry and exit of basic blocks in RTL, or
for a great number of data flow problems. See bitmap.c (and sbitmap.c
for GCC's simple bitmap implementation).

Can someone point me to a testcase where bitmap functions show up high
on the profile?


Can anyone give me some background on the use of bitmaps in gcc?

Are they assumed to be sparse?
How critical is the memory consumption of bitsets?
What operations are the most speed critical?
Would it be desirable to merge bitmap and sbitmap into one
datastructure?
Anyone have good ideas for improvements?

Anything else anyone would want to add?

I think I may take a look at this.  Once I figure out the requirments
maybe we can speed it up a bit.


Brian N. Makin






		
__________________________________
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs


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

* Re: bitmaps in gcc
  2005-10-14 18:40 Brian Makin
  2005-10-14 19:11 ` Ian Lance Taylor
@ 2005-10-14 20:48 ` Richard Henderson
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2005-10-14 20:48 UTC (permalink / raw)
  To: Brian Makin; +Cc: gcc

On Fri, Oct 14, 2005 at 11:27:15AM -0700, Brian Makin wrote:
> Can anyone give me some background on the use of
> bitmaps in gcc?

There's pleanty of material in the list archives.  This is not
the first time that this topic has come up.


r~

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

* Re: bitmaps in gcc
  2005-10-14 18:40 Brian Makin
@ 2005-10-14 19:11 ` Ian Lance Taylor
  2005-10-14 20:48 ` Richard Henderson
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2005-10-14 19:11 UTC (permalink / raw)
  To: Brian Makin; +Cc: gcc

Brian Makin <merimus@yahoo.com> writes:

> Bitmaps, also called sparse bit sets, are implemented
> using a linked list with a cache. This is probably not
> the most time-efficient representation, and it is not
> unusual for bitmap functions to show up high on the
> execution profile. Bitmaps are used for many things,
> such as for live register sets at the entry and exit
> of basic blocks in RTL, or for a great number of data
> flow problems. See bitmap.c (and sbitmap.c for GCC's
> simple bitmap implementation).
> 
> Can someone point me to a testcase where bitmap
> functions show up high on the profile?

PR 8361.

Ian

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

* bitmaps in gcc
@ 2005-10-14 18:40 Brian Makin
  2005-10-14 19:11 ` Ian Lance Taylor
  2005-10-14 20:48 ` Richard Henderson
  0 siblings, 2 replies; 4+ messages in thread
From: Brian Makin @ 2005-10-14 18:40 UTC (permalink / raw)
  To: gcc


In reference to this on the wiki.

Bitmaps, also called sparse bit sets, are implemented
using a linked list with a cache. This is probably not
the most time-efficient representation, and it is not
unusual for bitmap functions to show up high on the
execution profile. Bitmaps are used for many things,
such as for live register sets at the entry and exit
of basic blocks in RTL, or for a great number of data
flow problems. See bitmap.c (and sbitmap.c for GCC's
simple bitmap implementation).

Can someone point me to a testcase where bitmap
functions show up high on the profile?


Can anyone give me some background on the use of
bitmaps in gcc?

Are they assumed to be sparse?
How critical is the memory consumption of bitsets?
What operations are the most speed critical?
Would it be desirable to merge bitmap and sbitmap into
one datastructure?
Anyone have good ideas for improvements?

Anything else anyone would want to add?

I think I may take a look at this.  Once I figure out
the requirments maybe we can speed it up a bit.


Brian N. Makin






		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

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

end of thread, other threads:[~2005-10-14 23:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-14 23:36 bitmaps in gcc Meissner, Michael
  -- strict thread matches above, loose matches on Subject: below --
2005-10-14 18:40 Brian Makin
2005-10-14 19:11 ` Ian Lance Taylor
2005-10-14 20:48 ` Richard Henderson

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).