Home | History | Annotate | Download | only in IPO

Lines Matching defs:BB1

123   void findEquivalencesFor(BasicBlock *BB1, ArrayRef<BasicBlock *> Descendants,
153 /// Two blocks BB1 and BB2 are in the same equivalence class if they
666 /// number of times as \p BB1. To do this, it traverses all the
667 /// descendants of \p BB1 in the dominator or post-dominator tree.
669 /// A block BB2 will be in the same equivalence class as \p BB1 if
672 /// 1- \p BB1 is a descendant of BB2 in the opposite tree. So, if BB2
673 /// is a descendant of \p BB1 in the dominator tree, then BB2 should
674 /// dominate BB1 in the post-dominator tree.
676 /// 2- Both BB2 and \p BB1 must be in the same loop.
679 /// equivalence class to \p BB1.
681 /// \param BB1 Block to check.
682 /// \param Descendants Descendants of \p BB1 in either the dom or pdom tree.
684 /// with blocks from \p BB1's dominator tree, then
687 BasicBlock *BB1, ArrayRef<BasicBlock *> Descendants,
689 const BasicBlock *EC = EquivalenceClass[BB1];
692 bool IsDomParent = DomTree->dominates(BB2, BB1);
693 bool IsInSameLoop = LI->getLoopFor(BB1) == LI->getLoopFor(BB2);
694 if (BB1 != BB2 && IsDomParent && IsInSameLoop) {
697 // If BB2 is heavier than BB1, make BB2 have the same weight
698 // as BB1.
701 // (when BB2 is lighter than BB1). We will deal with this
703 // make sure that BB1 has the largest weight of all the
725 BasicBlock *BB1 = &BB;
727 // Compute BB1's equivalence class once.
728 if (EquivalenceClass.count(BB1)) {
729 DEBUG(printBlockEquivalence(dbgs(), BB1));
734 EquivalenceClass[BB1] = BB1;
736 // Traverse all the blocks dominated by BB1. We are looking for
739 // 1- BB1 dominates BB2.
740 // 2- BB2 post-dominates BB1.
741 // 3- BB1 and BB2 are in the same loop nest.
744 // as many times as BB1, so they are placed in the same equivalence
745 // class by making BB2's equivalence class be BB1.
747 DT->getDescendants(BB1, DominatedBBs);
748 findEquivalencesFor(BB1, DominatedBBs, PDT.get());
750 DEBUG(printBlockEquivalence(dbgs(), BB1));