[llvm] MTM: improve operand latency when missing sched info (PR #101389)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 06:35:24 PDT 2024
================
@@ -761,6 +762,64 @@ static void updatePhysDepsDownwards(const MachineInstr *UseMI,
}
}
+/// Estimates the number of cycles elapsed between DefMI and UseMI if they're
+/// non-null and in the same BasicBlock. Returns std::nullopt when UseMI is in a
+/// different MBB than DefMI.
----------------
michaelmaitland wrote:
This function is currently estimating the number of cycles elapsed between DefMi inclusive and UseMI exclusive. I think this is correct based on how this function is used, since its representing a latency between two instructions and latency is calculated from issue of def to when it is available to use.
nit: Do you think you could clarify the inclusive/exclusive relationship in this comment to make it clear?
https://github.com/llvm/llvm-project/pull/101389
More information about the llvm-commits
mailing list