Home | History | Annotate | Download | only in Utils

Lines Matching refs:Header

188 void CodeExtractor::severSplitPHINodes(BasicBlock *&Header) {
192 if (Header != &Header->getParent()->getEntryBlock()) {
193 PHINode *PN = dyn_cast<PHINode>(Header->begin());
196 // If the header node contains any PHI nodes, check to see if there is more
198 // header block into two.
210 // Otherwise, we need to split the header block into two pieces: one
214 BasicBlock::iterator AfterPHIs = Header->getFirstNonPHI()->getIterator();
215 BasicBlock *NewBB = Header->splitBasicBlock(AfterPHIs,
216 Header->getName()+".ce");
219 // header of the region.
220 BasicBlock *OldPred = Header;
223 Header = NewBB;
231 // region to go to the new header block instead of the old header block.
294 BasicBlock *header,
305 case 1: RetTy = Type::getVoidTy(header->getContext()); break;
306 case 2: RetTy = Type::getInt1Ty(header->getContext()); break;
307 default: RetTy = Type::getInt16Ty(header->getContext()); break;
349 header->getName(), M);
365 Idx[0] = Constant::getNullValue(Type::getInt32Ty(header->getContext()));
366 Idx[1] = ConstantInt::get(Type::getInt32Ty(header->getContext()), i);
394 std::vector<User*> Users(header->user_begin(), header->user_end());
401 TI->replaceUsesOfWith(header, newHeader);
420 /// the call instruction, splitting any PHI nodes in the header block as
696 // Assumption: this is a single-entry code region, and the header is the first
698 BasicBlock *header = *Blocks.begin();
701 severSplitPHINodes(header);
707 Function *oldFunction = header->getParent();
710 BasicBlock *codeReplacer = BasicBlock::Create(header->getContext(),
712 header);
716 BasicBlock *newFuncRoot = BasicBlock::Create(header->getContext(),
718 newFuncRoot->getInstList().push_back(BranchInst::Create(header));
732 Function *newFunction = constructFunction(inputs, outputs, header,
741 // Loop over all of the PHI nodes in the header block, and change any
743 for (BasicBlock::iterator I = header->begin(); isa<PHINode>(I); ++I) {