Lines Matching defs:Flow
48 static const char *const FlowBlockName = "Flow";
113 /// @brief Transforms the control flow graph on one single entry/exit region
116 /// After the transform all "If"/"Then"/"Else" style control flow looks like
130 /// | / 3 = "Flow" blocks, newly inserted flow blocks, rejoins the flow
132 /// 5 5 = "End" block, also rejoins the control flow
135 /// Control flow is expressed as a branch where the true exit goes into the
149 /// |/ 2 = "Loop" optional subregion, with all exits at "Flow" block
150 /// 3 3 = "Flow" block, with back edge to entry block
154 /// The back edge of the "Flow" block is always on the false side of the branch
155 /// while the true side continues the general flow. So the loop condition
213 BasicBlock *needPostfix(BasicBlock *Flow, bool ExitUseAllowed);
243 return "Structurize control flow";
629 /// \brief Create a new flow node and update dominator tree and region info
634 BasicBlock *Flow = BasicBlock::Create(Context, FlowBlockName,
636 DT->addNewBlock(Flow, Dominator);
637 ParentRegion->getRegionInfo()->setRegionFor(Flow, ParentRegion);
638 return Flow;
641 /// \brief Create a new or reuse the previous node as flow node
652 // create a new flow node
653 BasicBlock *Flow = getNextFlow(Entry);
656 changeExit(PrevNode, Flow, true);
657 PrevNode = ParentRegion->getBBNode(Flow);
658 return Flow;
661 /// \brief Returns the region exit if possible, otherwise just a new flow node
662 BasicBlock *StructurizeCFG::needPostfix(BasicBlock *Flow,
666 DT->changeImmediateDominator(Exit, Flow);
667 addPhiValues(Flow, Exit);
670 return getNextFlow(Flow);
720 // Just a linear flow
728 BasicBlock *Flow = needPrefix(false);
732 BasicBlock *Next = needPostfix(Flow, ExitUseAllowed);
735 Conditions.push_back(BranchInst::Create(Entry, Next, BoolUndef, Flow));
736 addPhiValues(Flow, Entry);
737 DT->changeImmediateDominator(Entry, Flow);
778 /// After this function control flow looks like it should be, but