Lines Matching refs:TN

154     BlockNamePrinter(TreeNodePtr TN) : N(TN ? TN->getBlock() : nullptr) {}
619 const TreeNodePtr TN = DT.getNode(N);
620 assert(TN);
622 TN->setIDom(NewIDom);
772 TreeNodePtr TN = II.Bucket.top();
774 II.Affected.push_back(TN);
776 const unsigned CurrentLevel = TN->getLevel();
777 LLVM_DEBUG(dbgs() << "Mark " << BlockNamePrinter(TN) <<
780 assert(TN->getBlock() && II.Visited.count(TN) && "Preconditions!");
789 // Invariant: there is an optimal path from `To` to TN with the minimum
791 for (const NodePtr Succ : getChildren<IsPostDom>(TN->getBlock(), BUI)) {
830 TN = UnaffectedOnCurrentLevel.pop_back_val();
831 LLVM_DEBUG(dbgs() << " Next: " << BlockNamePrinter(TN) << "\n");
844 for (const TreeNodePtr TN : II.Affected) {
845 LLVM_DEBUG(dbgs() << "\tIDom(" << BlockNamePrinter(TN)
847 TN->setIDom(NCD);
851 for (const TreeNodePtr TN : II.VisitedUnaffected)
852 assert(TN->getLevel() == TN->getIDom()->getLevel() + 1 &&
853 "TN should have been updated by an affected ancestor");
1005 const TreeNodePtr TN) {
1006 LLVM_DEBUG(dbgs() << "IsReachableFromIDom " << BlockNamePrinter(TN)
1008 auto TNB = TN->getBlock();
1016 LLVM_DEBUG(dbgs() << "\t" << BlockNamePrinter(TN)
1053 const TreeNodePtr TN = DT.getNode(To);
1054 assert(TN);
1055 if (TN->getLevel() > Level) return true;
1071 const TreeNodePtr TN = DT.getNode(N);
1073 DT.findNearestCommonDominator(TN->getBlock(), ToTN->getBlock());
1078 LLVM_DEBUG(dbgs() << "Processing affected node " << BlockNamePrinter(TN)
1081 if (NCD != TN && NCD->getLevel() < MinNode->getLevel()) MinNode = NCD;
1095 const TreeNodePtr TN = DT.getNode(N);
1096 LLVM_DEBUG(dbgs() << "Erasing node " << BlockNamePrinter(TN) << "\n");
1098 EraseNode(DT, TN);
1127 static void EraseNode(DomTreeT &DT, const TreeNodePtr TN) {
1128 assert(TN);
1129 assert(TN->getNumChildren() == 0 && "Not a tree leaf");
1131 const TreeNodePtr IDom = TN->getIDom();
1134 auto ChIt = llvm::find(IDom->Children, TN);
1139 DT.DomTreeNodes.erase(TN->getBlock());
1265 const TreeNodePtr TN = NodeToTN.second.get();
1266 const NodePtr BB = TN->getBlock();
1269 if (DT.isVirtualRoot(TN)) continue;
1298 const TreeNodePtr TN = NodeToTN.second.get();
1299 const NodePtr BB = TN->getBlock();
1302 const TreeNodePtr IDom = TN->getIDom();
1303 if (!IDom && TN->getLevel() != 0) {
1305 << " has a nonzero level " << TN->getLevel() << "!\n";
1311 if (IDom && TN->getLevel() != IDom->getLevel() + 1) {
1313 << TN->getLevel() << " while its IDom "
1335 auto PrintNodeAndDFSNums = [](const TreeNodePtr TN) {
1336 errs() << BlockNamePrinter(TN) << " {" << TN->getDFSNumIn() << ", "
1337 << TN->getDFSNumOut() << '}';
1466 const TreeNodePtr TN = NodeToTN.second.get();
1467 const NodePtr BB = TN->getBlock();
1468 if (!BB || TN->isLeaf())
1472 << BlockNamePrinter(TN) << "\n");
1478 for (TreeNodePtr Child : TN->children())
1500 const TreeNodePtr TN = NodeToTN.second.get();
1501 const NodePtr BB = TN->getBlock();
1502 if (!BB || TN->isLeaf())
1505 for (const TreeNodePtr N : TN->children()) {
1512 for (const TreeNodePtr S : TN->children()) {