From: Daniel Berlin <dan@cgsoftware.com>
To: Daniel Berlin <dan@cgsoftware.com>
Cc: law@redhat.com, dnovillo@redhat.com, gcc@gcc.gnu.org
Subject: Re: Higher level RTL issues
Date: Mon, 22 Oct 2001 14:28:00 -0000 [thread overview]
Message-ID: <B7299F68-C733-11D5-9F25-0030657B5340@cgsoftware.com> (raw)
In-Reply-To: <5F42F2BC-C733-11D5-9F25-0030657B5340@cgsoftware.com>
On Monday, October 22, 2001, at 05:25 PM, Daniel Berlin wrote:
>
> On Monday, October 22, 2001, at 05:04 PM, law@redhat.com wrote:
>
>> In message < BF0CB0D7-C728-11D5-9F25-0030657B5340@cgsoftware.com >you
>> write:
>>>> So how is this done when SSA names are not reflected in the IR?
>>> You can do the same thing.
>>> You just need names.
>>
>>> If you look at the ssa-ccp patch i submitted, you'll note i added a
>>> unique id number to each ref, and use it in the following way to give
>>> an
>>> ssa name:
>>> For a phi or a def, the ssa name is the id number.
>>> For a use, the ssa name is the id number of the associated def.
>>> This gives you the same "name" an explicit renamed representation
>>> would
>>> give you, but we still haven't rewritten any code.
>> Right, but whenever you make this kind of transformation you have to
>> scrurry
>> around and find all the uses the update the id number to point to the
>> new
>> def.
> None that you wouldn't have to do anyway, since you need to update the
> use's chain to point to the new def anyway. The ID number is part of
> the def/use structure, so doing the required update makes it work.
> Though i think this is what you meant, i'm just having a bit of trouble
> parsing your sentence. Criminal law class does it to me.
> Remember, we have all the uses for a def, too, so when you remove the
> def, you can just automatically update all the uses to the new def
> pretty simply (since, in the case of dominator optimizations, we know
> which def is the new one).
Scratch that, i forgot you are talking about dominator optimizations
done *before* we build the links.
I was thinking of doing it as a value numbering pass once we *had* ssa
form.
In the case of doing it coming into ssa form, it would certainly be a
pain in the ass.
>
>
>
>> Ugh. How unpleasant. The beauty of a rewriting SSA is it just works.
>>
> It's not actually as unpleasant as one might think, because all the
> updating can be done in replace_expr_in_tree, without *too* much
> trouble.
> So from a programming perspective, it's quite possible to make it so it
> is never seen by the ssa passes.
>
>
>>> I'm assuming you keep the definitions/uses/phi links updated
>>> approriately, which is where the real pain lies.
>> No need for this kind of bookkeeping since the dominator opts happen
>> before we build those links.
>>
>> jeff
>>
>
next prev parent reply other threads:[~2001-10-22 14:28 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-22 11:30 law
2001-10-22 13:10 ` Daniel Berlin
2001-10-22 14:02 ` law
2001-10-22 14:25 ` Daniel Berlin
2001-10-22 14:28 ` Daniel Berlin [this message]
2001-10-22 14:48 ` law
2001-11-13 13:41 ` Diego Novillo
-- strict thread matches above, loose matches on Subject: below --
2001-10-09 19:46 law
2001-10-09 20:54 ` Diego Novillo
2001-10-09 21:27 ` Daniel Berlin
2001-10-09 21:49 ` Diego Novillo
2001-10-09 22:23 ` Daniel Berlin
2001-10-19 14:39 ` law
2001-10-19 12:19 ` law
2001-10-09 21:18 ` Daniel Berlin
2001-10-09 21:33 ` Diego Novillo
2001-10-19 14:37 ` law
2001-10-19 15:53 ` Daniel Berlin
2001-10-22 9:31 ` law
2001-10-22 11:49 ` Daniel Berlin
2001-10-13 2:27 ` Jan Hubicka
2001-10-19 12:03 ` law
2001-10-21 10:40 ` Jan Hubicka
2001-10-22 8:28 ` law
2001-10-22 8:36 ` Daniel Berlin
2001-10-22 8:56 ` law
2001-10-22 9:07 ` Jan Hubicka
2001-10-22 11:32 ` law
2001-10-22 15:07 ` Richard Henderson
2001-10-23 15:16 ` Joern Rennecke
2001-10-22 16:22 ` Joern Rennecke
2001-10-23 3:02 ` Jan Hubicka
2001-10-23 15:28 ` law
2001-10-24 7:59 ` Jan Hubicka
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=B7299F68-C733-11D5-9F25-0030657B5340@cgsoftware.com \
--to=dan@cgsoftware.com \
--cc=dnovillo@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=law@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).