• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/CodeGen/

Lines Matching defs:TBI

177   TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()];
182 if (!TBI->Pred) {
183 TBI->InstrDepth = 0;
184 TBI->Head = MBB->getNumber();
192 unsigned PredNum = TBI->Pred->getNumber();
195 const FixedBlockInfo *PredFBI = MTM.getResources(TBI->Pred);
196 TBI->InstrDepth = PredTBI->InstrDepth + PredFBI->InstrCount;
197 TBI->Head = PredTBI->Head;
210 TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()];
215 TBI->InstrHeight = MTM.getResources(MBB)->InstrCount;
219 if (!TBI->Succ) {
220 TBI->Tail = MBB->getNumber();
227 unsigned SuccNum = TBI->Succ->getNumber();
230 TBI->InstrHeight += SuccTBI->InstrHeight;
231 TBI->Tail = SuccTBI->Tail;
239 // Check if depth resources for MBB are valid and return the TBI.
244 const TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()];
245 return TBI->hasValidDepth() ? TBI : nullptr;
248 // Check if height resources for MBB are valid and return the TBI.
253 const TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()];
254 return TBI->hasValidHeight() ? TBI : nullptr;
455 MachineTraceMetrics::TraceBlockInfo &TBI = LB.Blocks[To->getNumber()];
456 if (LB.Downward ? TBI.hasValidHeight() : TBI.hasValidDepth())
489 TraceBlockInfo &TBI = BlockInfo[I->getNumber()];
491 TBI.Pred = pickTracePred(I);
493 if (TBI.Pred)
494 dbgs() << printMBBReference(*TBI.Pred) << '\n';
507 TraceBlockInfo &TBI = BlockInfo[I->getNumber()];
509 TBI.Succ = pickTraceSucc(I);
511 if (TBI.Succ)
512 dbgs() << printMBBReference(*TBI.Succ) << '\n';
538 TraceBlockInfo &TBI = BlockInfo[Pred->getNumber()];
539 if (!TBI.hasValidHeight())
541 if (TBI.Succ == MBB) {
542 TBI.invalidateHeight();
546 // Verify that TBI.Succ is actually a *I successor.
547 assert((!TBI.Succ || Pred->isSuccessor(TBI.Succ)) && "CFG changed");
563 TraceBlockInfo &TBI = BlockInfo[Succ->getNumber()];
564 if (!TBI.hasValidDepth())
566 if (TBI.Pred == MBB) {
567 TBI.invalidateDepth();
571 // Verify that TBI.Pred is actually a *I predecessor.
572 assert((!TBI.Pred || Succ->isPredecessor(TBI.Pred)) && "CFG changed");
591 const TraceBlockInfo &TBI = BlockInfo[Num];
592 if (TBI.hasValidDepth() && TBI.Pred) {
594 assert(MBB->isPredecessor(TBI.Pred) && "CFG doesn't match trace");
595 assert(BlockInfo[TBI.Pred->getNumber()].hasValidDepth() &&
600 if (TBI.hasValidHeight() && TBI.Succ) {
602 assert(MBB->isSuccessor(TBI.Succ) && "CFG doesn't match trace");
603 assert(BlockInfo[TBI.Succ->getNumber()].hasValidHeight() &&
606 const MachineLoop *SuccLoop = getLoopFor(TBI.Succ);
607 assert(!(Loop && Loop == SuccLoop && TBI.Succ == Loop->getHeader()) &&
764 computeCrossBlockCriticalPath(const TraceBlockInfo &TBI) {
765 assert(TBI.HasValidInstrDepths && "Missing depth info");
766 assert(TBI.HasValidInstrHeights && "Missing height info");
768 for (const LiveInReg &LIR : TBI.LiveIns) {
774 if (!DefTBI.isUsefulDominator(TBI))
783 updateDepth(MachineTraceMetrics::TraceBlockInfo &TBI, const MachineInstr &UseMI,
788 getPHIDeps(UseMI, Deps, TBI.Pred, MTM.MRI);
798 if (!DepTBI.isUsefulDominator(TBI))
812 if (TBI.HasValidInstrHeights) {
814 TBI.CriticalPath = std::max(TBI.CriticalPath, Cycle + MICycles.Height);
815 LLVM_DEBUG(dbgs() << TBI.CriticalPath << '\t' << Cycle << '\t' << UseMI);
844 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()];
845 assert(TBI.hasValidDepth() && "Incomplete trace");
846 if (TBI.HasValidInstrDepths)
849 MBB = TBI.Pred;
863 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()];
864 TBI.HasValidInstrDepths = true;
865 TBI.CriticalPath = 0;
869 dbgs() << format("%7u Instructions\n", TBI.InstrDepth);
881 if (TBI.HasValidInstrHeights)
882 TBI.CriticalPath = computeCrossBlockCriticalPath(TBI);
885 updateDepth(TBI, UseMI, RegUnits);
991 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()];
993 TBI.LiveIns.push_back(Reg);
1006 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()];
1007 assert(TBI.hasValidHeight() && "Incomplete trace");
1008 if (TBI.HasValidInstrHeights)
1011 TBI.LiveIns.clear();
1012 MBB = TBI.Succ;
1028 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()];
1029 for (LiveInReg &LI : TBI.LiveIns) {
1048 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()];
1049 TBI.HasValidInstrHeights = true;
1050 TBI.CriticalPath = 0;
1053 dbgs() << format("%7u Instructions\n", TBI.InstrHeight);
1065 const MachineBasicBlock *Succ = TBI.Succ;
1082 unsigned Height = TBI.Succ ? Cycles.lookup(&PHI).Height : 0;
1123 if (!TBI.HasValidInstrDepths) {
1128 TBI.CriticalPath = std::max(TBI.CriticalPath, Cycle + MICycles.Depth);
1129 LLVM_DEBUG(dbgs() << TBI.CriticalPath << '\t' << Cycle << '\t' << MI);
1135 for (LiveInReg &LIR : TBI.LiveIns) {
1144 TBI.LiveIns.push_back(LiveInReg(RI->RegUnit, RI->Cycle));
1150 if (!TBI.HasValidInstrDepths)
1153 TBI.CriticalPath = std::max(TBI.CriticalPath,
1154 computeCrossBlockCriticalPath(TBI));
1155 LLVM_DEBUG(dbgs() << "Critical path: " << TBI.CriticalPath << '\n');
1161 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()];
1163 if (!TBI.hasValidDepth() || !TBI.hasValidHeight())
1165 if (!TBI.HasValidInstrDepths)
1167 if (!TBI.HasValidInstrHeights)
1170 return Trace(*this, TBI);
1214 unsigned Instrs = TBI.InstrDepth;
1266 unsigned Instrs = TBI.InstrDepth + TBI.InstrHeight;
1284 const TraceBlockInfo &TBI = TE.BlockInfo[UseMI.getParent()->getNumber()];
1286 return DepTBI.isUsefulDominator(TBI);
1327 unsigned MBBNum = &TBI - &TE.BlockInfo[0];
1329 OS << TE.getName() << " trace %bb." << TBI.Head << " --> %bb." << MBBNum
1330 << " --> %bb." << TBI.Tail << ':';
1331 if (TBI.hasValidHeight() && TBI.hasValidDepth())
1333 if (TBI.HasValidInstrDepths && TBI.HasValidInstrHeights)
1334 OS << ' ' << TBI.CriticalPath << " cycles.";
1336 const MachineTraceMetrics::TraceBlockInfo *Block = &TBI;
1344 Block = &TBI;