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.0106222330020.19001-100000@www.cgsoftware.com>you w
rite:
  > Yes, yes, I know, I was just not completely awake when i wrote that.
  > However, GVN is doing a DFS over the SCC's of the graph.  It's just
  > another thing to worry about to keep track of where the new definition is
  > coming from (if it's different than the old defintiion), so I can update
  > some pointer  that no other  pass but one needs, and that pass can easily
  > compute.
But in this case you aren't going to be changing the DF, and thus you 
won't need to change the embedded pointer.


  > If they are specific to one pass, they don't belong in the phi structure,
  > they belong in that pass.
Actually, thinking about it, this information is not specific to one pass.

Cnsider conditional constant propagation.  One of its key optimizations
is that it can prove that some edges in the CFG are unexecutable.  When we
can prove that an edge is unexecutable, we want to reflect that in the 
PHI nodes by removing the alternative for that edge.  How do you propose that
we update those PHI nodes in that case?

Consider the aggressive form of dead code elimination from Morgan's book.  It
creates similar conditions in that it can prove that certain conditional
branches are dead.  This means we have edges which are executable, but whic
serve no useful purpose.  By making the jump unconditional to the immediate
post dominator of block, we've just effectively made some edges in the CFG
unexecutable.  We'd like to remove any PHI alternatives related to those
edges, how do you propose to do that?

And finally, we use that information during the conversion from SSA back into
normal form to trivially determine where copy operations need to be inserted
during conversion of a PHI node into a series of copy operations.

jeff


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