This is the mail archive of the gcc-patches@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: Minor SSA cleanups


  In message <Pine.LNX.4.33.0106220536570.5894-100000@www.cgsoftware.com>you wr
ite:
  > I'll happily agree to disagree about whether df.[ch] is
  > overkill/approriate. We just seem to have a difference of opinion.
  > 
  > However, the above statement would be incorrect.
  > Think about what happens now when I want to replace part of a phi node,
  > like SSA GVN can, and often does, do.
Yes, I've thought about that -- and in that case it seems to me that you
absolutely shouldn't muck around with the block #.  

The fact that you're replacing one register with a different register or
a constant doesn't change the fact that the new register/constant needs
to be associated with the same edge as the original register.

  > However, updating them is annoying.
Not really.  I have CCP doing that.

  > By keeping the block number there, you *force* SSA-GVN to keep track of
  > where each register is def'd.  Without it, I could do a simple replacement
  > of register with register.
Why can't you do the simple replacement.  Details please.

  > If you move a register def, you need to hunt down all the phi nodes using
  > that register, and replace the block number/pointer.
OK.  Are you moving it into a new dominance frontier?  If so, then it seems
to me you would need to rebuild the SSA graph.  If you're keeping it within
the same frontier, then it seems to me you don't need to update the 
embedded edge pointer.

jeff


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