Lines Matching refs:OrigHeader
80 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)
142 LLVMContext &C = OrigHeader->getContext();
153 // The original users in the OrigHeader are already using the original
156 if (UserBB == OrigHeader)
192 BasicBlock *OrigHeader = L->getHeader();
195 BranchInst *BI = dyn_cast<BranchInst>(OrigHeader->getTerminator());
202 if (!L->isLoopExiting(OrigHeader))
222 Metrics.analyzeBasicBlock(OrigHeader, *TTI, EphValues);
271 // Begin by walking OrigHeader and populating ValueMap with an entry for
273 BasicBlock::iterator I = OrigHeader->begin(), E = OrigHeader->end();
332 // Along with all the other instructions, we just cloned OrigHeader's
333 // terminator into OrigPreHeader. Fix up the PHI nodes in each of OrigHeader's
334 // successors by duplicating their incoming values for OrigHeader.
335 TerminatorInst *TI = OrigHeader->getTerminator();
339 PN->addIncoming(PN->getIncomingValueForBlock(OrigHeader), OrigPreheader);
341 // Now that OrigPreHeader has a clone of OrigHeader's terminator, remove
343 // remove the corresponding incoming values from the PHI nodes in OrigHeader.
348 RewriteUsesOfClonedInstructions(OrigHeader, OrigPreheader, ValueMap);
374 DomTreeNode *OrigHeaderNode = DT->getNode(OrigHeader);
384 // Update OrigHeader to be dominated by the new header block.
385 DT->changeImmediateDominator(OrigHeader, OrigLatch);
427 // Update OrigHeader to be dominated by the new header block.
429 DT->changeImmediateDominator(OrigHeader, OrigLatch);
434 DomTreeNode *OrigHeaderNode = DT->getNode(OrigHeader);
466 // the OrigHeader block into OrigLatch. This will succeed if they are
469 MergeBlockIntoPredecessor(OrigHeader, DT, LI);