summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/TargetSchedule.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/TargetSchedule.h')
-rw-r--r--include/llvm/CodeGen/TargetSchedule.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/TargetSchedule.h b/include/llvm/CodeGen/TargetSchedule.h
index 6a5359de14..3adbe7d0d7 100644
--- a/include/llvm/CodeGen/TargetSchedule.h
+++ b/include/llvm/CodeGen/TargetSchedule.h
@@ -74,6 +74,14 @@ public:
const MachineInstr *UseMI, unsigned UseOperIdx,
bool FindMin) const;
+ /// \brief Compute the instruction latency based on the available machine
+ /// model.
+ ///
+ /// Compute and return the expected latency of this instruction independent of
+ /// a particular use. computeOperandLatency is the prefered API, but this is
+ /// occasionally useful to help estimate instruction cost.
+ unsigned computeInstrLatency(const MachineInstr *MI) const;
+
/// \brief Identify the processor corresponding to the current subtarget.
unsigned getProcessorID() const { return SchedModel.getProcessorID(); }