Home | History | Annotate | Download | only in CodeGen

Lines Matching refs:Trace

28 #define DEBUG_TYPE "machine-trace-metrics"
34 "machine-trace-metrics", "Machine Trace Metrics", false, true)
38 "machine-trace-metrics", "Machine Trace Metrics", false, true)
81 // those instructions don't depend on any given trace strategy.
162 // Only update resources related to the trace above MBB.
169 // Compute resources from trace above. The top block is simple.
182 assert(PredTBI->hasValidDepth() && "Trace above has not been computed yet");
195 // Only update resources related to the trace below MBB.
206 // The trace tail is done.
218 assert(SuccTBI->hasValidHeight() && "Trace below has not been computed yet");
248 /// by all blocks preceding MBB in its trace. It does not include instructions
262 /// by this block and all blocks following it in its trace.
274 // Trace Selection Strategies
277 // A trace selection strategy is implemented as a sub-class of Ensemble. The
278 // trace through a block B is computed by two DFS traversals of the CFG
288 // trace, except as the trace head. Below the center block, loop exiting edges
297 // MinInstrCountEnsemble - Pick the trace that executes the least number of
369 // Get an Ensemble sub-class for the requested trace strategy.
372 assert(strategy < TS_NumStrategies && "Invalid trace strategy enum");
380 default: llvm_unreachable("Invalid trace strategy enum");
404 // Trace building
438 // From is null once when To is the trace center block.
456 /// Compute the trace through MBB.
458 DEBUG(dbgs() << "Computing " << getName() << " trace through BB#"
463 // Run an upwards post-order search for the trace start.
477 // The trace leading to I is now known, compute the depth resources.
481 // Run a downwards post-order search for the trace end.
495 // The trace leaving I is now known, compute the height resources.
573 assert(MBB->isPredecessor(TBI.Pred) && "CFG doesn't match trace");
575 "Trace is broken, depth should have been invalidated.");
577 assert(!(Loop && MBB == Loop->getHeader()) && "Trace contains backedge");
581 assert(MBB->isSuccessor(TBI.Succ) && "CFG doesn't match trace");
583 "Trace is broken, height should have been invalidated.");
587 "Trace contains backedge");
662 // No predecessor at the beginning of a trace. Ignore dependencies.
746 /// The length of the critical path through a trace is the maximum of two path
749 /// 1. The maximum height+depth over all instructions in the trace center block.
752 /// possible that the critical path through the trace doesn't include any
766 // Ignore dependencies outside the current trace.
777 /// trace. This assumes that the trace through MBB has already been computed.
780 // The top of the trace may already be computed, and HasValidInstrDepths
782 // block in the trace that needs to be recomputed.
786 assert(TBI.hasValidDepth() && "Incomplete trace");
794 // in the trace. We should track any live-out physregs that were defined in
795 // the trace. This is quite rare in SSA form, typically created by CSE
800 // Go through trace blocks in top-down order, stopping after the center block.
839 // Ignore dependencies from outside the current trace.
952 /// Trace.back(), add it to the live-in lists of all the blocks in Trace. Stop
956 ArrayRef<const MachineBasicBlock*> Trace) {
957 assert(!Trace.empty() && "Trace should contain at least one block");
962 // Reg is live-in to all blocks in Trace that follow DefMBB.
963 for (unsigned i = Trace.size(); i; --i) {
964 const MachineBasicBlock *MBB = Trace[i-1];
973 /// Compute instruction heights in the trace through MBB. This updates MBB and
974 /// the blocks below it in the trace. It is assumed that the trace has already
978 // The bottom of the trace may already be computed.
983 assert(TBI.hasValidHeight() && "Incomplete trace");
991 // As we move upwards in the trace, keep track of instructions that are
992 // required by deeper trace instructions. Map MI -> height required so far.
1000 // If the bottom of the trace was already precomputed, initialize heights
1002 // MBB is the highest precomputed block in the trace.
1019 // Go through the trace blocks in bottom-up order.
1040 // Get dependencies from PHIs in the trace successor.
1042 // If MBB is the last block in the trace, and it has a back-edge to the
1073 // trace below.
1135 MachineTraceMetrics::Trace
1146 return Trace(*this, TBI);
1150 MachineTraceMetrics::Trace::getInstrSlack(const MachineInstr &MI) const {
1152 "MI must be in the trace center block");
1158 MachineTraceMetrics::Trace::getPHIDepth(const MachineInstr &PHI) const {
1173 unsigned MachineTraceMetrics::Trace::getResourceDepth(bool Bottom) const {
1200 unsigned MachineTraceMetrics::Trace::getResourceLength(
1241 // Instrs: #instructions in current trace outside current block.
1254 bool MachineTraceMetrics::Trace::isDepInTrace(const MachineInstr &DefMI,
1302 void MachineTraceMetrics::Trace::print(raw_ostream &OS) const {
1305 OS << TE.getName() << " trace BB#" << TBI.Head << " --> BB#" << MBBNum