The definition of InstrDepth for a basic block is the accumulated number
of instructions in the trace above the block, excluding instructions in
the block. When we pick the best trace predecessor, we should consider
the block depth of each predecessor and pick the smallest one. The
original implementation uses current block's InstrCount to calculate
predecessors' InstrDepth. It should be fixed to use predecessors'
InstrCount instead of current block's InstrCount.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Sorry, I'm afraid I can't help reviewing this patch as I know nothing about MachineTraceMetrics. Although, I suggest adding a test case, as it will help reviewers to understand better what the changes are.