1 //===-- AMDGPUStructurizeCFG.cpp - ------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// The pass implemented in this file transforms the programs control flow
12 /// graph into a form that's suitable for code generation on hardware that
13 /// implements control flow by execution masking. This currently includes all
14 /// AMD GPUs but may as well be useful for other types of hardware.
16 //===----------------------------------------------------------------------===//
19 #include "llvm/ADT/SCCIterator.h"
20 #include "llvm/Analysis/RegionInfo.h"
21 #include "llvm/Analysis/RegionIterator.h"
22 #include "llvm/Analysis/RegionPass.h"
23 #include "llvm/IR/Module.h"
24 #include "llvm/Transforms/Utils/SSAUpdater.h"
25 #include "llvm/Support/PatternMatch.h"
28 using namespace llvm::PatternMatch;
32 // Definition of the complex types used in this pass.
34 typedef std::pair<BasicBlock *, Value *> BBValuePair;
36 typedef SmallVector<RegionNode*, 8> RNVector;
37 typedef SmallVector<BasicBlock*, 8> BBVector;
38 typedef SmallVector<BranchInst*, 8> BranchVector;
39 typedef SmallVector<BBValuePair, 2> BBValueVector;
41 typedef SmallPtrSet<BasicBlock *, 8> BBSet;
43 typedef DenseMap<PHINode *, BBValueVector> PhiMap;
44 typedef DenseMap<DomTreeNode *, unsigned> DTN2UnsignedMap;
45 typedef DenseMap<BasicBlock *, PhiMap> BBPhiMap;
46 typedef DenseMap<BasicBlock *, Value *> BBPredicates;
47 typedef DenseMap<BasicBlock *, BBPredicates> PredMap;
48 typedef DenseMap<BasicBlock *, BasicBlock*> BB2BBMap;
49 typedef DenseMap<BasicBlock *, BBVector> BB2BBVecMap;
51 // The name for newly created blocks.
53 static const char *FlowBlockName = "Flow";
55 /// @brief Find the nearest common dominator for multiple BasicBlocks
57 /// Helper class for AMDGPUStructurizeCFG
58 /// TODO: Maybe move into common code
59 class NearestCommonDominator {
63 DTN2UnsignedMap IndexMap;
67 bool ExplicitMentioned;
70 /// \brief Start a new query
71 NearestCommonDominator(DominatorTree *DomTree) {
76 /// \brief Add BB to the resulting dominator
77 void addBlock(BasicBlock *BB, bool Remember = true) {
79 DomTreeNode *Node = DT->getNode(BB);
82 unsigned Numbering = 0;
83 for (;Node;Node = Node->getIDom())
84 IndexMap[Node] = ++Numbering;
87 ExplicitMentioned = Remember;
91 for (;Node;Node = Node->getIDom())
92 if (IndexMap.count(Node))
97 assert(Node && "Dominator tree invalid!");
99 unsigned Numbering = IndexMap[Node];
100 if (Numbering > ResultIndex) {
101 Result = Node->getBlock();
102 ResultIndex = Numbering;
103 ExplicitMentioned = Remember && (Result == BB);
104 } else if (Numbering == ResultIndex) {
105 ExplicitMentioned |= Remember;
109 /// \brief Is "Result" one of the BBs added with "Remember" = True?
110 bool wasResultExplicitMentioned() {
111 return ExplicitMentioned;
114 /// \brief Get the query result
115 BasicBlock *getResult() {
120 /// @brief Transforms the control flow graph on one single entry/exit region
123 /// After the transform all "If"/"Then"/"Else" style control flow looks like
135 /// | | 1 = "If" block, calculates the condition
136 /// 4 | 2 = "Then" subregion, runs if the condition is true
137 /// | / 3 = "Flow" blocks, newly inserted flow blocks, rejoins the flow
138 /// |/ 4 = "Else" optional subregion, runs if the condition is false
139 /// 5 5 = "End" block, also rejoins the control flow
142 /// Control flow is expressed as a branch where the true exit goes into the
143 /// "Then"/"Else" region, while the false exit skips the region
144 /// The condition for the optional "Else" region is expressed as a PHI node.
145 /// The incomming values of the PHI node are true for the "If" edge and false
146 /// for the "Then" edge.
148 /// Additionally to that even complicated loops look like this:
155 /// | / 1 = "Entry" block
156 /// |/ 2 = "Loop" optional subregion, with all exits at "Flow" block
157 /// 3 3 = "Flow" block, with back edge to entry block
161 /// The back edge of the "Flow" block is always on the false side of the branch
162 /// while the true side continues the general flow. So the loop condition
163 /// consist of a network of PHI nodes where the true incoming values expresses
164 /// breaks and the false values expresses continue states.
165 class AMDGPUStructurizeCFG : public RegionPass {
170 ConstantInt *BoolTrue;
171 ConstantInt *BoolFalse;
172 UndefValue *BoolUndef;
175 Region *ParentRegion;
182 BBPhiMap DeletedPhis;
183 BB2BBVecMap AddedPhis;
186 BranchVector Conditions;
190 BranchVector LoopConds;
192 RegionNode *PrevNode;
196 void analyzeLoops(RegionNode *N);
198 Value *invert(Value *Condition);
200 Value *buildCondition(BranchInst *Term, unsigned Idx, bool Invert);
202 void gatherPredicates(RegionNode *N);
206 void insertConditions(bool Loops);
208 void delPhiValues(BasicBlock *From, BasicBlock *To);
210 void addPhiValues(BasicBlock *From, BasicBlock *To);
214 void killTerminator(BasicBlock *BB);
216 void changeExit(RegionNode *Node, BasicBlock *NewExit,
217 bool IncludeDominator);
219 BasicBlock *getNextFlow(BasicBlock *Dominator);
221 BasicBlock *needPrefix(bool NeedEmpty);
223 BasicBlock *needPostfix(BasicBlock *Flow, bool ExitUseAllowed);
225 void setPrevNode(BasicBlock *BB);
227 bool dominatesPredicates(BasicBlock *BB, RegionNode *Node);
229 bool isPredictableTrue(RegionNode *Node);
231 void wireFlow(bool ExitUseAllowed, BasicBlock *LoopEnd);
233 void handleLoops(bool ExitUseAllowed, BasicBlock *LoopEnd);
240 AMDGPUStructurizeCFG():
243 initializeRegionInfoPass(*PassRegistry::getPassRegistry());
246 using Pass::doInitialization;
247 virtual bool doInitialization(Region *R, RGPassManager &RGM);
249 virtual bool runOnRegion(Region *R, RGPassManager &RGM);
251 virtual const char *getPassName() const {
252 return "AMDGPU simplify control flow";
255 void getAnalysisUsage(AnalysisUsage &AU) const {
257 AU.addRequired<DominatorTree>();
258 AU.addPreserved<DominatorTree>();
259 RegionPass::getAnalysisUsage(AU);
264 } // end anonymous namespace
266 char AMDGPUStructurizeCFG::ID = 0;
268 /// \brief Initialize the types and constants used in the pass
269 bool AMDGPUStructurizeCFG::doInitialization(Region *R, RGPassManager &RGM) {
270 LLVMContext &Context = R->getEntry()->getContext();
272 Boolean = Type::getInt1Ty(Context);
273 BoolTrue = ConstantInt::getTrue(Context);
274 BoolFalse = ConstantInt::getFalse(Context);
275 BoolUndef = UndefValue::get(Boolean);
280 /// \brief Build up the general order of nodes
281 void AMDGPUStructurizeCFG::orderNodes() {
282 scc_iterator<Region *> I = scc_begin(ParentRegion),
283 E = scc_end(ParentRegion);
284 for (Order.clear(); I != E; ++I) {
285 std::vector<RegionNode *> &Nodes = *I;
286 Order.append(Nodes.begin(), Nodes.end());
290 /// \brief Determine the end of the loops
291 void AMDGPUStructurizeCFG::analyzeLoops(RegionNode *N) {
293 if (N->isSubRegion()) {
294 // Test for exit as back edge
295 BasicBlock *Exit = N->getNodeAs<Region>()->getExit();
296 if (Visited.count(Exit))
297 Loops[Exit] = N->getEntry();
300 // Test for sucessors as back edge
301 BasicBlock *BB = N->getNodeAs<BasicBlock>();
302 BranchInst *Term = cast<BranchInst>(BB->getTerminator());
304 for (unsigned i = 0, e = Term->getNumSuccessors(); i != e; ++i) {
305 BasicBlock *Succ = Term->getSuccessor(i);
307 if (Visited.count(Succ))
313 /// \brief Invert the given condition
314 Value *AMDGPUStructurizeCFG::invert(Value *Condition) {
316 // First: Check if it's a constant
317 if (Condition == BoolTrue)
320 if (Condition == BoolFalse)
323 if (Condition == BoolUndef)
326 // Second: If the condition is already inverted, return the original value
327 if (match(Condition, m_Not(m_Value(Condition))))
330 // Third: Check all the users for an invert
331 BasicBlock *Parent = cast<Instruction>(Condition)->getParent();
332 for (Value::use_iterator I = Condition->use_begin(),
333 E = Condition->use_end(); I != E; ++I) {
335 Instruction *User = dyn_cast<Instruction>(*I);
336 if (!User || User->getParent() != Parent)
339 if (match(*I, m_Not(m_Specific(Condition))))
343 // Last option: Create a new instruction
344 return BinaryOperator::CreateNot(Condition, "", Parent->getTerminator());
347 /// \brief Build the condition for one edge
348 Value *AMDGPUStructurizeCFG::buildCondition(BranchInst *Term, unsigned Idx,
350 Value *Cond = Invert ? BoolFalse : BoolTrue;
351 if (Term->isConditional()) {
352 Cond = Term->getCondition();
360 /// \brief Analyze the predecessors of each block and build up predicates
361 void AMDGPUStructurizeCFG::gatherPredicates(RegionNode *N) {
363 RegionInfo *RI = ParentRegion->getRegionInfo();
364 BasicBlock *BB = N->getEntry();
365 BBPredicates &Pred = Predicates[BB];
366 BBPredicates &LPred = LoopPreds[BB];
368 for (pred_iterator PI = pred_begin(BB), PE = pred_end(BB);
371 // Ignore it if it's a branch from outside into our region entry
372 if (!ParentRegion->contains(*PI))
375 Region *R = RI->getRegionFor(*PI);
376 if (R == ParentRegion) {
378 // It's a top level block in our region
379 BranchInst *Term = cast<BranchInst>((*PI)->getTerminator());
380 for (unsigned i = 0, e = Term->getNumSuccessors(); i != e; ++i) {
381 BasicBlock *Succ = Term->getSuccessor(i);
385 if (Visited.count(*PI)) {
386 // Normal forward edge
387 if (Term->isConditional()) {
388 // Try to treat it like an ELSE block
389 BasicBlock *Other = Term->getSuccessor(!i);
390 if (Visited.count(Other) && !Loops.count(Other) &&
391 !Pred.count(Other) && !Pred.count(*PI)) {
393 Pred[Other] = BoolFalse;
394 Pred[*PI] = BoolTrue;
398 Pred[*PI] = buildCondition(Term, i, false);
402 LPred[*PI] = buildCondition(Term, i, true);
408 // It's an exit from a sub region
409 while(R->getParent() != ParentRegion)
412 // Edge from inside a subregion to its entry, ignore it
416 BasicBlock *Entry = R->getEntry();
417 if (Visited.count(Entry))
418 Pred[Entry] = BoolTrue;
420 LPred[Entry] = BoolFalse;
425 /// \brief Collect various loop and predicate infos
426 void AMDGPUStructurizeCFG::collectInfos() {
435 // Reset the visited nodes
438 for (RNVector::reverse_iterator OI = Order.rbegin(), OE = Order.rend();
441 // Analyze all the conditions leading to a node
442 gatherPredicates(*OI);
444 // Remember that we've seen this node
445 Visited.insert((*OI)->getEntry());
447 // Find the last back edges
452 /// \brief Insert the missing branch conditions
453 void AMDGPUStructurizeCFG::insertConditions(bool Loops) {
454 BranchVector &Conds = Loops ? LoopConds : Conditions;
455 Value *Default = Loops ? BoolTrue : BoolFalse;
456 SSAUpdater PhiInserter;
458 for (BranchVector::iterator I = Conds.begin(),
459 E = Conds.end(); I != E; ++I) {
461 BranchInst *Term = *I;
462 assert(Term->isConditional());
464 BasicBlock *Parent = Term->getParent();
465 BasicBlock *SuccTrue = Term->getSuccessor(0);
466 BasicBlock *SuccFalse = Term->getSuccessor(1);
468 PhiInserter.Initialize(Boolean, "");
469 PhiInserter.AddAvailableValue(&Func->getEntryBlock(), Default);
470 PhiInserter.AddAvailableValue(Loops ? SuccFalse : Parent, Default);
472 BBPredicates &Preds = Loops ? LoopPreds[SuccFalse] : Predicates[SuccTrue];
474 NearestCommonDominator Dominator(DT);
475 Dominator.addBlock(Parent, false);
477 Value *ParentValue = 0;
478 for (BBPredicates::iterator PI = Preds.begin(), PE = Preds.end();
481 if (PI->first == Parent) {
482 ParentValue = PI->second;
485 PhiInserter.AddAvailableValue(PI->first, PI->second);
486 Dominator.addBlock(PI->first);
490 Term->setCondition(ParentValue);
492 if (!Dominator.wasResultExplicitMentioned())
493 PhiInserter.AddAvailableValue(Dominator.getResult(), Default);
495 Term->setCondition(PhiInserter.GetValueInMiddleOfBlock(Parent));
500 /// \brief Remove all PHI values coming from "From" into "To" and remember
501 /// them in DeletedPhis
502 void AMDGPUStructurizeCFG::delPhiValues(BasicBlock *From, BasicBlock *To) {
503 PhiMap &Map = DeletedPhis[To];
504 for (BasicBlock::iterator I = To->begin(), E = To->end();
505 I != E && isa<PHINode>(*I);) {
507 PHINode &Phi = cast<PHINode>(*I++);
508 while (Phi.getBasicBlockIndex(From) != -1) {
509 Value *Deleted = Phi.removeIncomingValue(From, false);
510 Map[&Phi].push_back(std::make_pair(From, Deleted));
515 /// \brief Add a dummy PHI value as soon as we knew the new predecessor
516 void AMDGPUStructurizeCFG::addPhiValues(BasicBlock *From, BasicBlock *To) {
517 for (BasicBlock::iterator I = To->begin(), E = To->end();
518 I != E && isa<PHINode>(*I);) {
520 PHINode &Phi = cast<PHINode>(*I++);
521 Value *Undef = UndefValue::get(Phi.getType());
522 Phi.addIncoming(Undef, From);
524 AddedPhis[To].push_back(From);
527 /// \brief Add the real PHI value as soon as everything is set up
528 void AMDGPUStructurizeCFG::setPhiValues() {
531 for (BB2BBVecMap::iterator AI = AddedPhis.begin(), AE = AddedPhis.end();
534 BasicBlock *To = AI->first;
535 BBVector &From = AI->second;
537 if (!DeletedPhis.count(To))
540 PhiMap &Map = DeletedPhis[To];
541 for (PhiMap::iterator PI = Map.begin(), PE = Map.end();
544 PHINode *Phi = PI->first;
545 Value *Undef = UndefValue::get(Phi->getType());
546 Updater.Initialize(Phi->getType(), "");
547 Updater.AddAvailableValue(&Func->getEntryBlock(), Undef);
548 Updater.AddAvailableValue(To, Undef);
550 NearestCommonDominator Dominator(DT);
551 Dominator.addBlock(To, false);
552 for (BBValueVector::iterator VI = PI->second.begin(),
553 VE = PI->second.end(); VI != VE; ++VI) {
555 Updater.AddAvailableValue(VI->first, VI->second);
556 Dominator.addBlock(VI->first);
559 if (!Dominator.wasResultExplicitMentioned())
560 Updater.AddAvailableValue(Dominator.getResult(), Undef);
562 for (BBVector::iterator FI = From.begin(), FE = From.end();
565 int Idx = Phi->getBasicBlockIndex(*FI);
567 Phi->setIncomingValue(Idx, Updater.GetValueAtEndOfBlock(*FI));
571 DeletedPhis.erase(To);
573 assert(DeletedPhis.empty());
576 /// \brief Remove phi values from all successors and then remove the terminator.
577 void AMDGPUStructurizeCFG::killTerminator(BasicBlock *BB) {
578 TerminatorInst *Term = BB->getTerminator();
582 for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB);
585 delPhiValues(BB, *SI);
588 Term->eraseFromParent();
591 /// \brief Let node exit(s) point to NewExit
592 void AMDGPUStructurizeCFG::changeExit(RegionNode *Node, BasicBlock *NewExit,
593 bool IncludeDominator) {
595 if (Node->isSubRegion()) {
596 Region *SubRegion = Node->getNodeAs<Region>();
597 BasicBlock *OldExit = SubRegion->getExit();
598 BasicBlock *Dominator = 0;
600 // Find all the edges from the sub region to the exit
601 for (pred_iterator I = pred_begin(OldExit), E = pred_end(OldExit);
604 BasicBlock *BB = *I++;
605 if (!SubRegion->contains(BB))
608 // Modify the edges to point to the new exit
609 delPhiValues(BB, OldExit);
610 BB->getTerminator()->replaceUsesOfWith(OldExit, NewExit);
611 addPhiValues(BB, NewExit);
613 // Find the new dominator (if requested)
614 if (IncludeDominator) {
618 Dominator = DT->findNearestCommonDominator(Dominator, BB);
622 // Change the dominator (if requested)
624 DT->changeImmediateDominator(NewExit, Dominator);
626 // Update the region info
627 SubRegion->replaceExit(NewExit);
630 BasicBlock *BB = Node->getNodeAs<BasicBlock>();
632 BranchInst::Create(NewExit, BB);
633 addPhiValues(BB, NewExit);
634 if (IncludeDominator)
635 DT->changeImmediateDominator(NewExit, BB);
639 /// \brief Create a new flow node and update dominator tree and region info
640 BasicBlock *AMDGPUStructurizeCFG::getNextFlow(BasicBlock *Dominator) {
641 LLVMContext &Context = Func->getContext();
642 BasicBlock *Insert = Order.empty() ? ParentRegion->getExit() :
643 Order.back()->getEntry();
644 BasicBlock *Flow = BasicBlock::Create(Context, FlowBlockName,
646 DT->addNewBlock(Flow, Dominator);
647 ParentRegion->getRegionInfo()->setRegionFor(Flow, ParentRegion);
651 /// \brief Create a new or reuse the previous node as flow node
652 BasicBlock *AMDGPUStructurizeCFG::needPrefix(bool NeedEmpty) {
654 BasicBlock *Entry = PrevNode->getEntry();
656 if (!PrevNode->isSubRegion()) {
657 killTerminator(Entry);
658 if (!NeedEmpty || Entry->getFirstInsertionPt() == Entry->end())
663 // create a new flow node
664 BasicBlock *Flow = getNextFlow(Entry);
667 changeExit(PrevNode, Flow, true);
668 PrevNode = ParentRegion->getBBNode(Flow);
672 /// \brief Returns the region exit if possible, otherwise just a new flow node
673 BasicBlock *AMDGPUStructurizeCFG::needPostfix(BasicBlock *Flow,
674 bool ExitUseAllowed) {
676 if (Order.empty() && ExitUseAllowed) {
677 BasicBlock *Exit = ParentRegion->getExit();
678 DT->changeImmediateDominator(Exit, Flow);
679 addPhiValues(Flow, Exit);
682 return getNextFlow(Flow);
685 /// \brief Set the previous node
686 void AMDGPUStructurizeCFG::setPrevNode(BasicBlock *BB) {
687 PrevNode = ParentRegion->contains(BB) ? ParentRegion->getBBNode(BB) : 0;
690 /// \brief Does BB dominate all the predicates of Node ?
691 bool AMDGPUStructurizeCFG::dominatesPredicates(BasicBlock *BB, RegionNode *Node) {
692 BBPredicates &Preds = Predicates[Node->getEntry()];
693 for (BBPredicates::iterator PI = Preds.begin(), PE = Preds.end();
696 if (!DT->dominates(BB, PI->first))
702 /// \brief Can we predict that this node will always be called?
703 bool AMDGPUStructurizeCFG::isPredictableTrue(RegionNode *Node) {
705 BBPredicates &Preds = Predicates[Node->getEntry()];
706 bool Dominated = false;
708 // Regionentry is always true
712 for (BBPredicates::iterator I = Preds.begin(), E = Preds.end();
715 if (I->second != BoolTrue)
718 if (!Dominated && DT->dominates(I->first, PrevNode->getEntry()))
722 // TODO: The dominator check is too strict
726 /// Take one node from the order vector and wire it up
727 void AMDGPUStructurizeCFG::wireFlow(bool ExitUseAllowed,
728 BasicBlock *LoopEnd) {
730 RegionNode *Node = Order.pop_back_val();
731 Visited.insert(Node->getEntry());
733 if (isPredictableTrue(Node)) {
734 // Just a linear flow
736 changeExit(PrevNode, Node->getEntry(), true);
741 // Insert extra prefix node (or reuse last one)
742 BasicBlock *Flow = needPrefix(false);
744 // Insert extra postfix node (or use exit instead)
745 BasicBlock *Entry = Node->getEntry();
746 BasicBlock *Next = needPostfix(Flow, ExitUseAllowed);
748 // let it point to entry and next block
749 Conditions.push_back(BranchInst::Create(Entry, Next, BoolUndef, Flow));
750 addPhiValues(Flow, Entry);
751 DT->changeImmediateDominator(Entry, Flow);
754 while (!Order.empty() && !Visited.count(LoopEnd) &&
755 dominatesPredicates(Entry, Order.back())) {
756 handleLoops(false, LoopEnd);
759 changeExit(PrevNode, Next, false);
764 void AMDGPUStructurizeCFG::handleLoops(bool ExitUseAllowed,
765 BasicBlock *LoopEnd) {
766 RegionNode *Node = Order.back();
767 BasicBlock *LoopStart = Node->getEntry();
769 if (!Loops.count(LoopStart)) {
770 wireFlow(ExitUseAllowed, LoopEnd);
774 if (!isPredictableTrue(Node))
775 LoopStart = needPrefix(true);
777 LoopEnd = Loops[Node->getEntry()];
778 wireFlow(false, LoopEnd);
779 while (!Visited.count(LoopEnd)) {
780 handleLoops(false, LoopEnd);
783 // Create an extra loop end node
784 LoopEnd = needPrefix(false);
785 BasicBlock *Next = needPostfix(LoopEnd, ExitUseAllowed);
786 LoopConds.push_back(BranchInst::Create(Next, LoopStart,
787 BoolUndef, LoopEnd));
788 addPhiValues(LoopEnd, LoopStart);
792 /// After this function control flow looks like it should be, but
793 /// branches and PHI nodes only have undefined conditions.
794 void AMDGPUStructurizeCFG::createFlow() {
796 BasicBlock *Exit = ParentRegion->getExit();
797 bool EntryDominatesExit = DT->dominates(ParentRegion->getEntry(), Exit);
807 while (!Order.empty()) {
808 handleLoops(EntryDominatesExit, 0);
812 changeExit(PrevNode, Exit, EntryDominatesExit);
814 assert(EntryDominatesExit);
817 /// Handle a rare case where the disintegrated nodes instructions
818 /// no longer dominate all their uses. Not sure if this is really nessasary
819 void AMDGPUStructurizeCFG::rebuildSSA() {
821 for (Region::block_iterator I = ParentRegion->block_begin(),
822 E = ParentRegion->block_end();
826 for (BasicBlock::iterator II = BB->begin(), IE = BB->end();
829 bool Initialized = false;
830 for (Use *I = &II->use_begin().getUse(), *Next; I; I = Next) {
834 Instruction *User = cast<Instruction>(I->getUser());
835 if (User->getParent() == BB) {
838 } else if (PHINode *UserPN = dyn_cast<PHINode>(User)) {
839 if (UserPN->getIncomingBlock(*I) == BB)
843 if (DT->dominates(II, User))
847 Value *Undef = UndefValue::get(II->getType());
848 Updater.Initialize(II->getType(), "");
849 Updater.AddAvailableValue(&Func->getEntryBlock(), Undef);
850 Updater.AddAvailableValue(BB, II);
853 Updater.RewriteUseAfterInsertions(*I);
859 /// \brief Run the transformation for each region found
860 bool AMDGPUStructurizeCFG::runOnRegion(Region *R, RGPassManager &RGM) {
861 if (R->isTopLevelRegion())
864 Func = R->getEntry()->getParent();
867 DT = &getAnalysis<DominatorTree>();
872 insertConditions(false);
873 insertConditions(true);
891 /// \brief Create the pass
892 Pass *llvm::createAMDGPUStructurizeCFGPass() {
893 return new AMDGPUStructurizeCFG();