Lines Matching refs:BasicBlock
29 typedef std::pair<BasicBlock *, Value *> BBValuePair;
32 typedef SmallVector<BasicBlock*, 8> BBVector;
36 typedef SmallPtrSet<BasicBlock *, 8> BBSet;
39 typedef MapVector<BasicBlock *, BBVector> BB2BBVecMap;
42 typedef DenseMap<BasicBlock *, PhiMap> BBPhiMap;
43 typedef DenseMap<BasicBlock *, Value *> BBPredicates;
44 typedef DenseMap<BasicBlock *, BBPredicates> PredMap;
45 typedef DenseMap<BasicBlock *, BasicBlock*> BB2BBMap;
60 BasicBlock *Result;
72 void addBlock(BasicBlock *BB, bool Remember = true) { in addBlock()
109 BasicBlock *getResult() { in getResult()
199 void delPhiValues(BasicBlock *From, BasicBlock *To);
201 void addPhiValues(BasicBlock *From, BasicBlock *To);
205 void killTerminator(BasicBlock *BB);
207 void changeExit(RegionNode *Node, BasicBlock *NewExit,
210 BasicBlock *getNextFlow(BasicBlock *Dominator);
212 BasicBlock *needPrefix(bool NeedEmpty);
214 BasicBlock *needPostfix(BasicBlock *Flow, bool ExitUseAllowed);
216 void setPrevNode(BasicBlock *BB);
218 bool dominatesPredicates(BasicBlock *BB, RegionNode *Node);
222 void wireFlow(bool ExitUseAllowed, BasicBlock *LoopEnd);
224 void handleLoops(bool ExitUseAllowed, BasicBlock *LoopEnd);
292 BasicBlock *Exit = N->getNodeAs<Region>()->getExit(); in analyzeLoops()
298 BasicBlock *BB = N->getNodeAs<BasicBlock>(); in analyzeLoops()
302 BasicBlock *Succ = Term->getSuccessor(i); in analyzeLoops()
328 BasicBlock *Parent = Inst->getParent(); in invert()
339 BasicBlock &EntryBlock = Arg->getParent()->getEntryBlock(); in invert()
364 BasicBlock *BB = N->getEntry(); in gatherPredicates()
381 BasicBlock *Succ = Term->getSuccessor(i); in gatherPredicates()
389 BasicBlock *Other = Term->getSuccessor(!i); in gatherPredicates()
416 BasicBlock *Entry = R->getEntry(); in gatherPredicates()
460 BasicBlock *Parent = Term->getParent(); in insertConditions()
461 BasicBlock *SuccTrue = Term->getSuccessor(0); in insertConditions()
462 BasicBlock *SuccFalse = Term->getSuccessor(1); in insertConditions()
498 void StructurizeCFG::delPhiValues(BasicBlock *From, BasicBlock *To) { in delPhiValues()
500 for (BasicBlock::iterator I = To->begin(), E = To->end(); in delPhiValues()
512 void StructurizeCFG::addPhiValues(BasicBlock *From, BasicBlock *To) { in addPhiValues()
513 for (BasicBlock::iterator I = To->begin(), E = To->end(); in addPhiValues()
529 BasicBlock *To = AI->first; in setPhiValues()
572 void StructurizeCFG::killTerminator(BasicBlock *BB) { in killTerminator()
587 void StructurizeCFG::changeExit(RegionNode *Node, BasicBlock *NewExit, in changeExit()
591 BasicBlock *OldExit = SubRegion->getExit(); in changeExit()
592 BasicBlock *Dominator = nullptr; in changeExit()
598 BasicBlock *BB = *I++; in changeExit()
624 BasicBlock *BB = Node->getNodeAs<BasicBlock>(); in changeExit()
634 BasicBlock *StructurizeCFG::getNextFlow(BasicBlock *Dominator) { in getNextFlow()
636 BasicBlock *Insert = Order.empty() ? ParentRegion->getExit() : in getNextFlow()
638 BasicBlock *Flow = BasicBlock::Create(Context, FlowBlockName, in getNextFlow()
646 BasicBlock *StructurizeCFG::needPrefix(bool NeedEmpty) { in needPrefix()
647 BasicBlock *Entry = PrevNode->getEntry(); in needPrefix()
657 BasicBlock *Flow = getNextFlow(Entry); in needPrefix()
666 BasicBlock *StructurizeCFG::needPostfix(BasicBlock *Flow, in needPostfix()
669 BasicBlock *Exit = ParentRegion->getExit(); in needPostfix()
678 void StructurizeCFG::setPrevNode(BasicBlock *BB) { in setPrevNode()
684 bool StructurizeCFG::dominatesPredicates(BasicBlock *BB, RegionNode *Node) { in dominatesPredicates()
720 BasicBlock *LoopEnd) { in wireFlow()
733 BasicBlock *Flow = needPrefix(false); in wireFlow()
736 BasicBlock *Entry = Node->getEntry(); in wireFlow()
737 BasicBlock *Next = needPostfix(Flow, ExitUseAllowed); in wireFlow()
756 BasicBlock *LoopEnd) { in handleLoops()
758 BasicBlock *LoopStart = Node->getEntry(); in handleLoops()
780 BasicBlock *NewEntry = in handleLoops()
781 BasicBlock::Create(LoopStart->getContext(), in handleLoops()
790 BasicBlock *Next = needPostfix(LoopEnd, ExitUseAllowed); in handleLoops()
800 BasicBlock *Exit = ParentRegion->getExit(); in createFlow()
826 for (BasicBlock::iterator II = BB->begin(), IE = BB->end(); in rebuildSSA()