[llvm] MachineTraceMetrics: always include instr latency in depth (PR #73550)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 01:21:04 PST 2023


artagnon wrote:

> But it looks like the `Cycle` here is the first point the instruction can be issued - i.e. when all it's operands become available. Not when it finishes executing, and the _result_ becomes available.

This doesn't seem to be true from my inspection of `getOperandLatency`: in fact, `getOperandLatency` falls back to `getInstrLatency` in some cases, and even in cases when it doesn't, the latency of the instruction is implicitly included in its computation. Please correct me in case I've misunderstood something.

> Can you explain more about the issue you are trying to solve?

I'm simply trying to match the semantics of `getOperandLatency` in cases where there are no deps or all deps are transient.

https://github.com/llvm/llvm-project/pull/73550


More information about the llvm-commits mailing list