• Home
  • Raw
  • Download

Lines Matching refs:BB

60 ProfileInfoT<Function,BasicBlock>::getExecutionCount(const BasicBlock *BB) {  in getExecutionCount()  argument
62 BlockInformation.find(BB->getParent()); in getExecutionCount()
64 BlockCounts::iterator I = J->second.find(BB); in getExecutionCount()
71 const_pred_iterator PI = pred_begin(BB), PE = pred_end(BB); in getExecutionCount()
75 Edge e = getEdge(0, BB); in getExecutionCount()
85 double w = getEdgeWeight(getEdge(P, BB)); in getExecutionCount()
98 succ_const_iterator SI = succ_begin(BB), SE = succ_end(BB); in getExecutionCount()
102 Edge e = getEdge(BB,0); in getExecutionCount()
109 double w = getEdgeWeight(getEdge(BB, *SI)); in getExecutionCount()
119 if (Count != MissingValue) BlockInformation[BB->getParent()][BB] = Count; in getExecutionCount()
168 setExecutionCount(const BasicBlock *BB, double w) { in setExecutionCount() argument
169 DEBUG(dbgs() << "Creating Block " << BB->getName() in setExecutionCount()
171 BlockInformation[BB->getParent()][BB] = w; in setExecutionCount()
193 addExecutionCount(const BasicBlock *BB, double w) { in addExecutionCount() argument
194 double oldw = getExecutionCount(BB); in addExecutionCount()
196 DEBUG(dbgs() << "Adding to Block " << BB->getName() in addExecutionCount()
198 BlockInformation[BB->getParent()][BB] = oldw + w; in addExecutionCount()
202 void ProfileInfoT<Function,BasicBlock>::removeBlock(const BasicBlock *BB) { in removeBlock() argument
204 BlockInformation.find(BB->getParent()); in removeBlock()
207 DEBUG(dbgs() << "Deleting " << BB->getName() << "\n"); in removeBlock()
208 J->second.erase(BB); in removeBlock()
240 const BasicBlock *BB = 0; in GetPath() local
247 BB = BFS.front(); in GetPath()
250 succ_const_iterator Succ = succ_begin(BB), End = succ_end(BB); in GetPath()
252 P[0] = BB; in GetPath()
255 BB = 0; in GetPath()
260 Edge e = getEdge(BB,*Succ); in GetPath()
262 P[*Succ] = BB; in GetPath()
266 BB = *Succ; in GetPath()
271 BB = *Succ; in GetPath()
277 return BB; in GetPath()
294 const BasicBlock *BB = GetPath(newedge.second,oldedge.second,P,GetPathToExit | GetPathToDest); in divertFlow() local
299 const BasicBlock *Parent = P.find(BB)->second; in divertFlow()
300 Edge e = getEdge(Parent,BB); in divertFlow()
307 BB = Parent; in divertFlow()
308 } while (BB != newedge.first); in divertFlow()
441 void ProfileInfoT<Function,BasicBlock>::splitBlock(const BasicBlock *BB, in splitBlock() argument
445 const Function *F = BB->getParent(); in splitBlock()
450 DEBUG(dbgs() << "Splitting " << NumPreds << " Edges from " << BB->getName() in splitBlock()
462 Edge oldedge = getEdge(Pred, BB); in splitBlock()
472 Edge newedge = getEdge(NewBB,BB); in splitBlock()
505 CalculateMissingEdge(const BasicBlock *BB, Edge &removed, in CalculateMissingEdge() argument
514 const_pred_iterator bbi = pred_begin(BB), bbe = pred_end(BB); in CalculateMissingEdge()
516 Edge e = getEdge(0,BB); in CalculateMissingEdge()
521 Edge e = getEdge(*bbi,BB); in CalculateMissingEdge()
528 succ_const_iterator sbbi = succ_begin(BB), sbbe = succ_end(BB); in CalculateMissingEdge()
530 Edge e = getEdge(BB,0); in CalculateMissingEdge()
532 double w = getExecutionCount(BB); in CalculateMissingEdge()
542 Edge e = getEdge(BB,*sbbi); in CalculateMissingEdge()
554 EdgeInformation[BB->getParent()][edgetocalc] = outcount-incount; in CalculateMissingEdge()
556 EdgeInformation[BB->getParent()][edgetocalc] = incount-outcount; in CalculateMissingEdge()
582 bool ProfileInfoT<Function,BasicBlock>::EstimateMissingEdges(const BasicBlock *BB) { in EstimateMissingEdges() argument
586 const_pred_iterator bbi = pred_begin(BB), bbe = pred_end(BB); in EstimateMissingEdges()
588 readEdge(this,getEdge(0,BB),inWeight,inMissing); in EstimateMissingEdges()
592 readEdge(this,getEdge(*bbi,BB),inWeight,inMissing); in EstimateMissingEdges()
599 succ_const_iterator sbbi = succ_begin(BB), sbbe = succ_end(BB); in EstimateMissingEdges()
601 readEdge(this,getEdge(BB,0),outWeight,outMissing); in EstimateMissingEdges()
604 readEdge(this,getEdge(BB,*sbbi),outWeight,outMissing); in EstimateMissingEdges()
614 setExecutionCount(BB,inWeight); in EstimateMissingEdges()
620 setExecutionCount(BB,0); in EstimateMissingEdges()
623 setExecutionCount(BB,outWeight); in EstimateMissingEdges()
675 const BasicBlock *BB = &(F->getEntryBlock()); in repair() local
676 BFS.push(BB); in repair()
677 Unvisited.insert(BB); in repair()
680 BB = BFS.front(); BFS.pop(); in repair()
681 succ_const_iterator NBB = succ_begin(BB), End = succ_end(BB); in repair()
683 Edge e = getEdge(BB,0); in repair()
687 double bw = getExecutionCount(BB); in repair()
728 const BasicBlock *BB = *FI; ++FI; in repair() local
730 if(CalculateMissingEdge(BB,e,true)) { in repair()
731 if (BlockInformation[F].find(BB) == BlockInformation[F].end()) { in repair()
732 setExecutionCount(BB,getExecutionCount(BB)); in repair()
734 Unvisited.erase(BB); in repair()
746 const BasicBlock *BB = *FI; ++FI; in repair() local
751 for (succ_const_iterator Succ = succ_begin(BB), End = succ_end(BB); in repair()
761 if(EstimateMissingEdges(BB)) { in repair()
762 Unvisited.erase(BB); in repair()
774 const BasicBlock *BB = *FI; ++FI; in repair() local
776 const BasicBlock *Dest = GetPath(BB, 0, P, GetPathToValue); in repair()
781 for (const_pred_iterator NBB = pred_begin(BB), End = pred_end(BB); in repair()
784 Edge e = getEdge(*NBB, BB); in repair()
803 for (succ_const_iterator NBB = succ_begin(BB), End = succ_end(BB); in repair()
806 Edge e = getEdge(BB, *NBB); in repair()
818 for (succ_const_iterator NBB = succ_begin(BB), End = succ_end(BB); in repair()
821 Edge e = getEdge(BB, *NBB); in repair()
849 } while (Dest != BB); in repair()
857 const BasicBlock *BB = *FI; ++FI; in repair() local
859 for (succ_const_iterator NBB = succ_begin(BB), End = succ_end(BB); in repair()
861 if (*NBB == BB) { in repair()
867 Edge e = getEdge(BB,BB); in repair()
871 for (const_pred_iterator NBB = pred_begin(BB), End = pred_end(BB); in repair()
874 Edge e = getEdge(*NBB, BB); in repair()
891 const BasicBlock *BB = *FI; ++FI; in repair() local
895 for (const_pred_iterator NBB = pred_begin(BB), End = pred_end(BB); in repair()
897 Dest = GetPath(BB, *NBB, P, GetPathToDest | GetPathWithNewEdges); in repair()
904 Edge e = getEdge(Dest,BB); in repair()
918 } while (Dest != BB); in repair()
926 const BasicBlock *BB = *FI; ++FI; in repair() local
929 const BasicBlock *Dest = GetPath(BB, 0, P, GetPathToExit | GetPathWithNewEdges); in repair()
937 for (const_pred_iterator NBB = pred_begin(BB), End = pred_end(BB); in repair()
940 Edge e = getEdge(*NBB, BB); in repair()
957 } while (Dest != BB); in repair()
965 const BasicBlock *BB = *FI; ++FI; in repair() local
967 for (const_pred_iterator NBB = pred_begin(BB), End = pred_end(BB); in repair()
969 Edge e = getEdge(*NBB,BB); in repair()
983 const BasicBlock *BB = *FI; ++FI; in repair() local
984 dbgs() << BB->getName(); in repair()
1027 raw_ostream& operator<<(raw_ostream &O, const BasicBlock *BB) { in operator <<() argument
1028 return O << BB->getName(); in operator <<()