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


In message <1069278417.10538.26.camel@p4>, Andrew MacLeod writes:
 >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 Hub
 >icka 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.
Na, already thought of this one.


 >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)>
Nope.   If you run into this, then you need to rewrite both A & B.

We mark every root variable appearing in a PHI node we thread through
as needing to be rewritten.

That in turn may trigger other variables to rewrite, so you add them
to your set and iterate until you reach a steady state.

Now the hope (of course) is that this doesn't happen often and that it's
cheap to build the set of variables needing to be rewritten :-)


 >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.
Hmmm, yours might be more efficient.  It may ultimately depend on how
often this kind of thing happens.

jeff


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