• Home
  • Raw
  • Download

Lines Matching refs:TBI

122   TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()];  in computeDepthResources()  local
125 if (!TBI->Pred) { in computeDepthResources()
126 TBI->InstrDepth = 0; in computeDepthResources()
127 TBI->Head = MBB->getNumber(); in computeDepthResources()
133 TraceBlockInfo *PredTBI = &BlockInfo[TBI->Pred->getNumber()]; in computeDepthResources()
135 const FixedBlockInfo *PredFBI = MTM.getResources(TBI->Pred); in computeDepthResources()
136 TBI->InstrDepth = PredTBI->InstrDepth + PredFBI->InstrCount; in computeDepthResources()
137 TBI->Head = PredTBI->Head; in computeDepthResources()
144 TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()]; in computeHeightResources() local
147 TBI->InstrHeight = MTM.getResources(MBB)->InstrCount; in computeHeightResources()
150 if (!TBI->Succ) { in computeHeightResources()
151 TBI->Tail = MBB->getNumber(); in computeHeightResources()
157 TraceBlockInfo *SuccTBI = &BlockInfo[TBI->Succ->getNumber()]; in computeHeightResources()
159 TBI->InstrHeight += SuccTBI->InstrHeight; in computeHeightResources()
160 TBI->Tail = SuccTBI->Tail; in computeHeightResources()
168 const TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()]; in getDepthResources() local
169 return TBI->hasValidDepth() ? TBI : 0; in getDepthResources()
177 const TraceBlockInfo *TBI = &BlockInfo[MBB->getNumber()]; in getHeightResources() local
178 return TBI->hasValidHeight() ? TBI : 0; in getHeightResources()
343 MachineTraceMetrics::TraceBlockInfo &TBI = LB.Blocks[To->getNumber()]; in insertEdge() local
344 if (LB.Downward ? TBI.hasValidHeight() : TBI.hasValidDepth()) in insertEdge()
378 TraceBlockInfo &TBI = BlockInfo[I->getNumber()]; in computeTrace() local
380 TBI.Pred = pickTracePred(*I); in computeTrace()
382 if (TBI.Pred) in computeTrace()
383 dbgs() << "BB#" << TBI.Pred->getNumber() << '\n'; in computeTrace()
398 TraceBlockInfo &TBI = BlockInfo[I->getNumber()]; in computeTrace() local
400 TBI.Succ = pickTraceSucc(*I); in computeTrace()
402 if (TBI.Succ) in computeTrace()
403 dbgs() << "BB#" << TBI.Succ->getNumber() << '\n'; in computeTrace()
430 TraceBlockInfo &TBI = BlockInfo[(*I)->getNumber()]; in invalidate() local
431 if (!TBI.hasValidHeight()) in invalidate()
433 if (TBI.Succ == MBB) { in invalidate()
434 TBI.invalidateHeight(); in invalidate()
439 assert((!TBI.Succ || (*I)->isSuccessor(TBI.Succ)) && "CFG changed"); in invalidate()
456 TraceBlockInfo &TBI = BlockInfo[(*I)->getNumber()]; in invalidate() local
457 if (!TBI.hasValidDepth()) in invalidate()
459 if (TBI.Pred == MBB) { in invalidate()
460 TBI.invalidateDepth(); in invalidate()
465 assert((!TBI.Pred || (*I)->isPredecessor(TBI.Pred)) && "CFG changed"); in invalidate()
485 const TraceBlockInfo &TBI = BlockInfo[Num]; in verify() local
486 if (TBI.hasValidDepth() && TBI.Pred) { in verify()
488 assert(MBB->isPredecessor(TBI.Pred) && "CFG doesn't match trace"); in verify()
489 assert(BlockInfo[TBI.Pred->getNumber()].hasValidDepth() && in verify()
494 if (TBI.hasValidHeight() && TBI.Succ) { in verify()
496 assert(MBB->isSuccessor(TBI.Succ) && "CFG doesn't match trace"); in verify()
497 assert(BlockInfo[TBI.Succ->getNumber()].hasValidHeight() && in verify()
500 const MachineLoop *SuccLoop = getLoopFor(TBI.Succ); in verify()
501 assert(!(Loop && Loop == SuccLoop && TBI.Succ == Loop->getHeader()) && in verify()
666 computeCrossBlockCriticalPath(const TraceBlockInfo &TBI) { in computeCrossBlockCriticalPath() argument
667 assert(TBI.HasValidInstrDepths && "Missing depth info"); in computeCrossBlockCriticalPath()
668 assert(TBI.HasValidInstrHeights && "Missing height info"); in computeCrossBlockCriticalPath()
670 for (unsigned i = 0, e = TBI.LiveIns.size(); i != e; ++i) { in computeCrossBlockCriticalPath()
671 const LiveInReg &LIR = TBI.LiveIns[i]; in computeCrossBlockCriticalPath()
677 if (!DefTBI.hasValidDepth() || DefTBI.Head != TBI.Head) in computeCrossBlockCriticalPath()
694 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrDepths() local
695 assert(TBI.hasValidDepth() && "Incomplete trace"); in computeInstrDepths()
696 if (TBI.HasValidInstrDepths) in computeInstrDepths()
699 MBB = TBI.Pred; in computeInstrDepths()
714 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrDepths() local
715 TBI.HasValidInstrDepths = true; in computeInstrDepths()
716 TBI.CriticalPath = 0; in computeInstrDepths()
719 if (TBI.HasValidInstrHeights) in computeInstrDepths()
720 TBI.CriticalPath = computeCrossBlockCriticalPath(TBI); in computeInstrDepths()
729 getPHIDeps(UseMI, Deps, TBI.Pred, MTM.MRI); in computeInstrDepths()
740 if (!DepTBI.hasValidDepth() || DepTBI.Head != TBI.Head) in computeInstrDepths()
756 if (!TBI.HasValidInstrHeights) { in computeInstrDepths()
761 TBI.CriticalPath = std::max(TBI.CriticalPath, Cycle + MICycles.Height); in computeInstrDepths()
762 DEBUG(dbgs() << TBI.CriticalPath << '\t' << Cycle << '\t' << *UseMI); in computeInstrDepths()
871 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in addLiveIns() local
873 TBI.LiveIns.push_back(Reg); in addLiveIns()
886 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrHeights() local
887 assert(TBI.hasValidHeight() && "Incomplete trace"); in computeInstrHeights()
888 if (TBI.HasValidInstrHeights) in computeInstrHeights()
891 TBI.LiveIns.clear(); in computeInstrHeights()
892 MBB = TBI.Succ; in computeInstrHeights()
908 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrHeights() local
909 for (unsigned i = 0, e = TBI.LiveIns.size(); i != e; ++i) { in computeInstrHeights()
910 LiveInReg LI = TBI.LiveIns[i]; in computeInstrHeights()
929 TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; in computeInstrHeights() local
930 TBI.HasValidInstrHeights = true; in computeInstrHeights()
931 TBI.CriticalPath = 0; in computeInstrHeights()
934 const MachineBasicBlock *Succ = TBI.Succ; in computeInstrHeights()
951 unsigned Height = TBI.Succ ? Cycles.lookup(PHI).Height : 0; in computeInstrHeights()
992 if (!TBI.HasValidInstrDepths) { in computeInstrHeights()
997 TBI.CriticalPath = std::max(TBI.CriticalPath, Cycle + MICycles.Depth); in computeInstrHeights()
998 DEBUG(dbgs() << TBI.CriticalPath << '\t' << Cycle << '\t' << *MI); in computeInstrHeights()
1004 for (unsigned i = 0, e = TBI.LiveIns.size(); i != e; ++i) { in computeInstrHeights()
1005 LiveInReg &LIR = TBI.LiveIns[i]; in computeInstrHeights()
1014 TBI.LiveIns.push_back(LiveInReg(RI->RegUnit, RI->Cycle)); in computeInstrHeights()
1020 if (!TBI.HasValidInstrDepths) in computeInstrHeights()
1023 TBI.CriticalPath = std::max(TBI.CriticalPath, in computeInstrHeights()
1024 computeCrossBlockCriticalPath(TBI)); in computeInstrHeights()
1025 DEBUG(dbgs() << "Critical path: " << TBI.CriticalPath << '\n'); in computeInstrHeights()
1068 unsigned Instrs = TBI.InstrDepth; in getResourceDepth()
1080 unsigned Instrs = TBI.InstrDepth + TBI.InstrHeight; in getResourceLength()
1128 unsigned MBBNum = &TBI - &TE.BlockInfo[0]; in print()
1130 OS << TE.getName() << " trace BB#" << TBI.Head << " --> BB#" << MBBNum in print()
1131 << " --> BB#" << TBI.Tail << ':'; in print()
1132 if (TBI.hasValidHeight() && TBI.hasValidDepth()) in print()
1134 if (TBI.HasValidInstrDepths && TBI.HasValidInstrHeights) in print()
1135 OS << ' ' << TBI.CriticalPath << " cycles."; in print()
1137 const MachineTraceMetrics::TraceBlockInfo *Block = &TBI; in print()
1145 Block = &TBI; in print()