public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@cygnus.com>
To: Marcio de Oliveira Buss <ra990898@ic.unicamp.br>
Cc: gcc@gcc.gnu.org
Subject: Re: Post Dominator Tree
Date: Mon, 03 Jul 2000 12:05:00 -0000	[thread overview]
Message-ID: <20000703120542.E25642@cygnus.com> (raw)
In-Reply-To: <Pine.GSO.4.10.10007031429330.10072-100000@xingu.dcc.unicamp.br>

On Mon, Jul 03, 2000 at 02:36:26PM -0300, Marcio de Oliveira Buss wrote:
> 	I need to implement the Post-Dominator Tree in the flow
>  pass of the gcc. I found the compute_dominators function in the
>  file flow.c, but I realize that this function does not implement
>  a tree, but only a bitmap that represent the dominator relationship.

It is also possible to get the immediate dominators.  See
simplify_to_immediate_dominators from ssa.c.  There's no
particular reason why we couldn't move this function to flow.c
and export it.  With only a small tweek one could get the
immediate post-dominators.

>  Also, the Tarjan's algorithm sounds more efficient,
>  but this algorithm is not implemented there. If I implemented this
>  algorithm, it would be a contribution to gcc or it is not relevant?

Michael Matz <matzmich@cs.tu-berlin.de> has submitted an implementation:

/* This file implements an algorithm for calculating dominators in linear
   time, as presented in ftp://ftp.diku.dk/diku/semantics/papers/D-320.ps.gz

   That algorithm uses ideas of the old one from Lengauer and Tarjan.

   The implementation in this file does not use microtrees, and so is
   theoretically not linear, but its not clear that the complexity in
   implementing them would be worthwhile.  */

But last I heard we were stalled on copyright assignment paperwork
being processed by the FSF.  See

  http://gcc.gnu.org/ml/gcc-patches/2000-06/msg00794.html

for his code.


r~

  reply	other threads:[~2000-07-03 12:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-03 10:37 Marcio de Oliveira Buss
2000-07-03 12:05 ` Richard Henderson [this message]
2000-07-03 12:16   ` Jeffrey A Law
2000-07-06  7:23     ` Michael Matz
2000-07-06  9:31       ` Jeffrey A Law

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=20000703120542.E25642@cygnus.com \
    --to=rth@cygnus.com \
    --cc=gcc@gcc.gnu.org \
    --cc=ra990898@ic.unicamp.br \
    /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).