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

Re: [tree-ssa] Patch ping


On Wed, 2003-12-03 at 12:44, Zdenek Dvorak wrote:
> Hello,
> 
> > So this is never called on a block with just one incoming edge and a
> > back edge?
> 
> no; it is used to split loops with shared headers, which is exactly when
> there are more back edges comming into the loop header.
> 

Sorry, maybe Im being dense :-)

if you have one incoming edge and 2 back edges?

ie, like:

  BB4  goto BB5

  BB5  loop start
    PHI a_4=<a_3(4), a_2(6), a_1(7)>
   
  BB 6 goto BB5  <backedge>
 
  BB 7 goto BB5  <backedge>

we have 3 incoming edges to BB5, 2 are back edges, and we dont need any
new PHI nodes, we just change the argument that use to come from the
non-back edge to come from the dummy block.

  BB4 goto BB10
  
  BB10   (dummy block)

  BB5  loop start
    PHI a_4=<a_3(10), a_2(6), a_1(7)>

  BB6 goto BB5

  BB7 goto BB5


Its not the number of back edges Im concerned with, its the number of
edges going to the resulting dummy Im looking at. ie, 
  #incoming-edges - #back-edges == 1  

Or do I have something backwards?  Apologies if I do :-)

Andrew





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