Index: lib/Support/ScopHelper.cpp =================================================================== --- lib/Support/ScopHelper.cpp +++ lib/Support/ScopHelper.cpp @@ -116,23 +116,25 @@ BasicBlock *EntryBB = NewEntry ? NewEntry : OldEntry; BasicBlock *SplitEdgeBB = SplitEdge(EnteringBB, EntryBB, P); - // Once the edge between EnteringBB and EntryBB is split, two cases arise. - // The first is simple. The new block is inserted between EnteringBB and - // EntryBB. In this case no further action is needed. However it might - // happen (if the splitted edge is not critical) that the new block is - // inserted __after__ EntryBB causing the following situation: - // - // EnteringBB - // | - // / \ - // | \-> some_other_BB_not_in_R - // V - // EntryBB - // | - // V - // SplitEdgeBB - // - // In this case we need to swap the role of EntryBB and SplitEdgeBB. + /*************************************************************************** + Once the edge between EnteringBB and EntryBB is split, two cases arise. + The first is simple. The new block is inserted between EnteringBB and + EntryBB. In this case no further action is needed. However it might + happen (if the splitted edge is not critical) that the new block is + inserted __after__ EntryBB causing the following situation: + + EnteringBB + | + / \ + | \-> some_other_BB_not_in_R + V + EntryBB + | + V + SplitEdgeBB + + In this case we need to swap the role of EntryBB and SplitEdgeBB. + ***************************************************************************/ // Check which case SplitEdge produced: if (SplitEdgeBB->getTerminator()->getSuccessor(0) == EntryBB) {