This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Higher level RTL issues


> So, how do you turn this back into normal form?  Well, for the camp that
> reflects the SSA names in the IR, it's the standard SSA->normal 
> translation
> and everything just works.
>
> 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.
Now, just insert real copies for the fake phis, and you are golden. (IE 
converting *out* of fud chains of course, could require real code 
insertion).
I'm assuming you keep the definitions/uses/phi links updated 
approriately, which is where the real pain lies.

You could actually probably get away with only inserting copies for 
modified phis (making sure you remove arguments for defs that no longer 
exist).


> I have
> ideas, but I'd like to hear from someone with more experience in the
> non-rewriting camp.  You certainly can't do the naive thing and drop the
> SSA names in favor of the original names.

>
> FWIW, k.c.04.ssa is the same as j.c.04.ssa, except that dominator opts 
> were
> applied during translation into SSA form.  It may or may not be useful 
> to
> folks that want to poke around at this issue.
>
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]