Lines Matching refs:MBB
86 MachineTraceMetrics::getResources(const MachineBasicBlock *MBB) { in getResources() argument
87 assert(MBB && "No basic block"); in getResources()
88 FixedBlockInfo *FBI = &BlockInfo[MBB->getNumber()]; in getResources()
100 for (const auto &MI : *MBB) { in getResources()
124 unsigned PROffset = MBB->getNumber() * PRKinds; in getResources()
159 MachineTraceMetrics::Ensemble::getLoopFor(const MachineBasicBlock *MBB) const { in getLoopFor()
160 return MTM.Loops->getLoopFor(MBB); in getLoopFor()
166 computeDepthResources(const MachineBasicBlock *MBB) { in computeDepthResources() argument
167 TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()]; in computeDepthResources()
169 unsigned PROffset = MBB->getNumber() * PRKinds; in computeDepthResources()
174 TBI->Head = MBB->getNumber(); in computeDepthResources()
199 computeHeightResources(const MachineBasicBlock *MBB) { in computeHeightResources() argument
200 TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()]; in computeHeightResources()
202 unsigned PROffset = MBB->getNumber() * PRKinds; in computeHeightResources()
205 TBI->InstrHeight = MTM.getResources(MBB)->InstrCount; in computeHeightResources()
206 ArrayRef<unsigned> PRCycles = MTM.getProcResourceCycles(MBB->getNumber()); in computeHeightResources()
210 TBI->Tail = MBB->getNumber(); in computeHeightResources()
234 getDepthResources(const MachineBasicBlock *MBB) const { in getDepthResources()
235 const TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()]; in getDepthResources()
243 getHeightResources(const MachineBasicBlock *MBB) const { in getHeightResources()
244 const TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()]; in getHeightResources()
317 MinInstrCountEnsemble::pickTracePred(const MachineBasicBlock *MBB) { in pickTracePred() argument
318 if (MBB->pred_empty()) in pickTracePred()
320 const MachineLoop *CurLoop = getLoopFor(MBB); in pickTracePred()
322 if (CurLoop && MBB == CurLoop->getHeader()) in pickTracePred()
324 unsigned CurCount = MTM.getResources(MBB)->InstrCount; in pickTracePred()
328 I = MBB->pred_begin(), E = MBB->pred_end(); I != E; ++I) { in pickTracePred()
345 MinInstrCountEnsemble::pickTraceSucc(const MachineBasicBlock *MBB) { in pickTraceSucc() argument
346 if (MBB->pred_empty()) in pickTraceSucc()
348 const MachineLoop *CurLoop = getLoopFor(MBB); in pickTraceSucc()
352 I = MBB->succ_begin(), E = MBB->succ_end(); I != E; ++I) { in pickTraceSucc()
388 void MachineTraceMetrics::invalidate(const MachineBasicBlock *MBB) { in invalidate() argument
389 DEBUG(dbgs() << "Invalidate traces through BB#" << MBB->getNumber() << '\n'); in invalidate()
390 BlockInfo[MBB->getNumber()].invalidate(); in invalidate()
393 Ensembles[i]->invalidate(MBB); in invalidate()
461 void MachineTraceMetrics::Ensemble::computeTrace(const MachineBasicBlock *MBB) { in computeTrace() argument
463 << MBB->getNumber() << '\n'); in computeTrace()
471 for (UpwardPO I = ipo_ext_begin(MBB, Bounds), E = ipo_ext_end(MBB, Bounds); in computeTrace()
491 for (DownwardPO I = po_ext_begin(MBB, Bounds), E = po_ext_end(MBB, Bounds); in computeTrace()
519 const MachineBasicBlock *MBB = WorkList.pop_back_val(); in invalidate() local
520 DEBUG(dbgs() << "Invalidate BB#" << MBB->getNumber() << ' ' << getName() in invalidate()
525 I = MBB->pred_begin(), E = MBB->pred_end(); I != E; ++I) { in invalidate()
529 if (TBI.Succ == MBB) { in invalidate()
545 const MachineBasicBlock *MBB = WorkList.pop_back_val(); in invalidate() local
546 DEBUG(dbgs() << "Invalidate BB#" << MBB->getNumber() << ' ' << getName() in invalidate()
551 I = MBB->succ_begin(), E = MBB->succ_end(); I != E; ++I) { in invalidate()
555 if (TBI.Pred == MBB) { in invalidate()
582 const MachineBasicBlock *MBB = MTM.MF->getBlockNumbered(Num); in verify() local
583 assert(MBB->isPredecessor(TBI.Pred) && "CFG doesn't match trace"); in verify()
586 const MachineLoop *Loop = getLoopFor(MBB); in verify()
587 assert(!(Loop && MBB == Loop->getHeader()) && "Trace contains backedge"); in verify()
590 const MachineBasicBlock *MBB = MTM.MF->getBlockNumbered(Num); in verify() local
591 assert(MBB->isSuccessor(TBI.Succ) && "CFG doesn't match trace"); in verify()
594 const MachineLoop *Loop = getLoopFor(MBB); in verify()
783 computeInstrDepths(const MachineBasicBlock *MBB) { in computeInstrDepths() argument
789 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrDepths()
793 Stack.push_back(MBB); in computeInstrDepths()
794 MBB = TBI.Pred; in computeInstrDepths()
795 } while (MBB); in computeInstrDepths()
807 MBB = Stack.pop_back_val(); in computeInstrDepths()
808 DEBUG(dbgs() << "\nDepths for BB#" << MBB->getNumber() << ":\n"); in computeInstrDepths()
809 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrDepths()
816 ArrayRef<unsigned> PRDepths = getProcResourceDepths(MBB->getNumber()); in computeInstrDepths()
830 for (const auto &UseMI : *MBB) { in computeInstrDepths()
966 const MachineBasicBlock *MBB = Trace[i-1]; in addLiveIns() local
967 if (MBB == DefMBB) in addLiveIns()
969 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in addLiveIns()
979 computeInstrHeights(const MachineBasicBlock *MBB) { in computeInstrHeights() argument
984 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrHeights()
988 Stack.push_back(MBB); in computeInstrHeights()
990 MBB = TBI.Succ; in computeInstrHeights()
991 } while (MBB); in computeInstrHeights()
1005 if (MBB) { in computeInstrHeights()
1006 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrHeights()
1025 MBB = Stack.back(); in computeInstrHeights()
1026 DEBUG(dbgs() << "Heights for BB#" << MBB->getNumber() << ":\n"); in computeInstrHeights()
1027 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrHeights()
1033 ArrayRef<unsigned> PRHeights = getProcResourceHeights(MBB->getNumber()); in computeInstrHeights()
1049 if (const MachineLoop *Loop = getLoopFor(MBB)) in computeInstrHeights()
1050 if (MBB->isSuccessor(Loop->getHeader())) in computeInstrHeights()
1058 getPHIDeps(&PHI, Deps, MBB, MTM.MRI); in computeInstrHeights()
1071 for (MachineBasicBlock::const_iterator BI = MBB->end(), BB = MBB->begin(); in computeInstrHeights()
1113 DEBUG(dbgs() << "BB#" << MBB->getNumber() << " Live-ins:"); in computeInstrHeights()
1140 MachineTraceMetrics::Ensemble::getTrace(const MachineBasicBlock *MBB) { in getTrace() argument
1142 computeTrace(MBB); in getTrace()
1143 computeInstrDepths(MBB); in getTrace()
1144 computeInstrHeights(MBB); in getTrace()
1145 return Trace(*this, BlockInfo[MBB->getNumber()]); in getTrace()
1159 const MachineBasicBlock *MBB = TE.MTM.MF->getBlockNumbered(getBlockNum()); in getPHIDepth() local
1161 getPHIDeps(PHI, Deps, MBB, TE.MTM.MRI); in getPHIDepth()