public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steven Bosscher <stevenb.gcc@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Michael Matz <matz@suse.de>, Jeff Law <law@redhat.com>
Subject: Re: [patch][RFC] bitmaps as lists *or* trees
Date: Tue, 05 Mar 2013 14:51:00 -0000	[thread overview]
Message-ID: <CABu31nPP2QRzX+KndsYBMvH1EH3Bw2VfQwVntMB5E9dgxoZ-PQ@mail.gmail.com> (raw)
In-Reply-To: <CAFiYyc0tkw3kji84zACHUZ57Z_+acm8vnKpOHwo1EKpQijPCAQ@mail.gmail.com>

On Tue, Mar 5, 2013 at 1:32 PM, Richard Biener wrote:
>> The attached patch is a first stab at an idea I've had for a while:
>> Implement a "change of view" for bitmaps, such that a bitmap can be
>> either a linked list, or a binary tree.
...
> Definitely a nice idea.  Iteration should be easy to implement (without
> actually splaying for each visited bit), the bit operations can use the
> iteration as building block as well then.

It is really easy, you only have to "listify" the splay tree such that
the root is the element with the lowest index. AFAICT the iterators
only look at the "next" member of each bitmap_element, and a list is
also a valid splay tree.


> Now, an instrumented bitmap to identify bitmaps that would benefit
> from the tree view would be nice ;)  [points-to sets are never modified
> after being computed, but they are both random-tested and intersected]

I have no idea how to create that kind of instrumentation.

> What I missed often as well is a reference counted shared bitmap
> implementation (we have various special case implementations).
> I wonder if that could even use shared sub-trees/lists of bitmap_elts.

And this idea, I don't even understand :-)
"reference counted shared bitmaps" as in, the same bitmap element
shared between different bitmaps? How would you link such elements
together in a tree or a list? It could be done with array bitmaps, but
those have other downsides (insert/delete is near impossible without a
lot of mem-moving around).

Ciao!
Steven

  parent reply	other threads:[~2013-03-05 14:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05 12:01 Steven Bosscher
2013-03-05 12:32 ` Richard Biener
2013-03-05 14:48   ` Michael Matz
2013-03-05 16:17     ` Steven Bosscher
2013-03-05 22:56       ` Steven Bosscher
2013-03-07 20:18         ` Steven Bosscher
2018-10-17 14:04           ` Richard Biener
2013-03-06 10:18       ` Richard Biener
2013-03-06 16:02       ` Jan Hubicka
2013-03-06 16:06         ` Jan Hubicka
2013-03-06 18:07           ` Steven Bosscher
2013-03-06 17:59         ` Steven Bosscher
2013-03-06 18:03           ` Jan Hubicka
2013-03-05 14:51   ` Steven Bosscher [this message]
2013-03-05 16:03     ` Richard Biener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABu31nPP2QRzX+KndsYBMvH1EH3Bw2VfQwVntMB5E9dgxoZ-PQ@mail.gmail.com \
    --to=stevenb.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=matz@suse.de \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).