10b57cec5SDimitry Andric //===- ThreadSafetyTIL.cpp ------------------------------------------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric 
90b57cec5SDimitry Andric #include "clang/Analysis/Analyses/ThreadSafetyTIL.h"
100b57cec5SDimitry Andric #include "clang/Basic/LLVM.h"
110b57cec5SDimitry Andric #include "llvm/Support/Casting.h"
120b57cec5SDimitry Andric #include <cassert>
130b57cec5SDimitry Andric #include <cstddef>
140b57cec5SDimitry Andric 
150b57cec5SDimitry Andric using namespace clang;
160b57cec5SDimitry Andric using namespace threadSafety;
170b57cec5SDimitry Andric using namespace til;
180b57cec5SDimitry Andric 
getUnaryOpcodeString(TIL_UnaryOpcode Op)190b57cec5SDimitry Andric StringRef til::getUnaryOpcodeString(TIL_UnaryOpcode Op) {
200b57cec5SDimitry Andric   switch (Op) {
210b57cec5SDimitry Andric     case UOP_Minus:    return "-";
220b57cec5SDimitry Andric     case UOP_BitNot:   return "~";
230b57cec5SDimitry Andric     case UOP_LogicNot: return "!";
240b57cec5SDimitry Andric   }
250b57cec5SDimitry Andric   return {};
260b57cec5SDimitry Andric }
270b57cec5SDimitry Andric 
getBinaryOpcodeString(TIL_BinaryOpcode Op)280b57cec5SDimitry Andric StringRef til::getBinaryOpcodeString(TIL_BinaryOpcode Op) {
290b57cec5SDimitry Andric   switch (Op) {
300b57cec5SDimitry Andric     case BOP_Mul:      return "*";
310b57cec5SDimitry Andric     case BOP_Div:      return "/";
320b57cec5SDimitry Andric     case BOP_Rem:      return "%";
330b57cec5SDimitry Andric     case BOP_Add:      return "+";
340b57cec5SDimitry Andric     case BOP_Sub:      return "-";
350b57cec5SDimitry Andric     case BOP_Shl:      return "<<";
360b57cec5SDimitry Andric     case BOP_Shr:      return ">>";
370b57cec5SDimitry Andric     case BOP_BitAnd:   return "&";
380b57cec5SDimitry Andric     case BOP_BitXor:   return "^";
390b57cec5SDimitry Andric     case BOP_BitOr:    return "|";
400b57cec5SDimitry Andric     case BOP_Eq:       return "==";
410b57cec5SDimitry Andric     case BOP_Neq:      return "!=";
420b57cec5SDimitry Andric     case BOP_Lt:       return "<";
430b57cec5SDimitry Andric     case BOP_Leq:      return "<=";
440b57cec5SDimitry Andric     case BOP_Cmp:      return "<=>";
450b57cec5SDimitry Andric     case BOP_LogicAnd: return "&&";
460b57cec5SDimitry Andric     case BOP_LogicOr:  return "||";
470b57cec5SDimitry Andric   }
480b57cec5SDimitry Andric   return {};
490b57cec5SDimitry Andric }
500b57cec5SDimitry Andric 
force()510b57cec5SDimitry Andric SExpr* Future::force() {
520b57cec5SDimitry Andric   Status = FS_evaluating;
530b57cec5SDimitry Andric   Result = compute();
540b57cec5SDimitry Andric   Status = FS_done;
550b57cec5SDimitry Andric   return Result;
560b57cec5SDimitry Andric }
570b57cec5SDimitry Andric 
addPredecessor(BasicBlock * Pred)580b57cec5SDimitry Andric unsigned BasicBlock::addPredecessor(BasicBlock *Pred) {
590b57cec5SDimitry Andric   unsigned Idx = Predecessors.size();
600b57cec5SDimitry Andric   Predecessors.reserveCheck(1, Arena);
610b57cec5SDimitry Andric   Predecessors.push_back(Pred);
620b57cec5SDimitry Andric   for (auto *E : Args) {
630b57cec5SDimitry Andric     if (auto *Ph = dyn_cast<Phi>(E)) {
640b57cec5SDimitry Andric       Ph->values().reserveCheck(1, Arena);
650b57cec5SDimitry Andric       Ph->values().push_back(nullptr);
660b57cec5SDimitry Andric     }
670b57cec5SDimitry Andric   }
680b57cec5SDimitry Andric   return Idx;
690b57cec5SDimitry Andric }
700b57cec5SDimitry Andric 
reservePredecessors(unsigned NumPreds)710b57cec5SDimitry Andric void BasicBlock::reservePredecessors(unsigned NumPreds) {
720b57cec5SDimitry Andric   Predecessors.reserve(NumPreds, Arena);
730b57cec5SDimitry Andric   for (auto *E : Args) {
740b57cec5SDimitry Andric     if (auto *Ph = dyn_cast<Phi>(E)) {
750b57cec5SDimitry Andric       Ph->values().reserve(NumPreds, Arena);
760b57cec5SDimitry Andric     }
770b57cec5SDimitry Andric   }
780b57cec5SDimitry Andric }
790b57cec5SDimitry Andric 
800b57cec5SDimitry Andric // If E is a variable, then trace back through any aliases or redundant
810b57cec5SDimitry Andric // Phi nodes to find the canonical definition.
getCanonicalVal(const SExpr * E)820b57cec5SDimitry Andric const SExpr *til::getCanonicalVal(const SExpr *E) {
830b57cec5SDimitry Andric   while (true) {
840b57cec5SDimitry Andric     if (const auto *V = dyn_cast<Variable>(E)) {
850b57cec5SDimitry Andric       if (V->kind() == Variable::VK_Let) {
860b57cec5SDimitry Andric         E = V->definition();
870b57cec5SDimitry Andric         continue;
880b57cec5SDimitry Andric       }
890b57cec5SDimitry Andric     }
900b57cec5SDimitry Andric     if (const auto *Ph = dyn_cast<Phi>(E)) {
910b57cec5SDimitry Andric       if (Ph->status() == Phi::PH_SingleVal) {
920b57cec5SDimitry Andric         E = Ph->values()[0];
930b57cec5SDimitry Andric         continue;
940b57cec5SDimitry Andric       }
950b57cec5SDimitry Andric     }
960b57cec5SDimitry Andric     break;
970b57cec5SDimitry Andric   }
980b57cec5SDimitry Andric   return E;
990b57cec5SDimitry Andric }
1000b57cec5SDimitry Andric 
1010b57cec5SDimitry Andric // If E is a variable, then trace back through any aliases or redundant
1020b57cec5SDimitry Andric // Phi nodes to find the canonical definition.
1030b57cec5SDimitry Andric // The non-const version will simplify incomplete Phi nodes.
simplifyToCanonicalVal(SExpr * E)1040b57cec5SDimitry Andric SExpr *til::simplifyToCanonicalVal(SExpr *E) {
1050b57cec5SDimitry Andric   while (true) {
1060b57cec5SDimitry Andric     if (auto *V = dyn_cast<Variable>(E)) {
1070b57cec5SDimitry Andric       if (V->kind() != Variable::VK_Let)
1080b57cec5SDimitry Andric         return V;
1090b57cec5SDimitry Andric       // Eliminate redundant variables, e.g. x = y, or x = 5,
1100b57cec5SDimitry Andric       // but keep anything more complicated.
1110b57cec5SDimitry Andric       if (til::ThreadSafetyTIL::isTrivial(V->definition())) {
1120b57cec5SDimitry Andric         E = V->definition();
1130b57cec5SDimitry Andric         continue;
1140b57cec5SDimitry Andric       }
1150b57cec5SDimitry Andric       return V;
1160b57cec5SDimitry Andric     }
1170b57cec5SDimitry Andric     if (auto *Ph = dyn_cast<Phi>(E)) {
1180b57cec5SDimitry Andric       if (Ph->status() == Phi::PH_Incomplete)
1190b57cec5SDimitry Andric         simplifyIncompleteArg(Ph);
1200b57cec5SDimitry Andric       // Eliminate redundant Phi nodes.
1210b57cec5SDimitry Andric       if (Ph->status() == Phi::PH_SingleVal) {
1220b57cec5SDimitry Andric         E = Ph->values()[0];
1230b57cec5SDimitry Andric         continue;
1240b57cec5SDimitry Andric       }
1250b57cec5SDimitry Andric     }
1260b57cec5SDimitry Andric     return E;
1270b57cec5SDimitry Andric   }
1280b57cec5SDimitry Andric }
1290b57cec5SDimitry Andric 
1300b57cec5SDimitry Andric // Trace the arguments of an incomplete Phi node to see if they have the same
1310b57cec5SDimitry Andric // canonical definition.  If so, mark the Phi node as redundant.
1320b57cec5SDimitry Andric // getCanonicalVal() will recursively call simplifyIncompletePhi().
simplifyIncompleteArg(til::Phi * Ph)1330b57cec5SDimitry Andric void til::simplifyIncompleteArg(til::Phi *Ph) {
1340b57cec5SDimitry Andric   assert(Ph && Ph->status() == Phi::PH_Incomplete);
1350b57cec5SDimitry Andric 
1360b57cec5SDimitry Andric   // eliminate infinite recursion -- assume that this node is not redundant.
1370b57cec5SDimitry Andric   Ph->setStatus(Phi::PH_MultiVal);
1380b57cec5SDimitry Andric 
1390b57cec5SDimitry Andric   SExpr *E0 = simplifyToCanonicalVal(Ph->values()[0]);
1400b57cec5SDimitry Andric   for (unsigned i = 1, n = Ph->values().size(); i < n; ++i) {
1410b57cec5SDimitry Andric     SExpr *Ei = simplifyToCanonicalVal(Ph->values()[i]);
1420b57cec5SDimitry Andric     if (Ei == Ph)
1430b57cec5SDimitry Andric       continue;  // Recursive reference to itself.  Don't count.
1440b57cec5SDimitry Andric     if (Ei != E0) {
1450b57cec5SDimitry Andric       return;    // Status is already set to MultiVal.
1460b57cec5SDimitry Andric     }
1470b57cec5SDimitry Andric   }
1480b57cec5SDimitry Andric   Ph->setStatus(Phi::PH_SingleVal);
1490b57cec5SDimitry Andric }
1500b57cec5SDimitry Andric 
1510b57cec5SDimitry Andric // Renumbers the arguments and instructions to have unique, sequential IDs.
renumberInstrs(unsigned ID)1520b57cec5SDimitry Andric unsigned BasicBlock::renumberInstrs(unsigned ID) {
1530b57cec5SDimitry Andric   for (auto *Arg : Args)
1540b57cec5SDimitry Andric     Arg->setID(this, ID++);
1550b57cec5SDimitry Andric   for (auto *Instr : Instrs)
1560b57cec5SDimitry Andric     Instr->setID(this, ID++);
1570b57cec5SDimitry Andric   TermInstr->setID(this, ID++);
1580b57cec5SDimitry Andric   return ID;
1590b57cec5SDimitry Andric }
1600b57cec5SDimitry Andric 
1610b57cec5SDimitry Andric // Sorts the CFGs blocks using a reverse post-order depth-first traversal.
1620b57cec5SDimitry Andric // Each block will be written into the Blocks array in order, and its BlockID
1630b57cec5SDimitry Andric // will be set to the index in the array.  Sorting should start from the entry
1640b57cec5SDimitry Andric // block, and ID should be the total number of blocks.
topologicalSort(SimpleArray<BasicBlock * > & Blocks,unsigned ID)1650b57cec5SDimitry Andric unsigned BasicBlock::topologicalSort(SimpleArray<BasicBlock *> &Blocks,
1660b57cec5SDimitry Andric                                      unsigned ID) {
1670b57cec5SDimitry Andric   if (Visited) return ID;
1680b57cec5SDimitry Andric   Visited = true;
1690b57cec5SDimitry Andric   for (auto *Block : successors())
1700b57cec5SDimitry Andric     ID = Block->topologicalSort(Blocks, ID);
1710b57cec5SDimitry Andric   // set ID and update block array in place.
1720b57cec5SDimitry Andric   // We may lose pointers to unreachable blocks.
1730b57cec5SDimitry Andric   assert(ID > 0);
1740b57cec5SDimitry Andric   BlockID = --ID;
1750b57cec5SDimitry Andric   Blocks[BlockID] = this;
1760b57cec5SDimitry Andric   return ID;
1770b57cec5SDimitry Andric }
1780b57cec5SDimitry Andric 
1790b57cec5SDimitry Andric // Performs a reverse topological traversal, starting from the exit block and
1800b57cec5SDimitry Andric // following back-edges.  The dominator is serialized before any predecessors,
1810b57cec5SDimitry Andric // which guarantees that all blocks are serialized after their dominator and
1820b57cec5SDimitry Andric // before their post-dominator (because it's a reverse topological traversal).
1830b57cec5SDimitry Andric // ID should be initially set to 0.
1840b57cec5SDimitry Andric //
1850b57cec5SDimitry Andric // This sort assumes that (1) dominators have been computed, (2) there are no
1860b57cec5SDimitry Andric // critical edges, and (3) the entry block is reachable from the exit block
1870b57cec5SDimitry Andric // and no blocks are accessible via traversal of back-edges from the exit that
1880b57cec5SDimitry Andric // weren't accessible via forward edges from the entry.
topologicalFinalSort(SimpleArray<BasicBlock * > & Blocks,unsigned ID)1890b57cec5SDimitry Andric unsigned BasicBlock::topologicalFinalSort(SimpleArray<BasicBlock *> &Blocks,
1900b57cec5SDimitry Andric                                           unsigned ID) {
1910b57cec5SDimitry Andric   // Visited is assumed to have been set by the topologicalSort.  This pass
1920b57cec5SDimitry Andric   // assumes !Visited means that we've visited this node before.
1930b57cec5SDimitry Andric   if (!Visited) return ID;
1940b57cec5SDimitry Andric   Visited = false;
1950b57cec5SDimitry Andric   if (DominatorNode.Parent)
1960b57cec5SDimitry Andric     ID = DominatorNode.Parent->topologicalFinalSort(Blocks, ID);
1970b57cec5SDimitry Andric   for (auto *Pred : Predecessors)
1980b57cec5SDimitry Andric     ID = Pred->topologicalFinalSort(Blocks, ID);
1990b57cec5SDimitry Andric   assert(static_cast<size_t>(ID) < Blocks.size());
2000b57cec5SDimitry Andric   BlockID = ID++;
2010b57cec5SDimitry Andric   Blocks[BlockID] = this;
2020b57cec5SDimitry Andric   return ID;
2030b57cec5SDimitry Andric }
2040b57cec5SDimitry Andric 
2050b57cec5SDimitry Andric // Computes the immediate dominator of the current block.  Assumes that all of
2060b57cec5SDimitry Andric // its predecessors have already computed their dominators.  This is achieved
2070b57cec5SDimitry Andric // by visiting the nodes in topological order.
computeDominator()2080b57cec5SDimitry Andric void BasicBlock::computeDominator() {
2090b57cec5SDimitry Andric   BasicBlock *Candidate = nullptr;
2100b57cec5SDimitry Andric   // Walk backwards from each predecessor to find the common dominator node.
2110b57cec5SDimitry Andric   for (auto *Pred : Predecessors) {
2120b57cec5SDimitry Andric     // Skip back-edges
2130b57cec5SDimitry Andric     if (Pred->BlockID >= BlockID) continue;
2140b57cec5SDimitry Andric     // If we don't yet have a candidate for dominator yet, take this one.
2150b57cec5SDimitry Andric     if (Candidate == nullptr) {
2160b57cec5SDimitry Andric       Candidate = Pred;
2170b57cec5SDimitry Andric       continue;
2180b57cec5SDimitry Andric     }
2190b57cec5SDimitry Andric     // Walk the alternate and current candidate back to find a common ancestor.
2200b57cec5SDimitry Andric     auto *Alternate = Pred;
2210b57cec5SDimitry Andric     while (Alternate != Candidate) {
2220b57cec5SDimitry Andric       if (Candidate->BlockID > Alternate->BlockID)
2230b57cec5SDimitry Andric         Candidate = Candidate->DominatorNode.Parent;
2240b57cec5SDimitry Andric       else
2250b57cec5SDimitry Andric         Alternate = Alternate->DominatorNode.Parent;
2260b57cec5SDimitry Andric     }
2270b57cec5SDimitry Andric   }
2280b57cec5SDimitry Andric   DominatorNode.Parent = Candidate;
2290b57cec5SDimitry Andric   DominatorNode.SizeOfSubTree = 1;
2300b57cec5SDimitry Andric }
2310b57cec5SDimitry Andric 
2320b57cec5SDimitry Andric // Computes the immediate post-dominator of the current block.  Assumes that all
2330b57cec5SDimitry Andric // of its successors have already computed their post-dominators.  This is
2340b57cec5SDimitry Andric // achieved visiting the nodes in reverse topological order.
computePostDominator()2350b57cec5SDimitry Andric void BasicBlock::computePostDominator() {
2360b57cec5SDimitry Andric   BasicBlock *Candidate = nullptr;
2370b57cec5SDimitry Andric   // Walk back from each predecessor to find the common post-dominator node.
2380b57cec5SDimitry Andric   for (auto *Succ : successors()) {
2390b57cec5SDimitry Andric     // Skip back-edges
2400b57cec5SDimitry Andric     if (Succ->BlockID <= BlockID) continue;
2410b57cec5SDimitry Andric     // If we don't yet have a candidate for post-dominator yet, take this one.
2420b57cec5SDimitry Andric     if (Candidate == nullptr) {
2430b57cec5SDimitry Andric       Candidate = Succ;
2440b57cec5SDimitry Andric       continue;
2450b57cec5SDimitry Andric     }
2460b57cec5SDimitry Andric     // Walk the alternate and current candidate back to find a common ancestor.
2470b57cec5SDimitry Andric     auto *Alternate = Succ;
2480b57cec5SDimitry Andric     while (Alternate != Candidate) {
2490b57cec5SDimitry Andric       if (Candidate->BlockID < Alternate->BlockID)
2500b57cec5SDimitry Andric         Candidate = Candidate->PostDominatorNode.Parent;
2510b57cec5SDimitry Andric       else
2520b57cec5SDimitry Andric         Alternate = Alternate->PostDominatorNode.Parent;
2530b57cec5SDimitry Andric     }
2540b57cec5SDimitry Andric   }
2550b57cec5SDimitry Andric   PostDominatorNode.Parent = Candidate;
2560b57cec5SDimitry Andric   PostDominatorNode.SizeOfSubTree = 1;
2570b57cec5SDimitry Andric }
2580b57cec5SDimitry Andric 
2590b57cec5SDimitry Andric // Renumber instructions in all blocks
renumberInstrs()2600b57cec5SDimitry Andric void SCFG::renumberInstrs() {
2610b57cec5SDimitry Andric   unsigned InstrID = 0;
2620b57cec5SDimitry Andric   for (auto *Block : Blocks)
2630b57cec5SDimitry Andric     InstrID = Block->renumberInstrs(InstrID);
2640b57cec5SDimitry Andric }
2650b57cec5SDimitry Andric 
computeNodeSize(BasicBlock * B,BasicBlock::TopologyNode BasicBlock::* TN)2660b57cec5SDimitry Andric static inline void computeNodeSize(BasicBlock *B,
2670b57cec5SDimitry Andric                                    BasicBlock::TopologyNode BasicBlock::*TN) {
2680b57cec5SDimitry Andric   BasicBlock::TopologyNode *N = &(B->*TN);
2690b57cec5SDimitry Andric   if (N->Parent) {
2700b57cec5SDimitry Andric     BasicBlock::TopologyNode *P = &(N->Parent->*TN);
2710b57cec5SDimitry Andric     // Initially set ID relative to the (as yet uncomputed) parent ID
2720b57cec5SDimitry Andric     N->NodeID = P->SizeOfSubTree;
2730b57cec5SDimitry Andric     P->SizeOfSubTree += N->SizeOfSubTree;
2740b57cec5SDimitry Andric   }
2750b57cec5SDimitry Andric }
2760b57cec5SDimitry Andric 
computeNodeID(BasicBlock * B,BasicBlock::TopologyNode BasicBlock::* TN)2770b57cec5SDimitry Andric static inline void computeNodeID(BasicBlock *B,
2780b57cec5SDimitry Andric                                  BasicBlock::TopologyNode BasicBlock::*TN) {
2790b57cec5SDimitry Andric   BasicBlock::TopologyNode *N = &(B->*TN);
2800b57cec5SDimitry Andric   if (N->Parent) {
2810b57cec5SDimitry Andric     BasicBlock::TopologyNode *P = &(N->Parent->*TN);
2820b57cec5SDimitry Andric     N->NodeID += P->NodeID;    // Fix NodeIDs relative to starting node.
2830b57cec5SDimitry Andric   }
2840b57cec5SDimitry Andric }
2850b57cec5SDimitry Andric 
2860b57cec5SDimitry Andric // Normalizes a CFG.  Normalization has a few major components:
2870b57cec5SDimitry Andric // 1) Removing unreachable blocks.
2880b57cec5SDimitry Andric // 2) Computing dominators and post-dominators
2890b57cec5SDimitry Andric // 3) Topologically sorting the blocks into the "Blocks" array.
computeNormalForm()2900b57cec5SDimitry Andric void SCFG::computeNormalForm() {
2910b57cec5SDimitry Andric   // Topologically sort the blocks starting from the entry block.
2920b57cec5SDimitry Andric   unsigned NumUnreachableBlocks = Entry->topologicalSort(Blocks, Blocks.size());
2930b57cec5SDimitry Andric   if (NumUnreachableBlocks > 0) {
2940b57cec5SDimitry Andric     // If there were unreachable blocks shift everything down, and delete them.
2950b57cec5SDimitry Andric     for (unsigned I = NumUnreachableBlocks, E = Blocks.size(); I < E; ++I) {
2960b57cec5SDimitry Andric       unsigned NI = I - NumUnreachableBlocks;
2970b57cec5SDimitry Andric       Blocks[NI] = Blocks[I];
2980b57cec5SDimitry Andric       Blocks[NI]->BlockID = NI;
2990b57cec5SDimitry Andric       // FIXME: clean up predecessor pointers to unreachable blocks?
3000b57cec5SDimitry Andric     }
3010b57cec5SDimitry Andric     Blocks.drop(NumUnreachableBlocks);
3020b57cec5SDimitry Andric   }
3030b57cec5SDimitry Andric 
3040b57cec5SDimitry Andric   // Compute dominators.
3050b57cec5SDimitry Andric   for (auto *Block : Blocks)
3060b57cec5SDimitry Andric     Block->computeDominator();
3070b57cec5SDimitry Andric 
3080b57cec5SDimitry Andric   // Once dominators have been computed, the final sort may be performed.
3090b57cec5SDimitry Andric   unsigned NumBlocks = Exit->topologicalFinalSort(Blocks, 0);
3100b57cec5SDimitry Andric   assert(static_cast<size_t>(NumBlocks) == Blocks.size());
3110b57cec5SDimitry Andric   (void) NumBlocks;
3120b57cec5SDimitry Andric 
3130b57cec5SDimitry Andric   // Renumber the instructions now that we have a final sort.
3140b57cec5SDimitry Andric   renumberInstrs();
3150b57cec5SDimitry Andric 
3160b57cec5SDimitry Andric   // Compute post-dominators and compute the sizes of each node in the
3170b57cec5SDimitry Andric   // dominator tree.
3180b57cec5SDimitry Andric   for (auto *Block : Blocks.reverse()) {
3190b57cec5SDimitry Andric     Block->computePostDominator();
3200b57cec5SDimitry Andric     computeNodeSize(Block, &BasicBlock::DominatorNode);
3210b57cec5SDimitry Andric   }
3220b57cec5SDimitry Andric   // Compute the sizes of each node in the post-dominator tree and assign IDs in
3230b57cec5SDimitry Andric   // the dominator tree.
3240b57cec5SDimitry Andric   for (auto *Block : Blocks) {
3250b57cec5SDimitry Andric     computeNodeID(Block, &BasicBlock::DominatorNode);
3260b57cec5SDimitry Andric     computeNodeSize(Block, &BasicBlock::PostDominatorNode);
3270b57cec5SDimitry Andric   }
3280b57cec5SDimitry Andric   // Assign IDs in the post-dominator tree.
3290b57cec5SDimitry Andric   for (auto *Block : Blocks.reverse()) {
3300b57cec5SDimitry Andric     computeNodeID(Block, &BasicBlock::PostDominatorNode);
3310b57cec5SDimitry Andric   }
3320b57cec5SDimitry Andric }
333