I have a question about MachineTraceMetrics.
The definition of depth of block in MachineTraceMetrics is defined as
the accumulated number of instructions in the trace above the block.
Does not include instructions in this block.
In MachineTraceMetrics::Ensemble::computeDepthResources(), we could
see the definition when computing depth of a basic block as follow.
TBI->InstrDepth = PredTBI->InstrDepth + PredFBI->InstrCount;
TBI is current basic block's trace info.
PredTBI is predecessor's trace info.
PredFBI is predecessor's fixed trace info.
That is, current block depth is summation of predecessor's depth and
predecessor's instruction count.
However, in MinInstrCountEnsemble::pickTracePred(), it uses
predecessor's depth plus current basic block's instruction count as
depth to pick the smallest one. Why? The summation is not aligned with
Is there any reason to do so or is it a bug in MinInstrCountEnsemble?
Thanks in advance.