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]
Other format: [Raw text]

Re: Tree-SSA self checking infrastructure


On Wed, 2003-11-19 at 15:29, Andrew MacLeod wrote:
> On Wed, 2003-11-19 at 15:23, Andrew MacLeod wrote:
> > On Wed, 2003-11-19 at 14:39, Andrew MacLeod wrote:
> > > On Wed, 2003-11-19 at 14:13, law@redhat.com wrote:
> > > > In message <20031119190649.GQ16923@atrey.karlin.mff.cuni.cz>, Jan Hubicka write
> > 
> > > 
> > > I haven't run tests or anything on this to make sure I didnt break
> > > anything, but they are running now. I would expect no problems with
> > > existing code, and I would think that if you create a var_map the new
> > > entry point ought to workl just fine. There isnt much new there, so it
> > > should work fine.
> > > 
> > So I need to tweak it a bit, I have a few failing testcases :-| Musta
> > missed something going through so quickly...
> > 
So here's a minor wrinkle in the idea.

if you are rewriting just A, and its versions A_1, A_7, and A_9, and we
have a PHI node:

   B_8 = PHI <B_3(1), B_4(2), A_9(3)>

we aren't trying to turn this PHI node into copies, but we also can't
leave A_9 in the PHI.

We cannot turn A_9 into just A and leave that in the PHI node either.

In fact, the only thing we can do at this point is introduce another
temp, and make that copy.

ie

                  tmp_12 = A_9
                   /
                  /
   B_8 = PHI <B_3(1), B_4(2), tmp_12(3)>

Then we're free to go and ignore the PHI nodes.


Since SSA->normal never had to deal with this (any virtual PHIs are
removed, and all thats left are all the real operands and all real
operands are in the reduction graph.), we'll have to deal with it now.

In order to do this, we'll need a prepass to go and insert those copies
on edges and commit them. I dont see why this couldnt also be done in
remove_ssa_form() as wel, unless you have a more efficient place.

Andrew



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