diff options
author | Andrew Trick <atrick@apple.com> | 2012-10-09 23:44:32 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-10-09 23:44:32 +0000 |
commit | c0dfffa448ad7ab647779bc3e7f2aee5c76cb31b (patch) | |
tree | 878d4a901c5df5b01bbafc208099226ef78fa612 /include/llvm/CodeGen | |
parent | c92d72abd03b0c29099b3f87f4cb67a299610f03 (diff) | |
download | external_llvm-c0dfffa448ad7ab647779bc3e7f2aee5c76cb31b.zip external_llvm-c0dfffa448ad7ab647779bc3e7f2aee5c76cb31b.tar.gz external_llvm-c0dfffa448ad7ab647779bc3e7f2aee5c76cb31b.tar.bz2 |
misched: Add computeInstrLatency to TargetSchedModel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165566 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/TargetSchedule.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/TargetSchedule.h b/include/llvm/CodeGen/TargetSchedule.h index 6a5359d..3adbe7d 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(); } |