Lines Matching refs:OrigHeader
79 static void RewriteUsesOfClonedInstructions(BasicBlock *OrigHeader,
84 BasicBlock::iterator I, E = OrigHeader->end();
85 for (I = OrigHeader->begin(); PHINode *PN = dyn_cast<PHINode>(I); ++I)
88 // Now fix up users of the instructions in OrigHeader, inserting PHI nodes
91 for (I = OrigHeader->begin(); I != E; ++I) {
104 SSA.AddAvailableValue(OrigHeader, OrigHeaderVal);
107 // Visit each use of the OrigHeader instruction.
123 // The original users in the OrigHeader are already using the
125 if (UserBB == OrigHeader)
145 // The original users in the OrigHeader are already using the original
148 if (UserBB == OrigHeader)
205 BasicBlock *OrigHeader = L->getHeader();
208 BranchInst *BI = dyn_cast<BranchInst>(OrigHeader->getTerminator());
215 if (!L->isLoopExiting(OrigHeader))
236 Metrics.analyzeBasicBlock(OrigHeader, *TTI, EphValues);
289 // Begin by walking OrigHeader and populating ValueMap with an entry for
291 BasicBlock::iterator I = OrigHeader->begin(), E = OrigHeader->end();
374 // Along with all the other instructions, we just cloned OrigHeader's
375 // terminator into OrigPreHeader. Fix up the PHI nodes in each of OrigHeader's
376 // successors by duplicating their incoming values for OrigHeader.
377 TerminatorInst *TI = OrigHeader->getTerminator();
381 PN->addIncoming(PN->getIncomingValueForBlock(OrigHeader), OrigPreheader);
383 // Now that OrigPreHeader has a clone of OrigHeader's terminator, remove
385 // remove the corresponding incoming values from the PHI nodes in OrigHeader.
392 RewriteUsesOfClonedInstructions(OrigHeader, OrigPreheader, ValueMap,
399 insertDebugValuesForPHIs(OrigHeader, InsertedPHIs);
408 // the DT about the removed edge to the OrigHeader (that got removed).
412 Updates.push_back({DominatorTree::Delete, OrigPreheader, OrigHeader});
476 // the OrigHeader block into OrigLatch. This will succeed if they are
479 MergeBlockIntoPredecessor(OrigHeader, DT, LI);