Lines Matching refs:TBI

165   TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()];  in computeDepthResources()  local
170 if (!TBI->Pred) { in computeDepthResources()
171 TBI->InstrDepth = 0; in computeDepthResources()
172 TBI->Head = MBB->getNumber(); in computeDepthResources()
180 unsigned PredNum = TBI->Pred->getNumber(); in computeDepthResources()
183 const FixedBlockInfo *PredFBI = MTM.getResources(TBI->Pred); in computeDepthResources()
184 TBI->InstrDepth = PredTBI->InstrDepth + PredFBI->InstrCount; in computeDepthResources()
185 TBI->Head = PredTBI->Head; in computeDepthResources()
198 TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()]; in computeHeightResources() local
203 TBI->InstrHeight = MTM.getResources(MBB)->InstrCount; in computeHeightResources()
207 if (!TBI->Succ) { in computeHeightResources()
208 TBI->Tail = MBB->getNumber(); in computeHeightResources()
216 unsigned SuccNum = TBI->Succ->getNumber(); in computeHeightResources()
219 TBI->InstrHeight += SuccTBI->InstrHeight; in computeHeightResources()
220 TBI->Tail = SuccTBI->Tail; in computeHeightResources()
233 const TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()]; in getDepthResources() local
234 return TBI->hasValidDepth() ? TBI : nullptr; in getDepthResources()
242 const TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()]; in getHeightResources() local
243 return TBI->hasValidHeight() ? TBI : nullptr; in getHeightResources()
435 MachineTraceMetrics::TraceBlockInfo &TBI = LB.Blocks[To->getNumber()]; in insertEdge() local
436 if (LB.Downward ? TBI.hasValidHeight() : TBI.hasValidDepth()) in insertEdge()
468 TraceBlockInfo &TBI = BlockInfo[I->getNumber()]; in computeTrace() local
470 TBI.Pred = pickTracePred(I); in computeTrace()
472 if (TBI.Pred) in computeTrace()
473 dbgs() << "BB#" << TBI.Pred->getNumber() << '\n'; in computeTrace()
486 TraceBlockInfo &TBI = BlockInfo[I->getNumber()]; in computeTrace() local
488 TBI.Succ = pickTraceSucc(I); in computeTrace()
490 if (TBI.Succ) in computeTrace()
491 dbgs() << "BB#" << TBI.Succ->getNumber() << '\n'; in computeTrace()
518 TraceBlockInfo &TBI = BlockInfo[(*I)->getNumber()]; in invalidate() local
519 if (!TBI.hasValidHeight()) in invalidate()
521 if (TBI.Succ == MBB) { in invalidate()
522 TBI.invalidateHeight(); in invalidate()
527 assert((!TBI.Succ || (*I)->isSuccessor(TBI.Succ)) && "CFG changed"); in invalidate()
544 TraceBlockInfo &TBI = BlockInfo[(*I)->getNumber()]; in invalidate() local
545 if (!TBI.hasValidDepth()) in invalidate()
547 if (TBI.Pred == MBB) { in invalidate()
548 TBI.invalidateDepth(); in invalidate()
553 assert((!TBI.Pred || (*I)->isPredecessor(TBI.Pred)) && "CFG changed"); in invalidate()
572 const TraceBlockInfo &TBI = BlockInfo[Num]; in verify() local
573 if (TBI.hasValidDepth() && TBI.Pred) { in verify()
575 assert(MBB->isPredecessor(TBI.Pred) && "CFG doesn't match trace"); in verify()
576 assert(BlockInfo[TBI.Pred->getNumber()].hasValidDepth() && in verify()
581 if (TBI.hasValidHeight() && TBI.Succ) { in verify()
583 assert(MBB->isSuccessor(TBI.Succ) && "CFG doesn't match trace"); in verify()
584 assert(BlockInfo[TBI.Succ->getNumber()].hasValidHeight() && in verify()
587 const MachineLoop *SuccLoop = getLoopFor(TBI.Succ); in verify()
588 assert(!(Loop && Loop == SuccLoop && TBI.Succ == Loop->getHeader()) && in verify()
753 computeCrossBlockCriticalPath(const TraceBlockInfo &TBI) { in computeCrossBlockCriticalPath() argument
754 assert(TBI.HasValidInstrDepths && "Missing depth info"); in computeCrossBlockCriticalPath()
755 assert(TBI.HasValidInstrHeights && "Missing height info"); in computeCrossBlockCriticalPath()
757 for (unsigned i = 0, e = TBI.LiveIns.size(); i != e; ++i) { in computeCrossBlockCriticalPath()
758 const LiveInReg &LIR = TBI.LiveIns[i]; in computeCrossBlockCriticalPath()
764 if (!DefTBI.isUsefulDominator(TBI)) in computeCrossBlockCriticalPath()
781 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrDepths() local
782 assert(TBI.hasValidDepth() && "Incomplete trace"); in computeInstrDepths()
783 if (TBI.HasValidInstrDepths) in computeInstrDepths()
786 MBB = TBI.Pred; in computeInstrDepths()
801 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrDepths() local
802 TBI.HasValidInstrDepths = true; in computeInstrDepths()
803 TBI.CriticalPath = 0; in computeInstrDepths()
807 dbgs() << format("%7u Instructions\n", TBI.InstrDepth); in computeInstrDepths()
819 if (TBI.HasValidInstrHeights) in computeInstrDepths()
820 TBI.CriticalPath = computeCrossBlockCriticalPath(TBI); in computeInstrDepths()
826 getPHIDeps(&UseMI, Deps, TBI.Pred, MTM.MRI); in computeInstrDepths()
837 if (!DepTBI.isUsefulDominator(TBI)) in computeInstrDepths()
851 if (!TBI.HasValidInstrHeights) { in computeInstrDepths()
856 TBI.CriticalPath = std::max(TBI.CriticalPath, Cycle + MICycles.Height); in computeInstrDepths()
857 DEBUG(dbgs() << TBI.CriticalPath << '\t' << Cycle << '\t' << UseMI); in computeInstrDepths()
961 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in addLiveIns() local
963 TBI.LiveIns.push_back(Reg); in addLiveIns()
976 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrHeights() local
977 assert(TBI.hasValidHeight() && "Incomplete trace"); in computeInstrHeights()
978 if (TBI.HasValidInstrHeights) in computeInstrHeights()
981 TBI.LiveIns.clear(); in computeInstrHeights()
982 MBB = TBI.Succ; in computeInstrHeights()
998 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrHeights() local
999 for (unsigned i = 0, e = TBI.LiveIns.size(); i != e; ++i) { in computeInstrHeights()
1000 LiveInReg LI = TBI.LiveIns[i]; in computeInstrHeights()
1019 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrHeights() local
1020 TBI.HasValidInstrHeights = true; in computeInstrHeights()
1021 TBI.CriticalPath = 0; in computeInstrHeights()
1024 dbgs() << format("%7u Instructions\n", TBI.InstrHeight); in computeInstrHeights()
1036 const MachineBasicBlock *Succ = TBI.Succ; in computeInstrHeights()
1053 unsigned Height = TBI.Succ ? Cycles.lookup(&PHI).Height : 0; in computeInstrHeights()
1094 if (!TBI.HasValidInstrDepths) { in computeInstrHeights()
1099 TBI.CriticalPath = std::max(TBI.CriticalPath, Cycle + MICycles.Depth); in computeInstrHeights()
1100 DEBUG(dbgs() << TBI.CriticalPath << '\t' << Cycle << '\t' << *MI); in computeInstrHeights()
1106 for (unsigned i = 0, e = TBI.LiveIns.size(); i != e; ++i) { in computeInstrHeights()
1107 LiveInReg &LIR = TBI.LiveIns[i]; in computeInstrHeights()
1116 TBI.LiveIns.push_back(LiveInReg(RI->RegUnit, RI->Cycle)); in computeInstrHeights()
1122 if (!TBI.HasValidInstrDepths) in computeInstrHeights()
1125 TBI.CriticalPath = std::max(TBI.CriticalPath, in computeInstrHeights()
1126 computeCrossBlockCriticalPath(TBI)); in computeInstrHeights()
1127 DEBUG(dbgs() << "Critical path: " << TBI.CriticalPath << '\n'); in computeInstrHeights()
1182 unsigned Instrs = TBI.InstrDepth; in getResourceDepth()
1235 unsigned Instrs = TBI.InstrDepth + TBI.InstrHeight; in getResourceLength()
1253 const TraceBlockInfo &TBI = TE.BlockInfo[UseMI->getParent()->getNumber()]; in isDepInTrace() local
1255 return DepTBI.isUsefulDominator(TBI); in isDepInTrace()
1296 unsigned MBBNum = &TBI - &TE.BlockInfo[0]; in print()
1298 OS << TE.getName() << " trace BB#" << TBI.Head << " --> BB#" << MBBNum in print()
1299 << " --> BB#" << TBI.Tail << ':'; in print()
1300 if (TBI.hasValidHeight() && TBI.hasValidDepth()) in print()
1302 if (TBI.HasValidInstrDepths && TBI.HasValidInstrHeights) in print()
1303 OS << ' ' << TBI.CriticalPath << " cycles."; in print()
1305 const MachineTraceMetrics::TraceBlockInfo *Block = &TBI; in print()
1313 Block = &TBI; in print()