public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Matz <matzmich@cs.tu-berlin.de>
To: Jan Hubicka <jh@suse.cz>
Cc: Daniel Berlin <dan@cgsoftware.com>, <gcc@gcc.gnu.org>,
	<rth@cygnus.com>, <m.hayes@elec.canterbury.ac.nz>
Subject: Re: df.c and partial writes/REG_EQUAL notes
Date: Fri, 28 Sep 2001 10:49:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.33.0109281917070.28239-100000@platon> (raw)
In-Reply-To: <20010925165908.G13734@atrey.karlin.mff.cuni.cz>

Hi,

Sorry for being late again:

On Tue, 25 Sep 2001, Jan Hubicka wrote:

> > Don't worry about the interactions, as the register allocator branch
> > A. has it's own version of df.c
>
> But once you will attempt to merge allocator in, you probably would not want
> to have df1.c and df2.c right?

Right.  But I'm nearly sure, that I'll not use df.c at all.  One reason
is, that the allocator also must collect the constraints for all reg
references (or better said for all operands), which would need a second
pass over all insns if I would use df.* for collecting the references
itself.  Note that even currently df.* is only used for collecting all
register references by the allocator.  Esp. it's not used for building the
use/def-chains.  (But, Daniels rematerialization uses the chains from
df.*)

If you want to know how I dealt with subregs and webs, look at ra.c, which
contains a fairly complete implementation of creating webs in a lazy
manner (although tailored to register allocation, i.e. also noting
conflicts and other things), including subwebs for subreg references.
The data structures there are not yet in their final state, but still.
(<self-praise> Btw. it's faster than df.* building of use/def chains on
CFG's of measurable size and can be relatively easy made to work
incrementally </self-praise>)

> > B. only uses df.c for reg defs and uses.  All dataflow is done without
> > df.c routines, because Michael doesn't want to use global liveness.
>
> As I've described, it misses one use at least, that should affect the
> reg-alloc branch too.

No, as described I don't rely on df.* to build any connections between
defs and uses.

> What exactly do you mean by global liveness?

I think he meant the usage of the DU_CHAIN or UD_CHAIN flags and
additionally bb->global_live_at_{start,end}, which also isn't used by
ra.c.

> If you do some extra analyzis, you should make as much of the as
> possible available to other passes - we already do have too many stuff
> doing analyzis "just for myself"

Right, and generally I agree.  From my p.o.v. the regalloc has a special
usage pattern of register references and their connection, which justifies
an own implementation.  But of course I may be biased ;-)

> > I.E. It only cares about noticing all of the reg defs and uses, it
> > doesn't care whether df.c really knows what they do.
> My web code too..

No, you rely on df.* to build the chains, which is exactly where you saw
the problems.  I suppose this is because initially Michael (Hayes) wrote
df.* to work only on REGs (i.e. recursing into SUBREGs when noting
references), and for that the chain builder worked.  For the allocator I
hacked more or less around it, and also offered the SUBREG references to
outside code, without actually making changes to the chain builder.  I.e.
if df.c compiles with HANDLE_SUBREG defined, it may very well be, that
that part of df.c gets everything wrong, if presented with df-tables which
contain subreg references.


Ciao,
Michael.

  parent reply	other threads:[~2001-09-28 10:49 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
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 [this message]
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=Pine.GSO.4.33.0109281917070.28239-100000@platon \
    --to=matzmich@cs.tu-berlin.de \
    --cc=dan@cgsoftware.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jh@suse.cz \
    --cc=m.hayes@elec.canterbury.ac.nz \
    --cc=rth@cygnus.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).