public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Daniel Berlin <dan@cgsoftware.com>
To: Jan Hubicka <jh@suse.cz>
Cc: Daniel Berlin <dan@cgsoftware.com>,
	Richard Henderson <rth@redhat.com>,
	gcc@gcc.gnu.org, m.hayes@elec.canterbury.ac.nz,
	matzmich@cs.tu-berlin.de
Subject: Re: df.c and partial writes/REG_EQUAL notes
Date: Thu, 27 Sep 2001 09:40:00 -0000	[thread overview]
Message-ID: <87wv2ka9y3.fsf@cgsoftware.com> (raw)
In-Reply-To: <20010927165837.C23745@atrey.karlin.mff.cuni.cz>

Jan Hubicka <jh@suse.cz> writes:

>> Don't bother, i already did it.
>> You'll note that reload makes too many bitmaps, and the 16-24 bytes
>> more overhead + the empty array pointers that the ebitmap takes causes
>> 100-150 meg more memory.
>> Just another point that we shouldn't up and replace them wholesale,
>> rather do it incrementally.
>> 
>> I have resolved this problem by reworking the internals to
>> not need to store empty words at all (ie not even pointers to them).
>
> How did you accomplished that?
You can keep an array only containing the set words (where words in
this whole email means whatever size cluster of real words we actually
use as the array element, it's currently 256 bits)

It requires possible memory moving for setting/clearing bits,
unfortunately.
However, it seems single bits are set/clear generally within given clusters
of 256 bits (at least for regsets), so i make the block size 256 bits
to account for this (so that, in general, we only move memory for the
first set of a bunch of regs, causing the rest to get lost in the
noise).

The worst case memory is N + N/256, where N is the number of *bits*,
for a completely full vector. 
Which isn't too bad, since you shouldn't be using them for completely
full vectors anyway.
Current bitmaps are N + (pointer size * 2 * (N/128)) (I'm in the
middle of Torts, so i'm not positive about this, i'm calculating based
on a first and next pointer and a block of 128 bits)

In order to set or clear a bit in a word that was zero
before, or becomes zero, requires memcpying a contiguous set of
blocks.

This word mask is why i needed to make sbitmaps work properly for
different size 
sbitmaps, because the word masks could be different sizes, but the
destination word mask will always be big enough to hold the result (we
make sure of it).
Before, it would always choose the size of the destination sbitmap,
and assume the input sbitmaps were the exact same size, and end up
performing the logical operation or whatever on random memory, and
storing that into the result, if either of the inputs were smaller
than the destination.

> Is that contained in the updated ebitmap patch?
Not a submitted one.


-- 
"Everywhere is walking distance if you have the time.
"-Steven Wright

  reply	other threads:[~2001-09-27  9:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-25  7:16 Jan Hubicka
2001-09-25  7:55 ` Daniel Berlin
2001-09-25  7:59   ` Jan Hubicka
2001-09-25  8:33     ` Daniel Berlin
2001-09-25  8:35       ` Jan Hubicka
2001-09-26 13:03       ` Richard Henderson
2001-09-27  6:29         ` Daniel Berlin
2001-09-27  7:13           ` Gerald Pfeifer
2001-09-27  7:28             ` Daniel Berlin
2001-09-27  7:47               ` David Edelsohn
2001-09-27  7:27           ` Jan Hubicka
2001-09-27  7:38             ` Daniel Berlin
2001-09-27  7:58               ` Jan Hubicka
2001-09-27  9:40                 ` Daniel Berlin [this message]
2001-09-27 10:27           ` Richard Henderson
2001-09-27 11:21             ` Daniel Berlin
2001-10-01 17:07             ` Mark Mitchell
2001-09-27 20:12           ` law
2001-09-28 10:49     ` Michael Matz
2001-09-29  6:38       ` Jan Hubicka
2001-10-24 12:35 ` law
2001-10-24 13:00   ` Richard Henderson
2001-10-24 13:27   ` Michael Matz
2001-10-25 11:20     ` law
2001-10-25  6:23   ` Jan Hubicka
2001-10-25  6:36     ` Daniel Berlin
2001-09-27  8:52 Richard Kenner
2001-09-27 10:20 ` Jan Hubicka
2001-09-27 15:11   ` Daniel Berlin
2001-09-27 11:41 ` Daniel Berlin
2001-09-27 11:48 Richard Kenner
2001-09-27 14:16 mike stump

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=87wv2ka9y3.fsf@cgsoftware.com \
    --to=dan@cgsoftware.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jh@suse.cz \
    --cc=m.hayes@elec.canterbury.ac.nz \
    --cc=matzmich@cs.tu-berlin.de \
    --cc=rth@redhat.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).