public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew MacLeod <amacleod@redhat.com>
To: Chris Lattner <sabre@nondot.org>
Cc: Jeff Law <law@redhat.com>,
	Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>,
	gcc mailing list <gcc@gcc.gnu.org>
Subject: Re: [tree-ssa] Lazy updating of stmt operands
Date: Fri, 12 Dec 2003 19:25:00 -0000	[thread overview]
Message-ID: <1071256652.14001.265.camel@p4> (raw)
In-Reply-To: <Pine.LNX.4.44.0312112134170.5198-100000@nondot.org>

On Thu, 2003-12-11 at 22:43, Chris Lattner wrote:
> On Thu, 11 Dec 2003 law@redhat.com wrote:
> >  >Jeff Law wrote:
> >  >> While it's nice to think about a world where you always have immediate
> >  >> uses, you end up with FUD chains if you do that -- with ultimately a
> >  >> tangled nest of pointers that is bloody impossible to work with in the
> >  >> real world.
> >  >
> >  >Uh, no.  Here's a counter-example:
> >  > http://llvm.cs.uiuc.edu/
> >  >
> >  >Having efficient, transparently & efficiently updated immediate use
> >  >information is extremely valuable for a wide variety of optimizations.
> > OK.  Maybe it was just Diego implementation that was an unmaintainable
> > mess :-)
> 
> I really can't emphasize enough how important this is.  For example, this
> information allows an efficient implementation of the LLVM
> Value::replaceAllUsesOf operation (which makes all users of a value use
> something else, think replacing 'add 2, 4' with '6').  The presence of
> this operation makes copy operations in the IR completely superfluous,
> along with "copy-propagation" passes (which either effectively have to be
> run between all transformations, or be built into all of them).  This
> simplifies transformations, makes code more maintainable, etc...

Its not just maintainability that is at issue. Maintaining immediate
uses is not difficult.  Memory consumption rises dramatically when you
have a lot ssa names and uses and maintain those links. It was a
Significant memory win to only calculate immediate uses for the
ssa_names we cared about in CCP as opposed to all ssa-names.  

 We already have memory footprint problems, and maintaining def->use
links all the time is going to aggravate that situation even more. If
there are times when it is necessary, it ought not be hard to maintain
that information within our current framework. I see no reason to have
it present all the time when only some consumers need it... 

I suspect the loop optimizations are going to fall into the same
category as CCP in that they are going to be interested in the immediate
uses of only a partial subset of variables most of the time. I think its
far more efficient to calculate those when you need them/know what they
are, and possibly maintain just those def->uses.

Andrew

  reply	other threads:[~2003-12-12 19:17 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-11 22:31 Chris Lattner
2003-12-12  3:14 ` law
2003-12-12  3:58   ` Chris Lattner
2003-12-12 19:25     ` Andrew MacLeod [this message]
2003-12-12 19:42       ` Zdenek Dvorak
2003-12-12 19:45         ` Andrew MacLeod
2003-12-12 19:54           ` Chris Lattner
2003-12-12 19:55             ` Andrew MacLeod
2003-12-12 20:39               ` [tree-ssa] Maintaining/representing def-use/use-def information Chris Lattner
2003-12-13 13:46                 ` Andrew MacLeod
2003-12-14  3:59                   ` Chris Lattner
2003-12-15 17:17                     ` Andrew MacLeod
2003-12-15 19:18                       ` Chris Lattner
2003-12-15 19:43                         ` Andrew MacLeod
2003-12-15 20:26                           ` Chris Lattner
2003-12-15 20:29                             ` Diego Novillo
2003-12-15 20:52                             ` Andrew MacLeod
2003-12-15 21:01                               ` Zdenek Dvorak
2003-12-15 21:09                                 ` Andrew MacLeod
2003-12-15 21:11                                   ` Zdenek Dvorak
2003-12-15 21:20                                     ` Diego Novillo
2003-12-15 21:23                                       ` Zdenek Dvorak
2003-12-15 21:31                                     ` Andrew MacLeod
2003-12-17  8:47                                 ` law
2003-12-15 21:03                               ` Diego Novillo
2003-12-15 21:11                                 ` Andrew MacLeod
2003-12-15 21:11                               ` Chris Lattner
2003-12-15 21:16                                 ` Zdenek Dvorak
2003-12-15 21:19                                   ` Chris Lattner
2003-12-15 21:38                                     ` Daniel Berlin
2003-12-15 22:08                                       ` Chris Lattner
2003-12-15 23:09                                         ` Daniel Berlin
2003-12-15 23:31                                           ` Chris Lattner
2003-12-15 23:46                                             ` Daniel Berlin
2003-12-15 21:32                                   ` Daniel Berlin
2003-12-15 21:31                                 ` Andrew MacLeod
2003-12-17  7:51                                 ` law
2003-12-15 20:04                         ` Diego Novillo
2003-12-15 23:26                 ` law
2003-12-15 23:32                   ` Chris Lattner
2003-12-12 21:26               ` [tree-ssa] Lazy updating of stmt operands Diego Novillo
2003-12-12 19:57       ` Chris Lattner
2003-12-13 16:02         ` Andrew MacLeod
2003-12-14  3:39           ` Chris Lattner
2003-12-15 23:41           ` law
2003-12-16  6:02             ` Andrew MacLeod
  -- strict thread matches above, loose matches on Subject: below --
2003-12-15 20:47 Chris Lattner
2003-12-07 16:22 Zdenek Dvorak
2003-12-07 17:14 ` Diego Novillo
2003-12-07 17:28   ` Zdenek Dvorak
2003-12-07 17:36     ` Diego Novillo
2003-12-07 18:09       ` Zdenek Dvorak
2003-12-11 19:39         ` law
2003-12-07 22:20       ` Steven Bosscher
2003-12-09 14:30         ` Andrew MacLeod
2003-12-09 20:40           ` Zdenek Dvorak
2003-12-11 19:41           ` law
2003-12-11 19:38       ` law
2003-12-11 19:52         ` Zdenek Dvorak
2003-12-11 22:36         ` Zdenek Dvorak
2003-12-11 23:34           ` Andrew MacLeod
2003-12-15 19:10           ` Andrew MacLeod
2003-12-15 19:19             ` Zdenek Dvorak
2003-12-15 20:55               ` Andrew MacLeod
2003-12-15 21:06                 ` Zdenek Dvorak
2003-12-15 21:39                   ` Andrew MacLeod
2003-12-15 21:49                     ` Zdenek Dvorak
2003-12-15 22:04                       ` Andrew MacLeod
2003-12-15 22:39                         ` law
2003-12-17  4:56                       ` law
2003-12-16 23:32               ` Andrew MacLeod
2003-12-17  0:09                 ` Zdenek Dvorak
2003-12-17  0:21                   ` Andrew MacLeod
2003-12-17  3:28                 ` law
2003-12-15 19:28             ` Diego Novillo

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=1071256652.14001.265.camel@p4 \
    --to=amacleod@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=rakdver@atrey.karlin.mff.cuni.cz \
    --cc=sabre@nondot.org \
    /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).