• Home
  • Raw
  • Download

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()
517 TraceBlockInfo &TBI = BlockInfo[Pred->getNumber()]; in invalidate() local
518 if (!TBI.hasValidHeight()) in invalidate()
520 if (TBI.Succ == MBB) { in invalidate()
521 TBI.invalidateHeight(); in invalidate()
526 assert((!TBI.Succ || Pred->isSuccessor(TBI.Succ)) && "CFG changed"); in invalidate()
542 TraceBlockInfo &TBI = BlockInfo[Succ->getNumber()]; in invalidate() local
543 if (!TBI.hasValidDepth()) in invalidate()
545 if (TBI.Pred == MBB) { in invalidate()
546 TBI.invalidateDepth(); in invalidate()
551 assert((!TBI.Pred || Succ->isPredecessor(TBI.Pred)) && "CFG changed"); in invalidate()
570 const TraceBlockInfo &TBI = BlockInfo[Num]; in verify() local
571 if (TBI.hasValidDepth() && TBI.Pred) { in verify()
573 assert(MBB->isPredecessor(TBI.Pred) && "CFG doesn't match trace"); in verify()
574 assert(BlockInfo[TBI.Pred->getNumber()].hasValidDepth() && in verify()
579 if (TBI.hasValidHeight() && TBI.Succ) { in verify()
581 assert(MBB->isSuccessor(TBI.Succ) && "CFG doesn't match trace"); in verify()
582 assert(BlockInfo[TBI.Succ->getNumber()].hasValidHeight() && in verify()
585 const MachineLoop *SuccLoop = getLoopFor(TBI.Succ); in verify()
586 assert(!(Loop && Loop == SuccLoop && TBI.Succ == Loop->getHeader()) && in verify()
758 computeCrossBlockCriticalPath(const TraceBlockInfo &TBI) { in computeCrossBlockCriticalPath() argument
759 assert(TBI.HasValidInstrDepths && "Missing depth info"); in computeCrossBlockCriticalPath()
760 assert(TBI.HasValidInstrHeights && "Missing height info"); in computeCrossBlockCriticalPath()
762 for (const LiveInReg &LIR : TBI.LiveIns) { in computeCrossBlockCriticalPath()
768 if (!DefTBI.isUsefulDominator(TBI)) in computeCrossBlockCriticalPath()
785 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrDepths() local
786 assert(TBI.hasValidDepth() && "Incomplete trace"); in computeInstrDepths()
787 if (TBI.HasValidInstrDepths) in computeInstrDepths()
790 MBB = TBI.Pred; in computeInstrDepths()
805 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrDepths() local
806 TBI.HasValidInstrDepths = true; in computeInstrDepths()
807 TBI.CriticalPath = 0; in computeInstrDepths()
811 dbgs() << format("%7u Instructions\n", TBI.InstrDepth); in computeInstrDepths()
823 if (TBI.HasValidInstrHeights) in computeInstrDepths()
824 TBI.CriticalPath = computeCrossBlockCriticalPath(TBI); in computeInstrDepths()
830 getPHIDeps(UseMI, Deps, TBI.Pred, MTM.MRI); in computeInstrDepths()
840 if (!DepTBI.isUsefulDominator(TBI)) in computeInstrDepths()
854 if (!TBI.HasValidInstrHeights) { in computeInstrDepths()
859 TBI.CriticalPath = std::max(TBI.CriticalPath, Cycle + MICycles.Height); in computeInstrDepths()
860 DEBUG(dbgs() << TBI.CriticalPath << '\t' << Cycle << '\t' << UseMI); in computeInstrDepths()
967 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in addLiveIns() local
969 TBI.LiveIns.push_back(Reg); in addLiveIns()
982 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrHeights() local
983 assert(TBI.hasValidHeight() && "Incomplete trace"); in computeInstrHeights()
984 if (TBI.HasValidInstrHeights) in computeInstrHeights()
987 TBI.LiveIns.clear(); in computeInstrHeights()
988 MBB = TBI.Succ; in computeInstrHeights()
1004 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrHeights() local
1005 for (LiveInReg &LI : TBI.LiveIns) { in computeInstrHeights()
1024 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrHeights() local
1025 TBI.HasValidInstrHeights = true; in computeInstrHeights()
1026 TBI.CriticalPath = 0; in computeInstrHeights()
1029 dbgs() << format("%7u Instructions\n", TBI.InstrHeight); in computeInstrHeights()
1041 const MachineBasicBlock *Succ = TBI.Succ; in computeInstrHeights()
1058 unsigned Height = TBI.Succ ? Cycles.lookup(&PHI).Height : 0; in computeInstrHeights()
1099 if (!TBI.HasValidInstrDepths) { in computeInstrHeights()
1104 TBI.CriticalPath = std::max(TBI.CriticalPath, Cycle + MICycles.Depth); in computeInstrHeights()
1105 DEBUG(dbgs() << TBI.CriticalPath << '\t' << Cycle << '\t' << MI); in computeInstrHeights()
1111 for (LiveInReg &LIR : TBI.LiveIns) { in computeInstrHeights()
1120 TBI.LiveIns.push_back(LiveInReg(RI->RegUnit, RI->Cycle)); in computeInstrHeights()
1126 if (!TBI.HasValidInstrDepths) in computeInstrHeights()
1129 TBI.CriticalPath = std::max(TBI.CriticalPath, in computeInstrHeights()
1130 computeCrossBlockCriticalPath(TBI)); in computeInstrHeights()
1131 DEBUG(dbgs() << "Critical path: " << TBI.CriticalPath << '\n'); in computeInstrHeights()
1137 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in getTrace() local
1139 if (!TBI.hasValidDepth() || !TBI.hasValidHeight()) in getTrace()
1141 if (!TBI.HasValidInstrDepths) in getTrace()
1143 if (!TBI.HasValidInstrHeights) in getTrace()
1146 return Trace(*this, TBI); in getTrace()
1190 unsigned Instrs = TBI.InstrDepth; in getResourceDepth()
1242 unsigned Instrs = TBI.InstrDepth + TBI.InstrHeight; in getResourceLength()
1260 const TraceBlockInfo &TBI = TE.BlockInfo[UseMI.getParent()->getNumber()]; in isDepInTrace() local
1262 return DepTBI.isUsefulDominator(TBI); in isDepInTrace()
1303 unsigned MBBNum = &TBI - &TE.BlockInfo[0]; in print()
1305 OS << TE.getName() << " trace BB#" << TBI.Head << " --> BB#" << MBBNum in print()
1306 << " --> BB#" << TBI.Tail << ':'; in print()
1307 if (TBI.hasValidHeight() && TBI.hasValidDepth()) in print()
1309 if (TBI.HasValidInstrDepths && TBI.HasValidInstrHeights) in print()
1310 OS << ' ' << TBI.CriticalPath << " cycles."; in print()
1312 const MachineTraceMetrics::TraceBlockInfo *Block = &TBI; in print()
1320 Block = &TBI; in print()