Lines Matching refs:Leaf
41 for (const auto &Leaf : PossibleLeaves) { in writeDOTGraphNode() local
42 OS << Separator << Leaf.getName(); in writeDOTGraphNode()
44 if (!Leaf.isFullyTraversed()) in writeDOTGraphNode()
46 if (!Leaf.isFullyTested()) in writeDOTGraphNode()
54 for (const GIMatchTreeLeafInfo &Leaf : PossibleLeaves) { in writeDOTGraphNode() local
55 if (Leaf.isFullyTested()) in writeDOTGraphNode()
57 OS << "\\n" << Leaf.getName() << ": " << &Leaf; in writeDOTGraphNode()
58 for (const GIMatchDagPredicate *P : Leaf.untested_predicates()) in writeDOTGraphNode()
221 for (const auto &Leaf : Leaves) { in runStep() local
222 LLVM_DEBUG(dbgs() << " " << Leaf.getName() << " (" << &Leaf.getInfo() << "\n"); in runStep()
223 TreeNode->addPossibleLeaf(Leaf.getInfo(), Leaf.isFullyTraversed(), in runStep()
224 Leaf.isFullyTested()); in runStep()
276 for (auto &Leaf : make_range(Leaves.begin(), FirstFullyTested)) in runStep() local
277 LLVM_DEBUG(dbgs() << " Kept " << Leaf.getName() << "\n"); in runStep()
278 for (const auto &Leaf : make_range(FirstFullyTested, Leaves.end())) in runStep() local
279 LLVM_DEBUG(dbgs() << " Dropped " << Leaf.getName() << "\n"); in runStep()
284 for (const auto &Leaf : Leaves) { in runStep() local
285 if (!Leaf.isFullyTraversed()) { in runStep()
286 PrintError("Leaf " + Leaf.getName() + " is not fully traversed"); in runStep()
288 Leaf.dump(errs()); in runStep()
289 for (unsigned InstrIdx : Leaf.untested_instrs()) in runStep()
290 PrintNote("Instr " + llvm::to_string(*Leaf.getInstr(InstrIdx))); in runStep()
291 for (unsigned EdgeIdx : Leaf.untested_edges()) in runStep()
292 PrintNote("Edge " + llvm::to_string(*Leaf.getEdge(EdgeIdx))); in runStep()
362 for (auto &Leaf : Leaves) { in run() local
363 LLVM_DEBUG(Leaf.getMatchDag().writeDOTGraph(dbgs(), Leaf.getName())); in run()
365 *(Leaf.getMatchDag().roots().begin() + Leaf.getRootIdx()); in run()
366 Leaf.declareInstr(Root, NewInstrID); in run()
394 for (const auto &Leaf : enumerate(Leaves)) { in repartition() local
396 GIMatchTreeInstrInfo *InstrInfo = Leaf.value().getInstrInfo(InstrID); in repartition()
398 Leaf.value().getMatchDag().getNumPredicates()); in repartition()
404 LLVM_DEBUG(dbgs() << " " << Leaf.value().getName() in repartition()
406 assert(TestedPredicatesForLeaf.size() == Leaf.value().getMatchDag().getNumPredicates()); in repartition()
413 for (unsigned PIdx : Leaf.value().TestablePredicates.set_bits()) { in repartition()
414 const auto &P = Leaf.value().getPredicate(PIdx); in repartition()
420 for (const auto &PDep : Leaf.value().getMatchDag().predicate_edges()) { in repartition()
443 for (const auto &PDep : Leaf.value().getMatchDag().predicate_edges()) { in repartition()
477 Partitions.find(Partition->second)->second.set(Leaf.index()); in repartition()
479 LLVM_DEBUG(dbgs() << " " << Leaf.value().getName() in repartition()
496 LLVM_DEBUG(dbgs() << " " << Leaf.value().getName() in repartition()
499 Partition.second.set(Leaf.index()); in repartition()
502 assert(TestedPredicatesForLeaf.size() == Leaf.value().getMatchDag().getNumPredicates()); in repartition()
516 for (const auto &Leaf : enumerate(Leaves)) { in repartition() local
517 GIMatchTreeInstrInfo *InstrInfo = Leaf.value().getInstrInfo(InstrID); in repartition()
526 Partition.second.set(Leaf.index()); in repartition()
543 auto &Leaf = EnumeratedLeaf.value(); in applyForPartition() local
548 LLVM_DEBUG(dbgs() << " " << Leaf.getName() << " tested predicate #" in applyForPartition()
550 << " " << *Leaf.getPredicate(PredIdx) << "\n"); in applyForPartition()
551 Leaf.RemainingPredicates.reset(PredIdx); in applyForPartition()
552 Leaf.TestablePredicates.reset(PredIdx); in applyForPartition()
554 SubBuilder.addLeaf(Leaf); in applyForPartition()
568 for (auto &Leaf : NewLeaves) { in applyForPartition() local
569 GIMatchTreeInstrInfo *InstrInfo = Leaf.getInstrInfo(InstrID); in applyForPartition()
574 for (auto &E : enumerate(Leaf.getMatchDag().edges())) { in applyForPartition()
582 for (auto &Leaf : NewLeaves) { in applyForPartition() local
584 Leaf.declareOperand(InstrID, OpIdx); in applyForPartition()
653 for (const auto &Leaf : enumerate(Leaves)) { in repartition() local
654 GIMatchTreeInstrInfo *InstrInfo = Leaf.value().getInstrInfo(InstrID); in repartition()
655 BitVector TraversedEdgesForLeaf(Leaf.value().getMatchDag().getNumEdges()); in repartition()
668 for (unsigned EIdx : Leaf.value().TraversableEdges.set_bits()) { in repartition()
669 const auto &E = Leaf.value().getEdge(EIdx); in repartition()
676 addToPartition(true, Leaf.index()); in repartition()
685 addToPartition(false, Leaf.index()); in repartition()
689 addToPartition(false, Leaf.index()); in repartition()
690 addToPartition(true, Leaf.index()); in repartition()
697 for (const auto &Leaf : enumerate(Leaves)) { in repartition() local
698 GIMatchTreeInstrInfo *InstrInfo = Leaf.value().getInstrInfo(InstrID); in repartition()
701 Partition.second.set(Leaf.index()); in repartition()
716 auto &Leaf = EnumeratedLeaf.value(); in applyForPartition() local
719 Leaf.RemainingEdges.reset(TraversedEdgesForLeaf); in applyForPartition()
720 Leaf.TraversableEdges.reset(TraversedEdgesForLeaf); in applyForPartition()
721 SubBuilder.addLeaf(Leaf); in applyForPartition()
732 auto &Leaf = std::get<0>(I); in applyForPartition() local
734 GIMatchTreeInstrInfo *InstrInfo = Leaf.getInstrInfo(InstrID); in applyForPartition()
739 const GIMatchDagEdge *E = Leaf.getEdge(EIdx); in applyForPartition()
740 Leaf.declareInstr(E->getToMI(), NewInstrID); in applyForPartition()