diff options
Diffstat (limited to 'include/llvm/CodeGen/MachineTraceMetrics.h')
| -rw-r--r-- | include/llvm/CodeGen/MachineTraceMetrics.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/llvm/CodeGen/MachineTraceMetrics.h b/include/llvm/CodeGen/MachineTraceMetrics.h index bfe6e945b6da6..06db17abaed91 100644 --- a/include/llvm/CodeGen/MachineTraceMetrics.h +++ b/include/llvm/CodeGen/MachineTraceMetrics.h @@ -50,6 +50,7 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" #include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/TargetSchedule.h" namespace llvm { @@ -275,24 +276,24 @@ public: /// Return the depth and height of MI. The depth is only valid for /// instructions in or above the trace center block. The height is only /// valid for instructions in or below the trace center block. - InstrCycles getInstrCycles(const MachineInstr *MI) const { - return TE.Cycles.lookup(MI); + InstrCycles getInstrCycles(const MachineInstr &MI) const { + return TE.Cycles.lookup(&MI); } /// Return the slack of MI. This is the number of cycles MI can be delayed /// before the critical path becomes longer. /// MI must be an instruction in the trace center block. - unsigned getInstrSlack(const MachineInstr *MI) const; + unsigned getInstrSlack(const MachineInstr &MI) const; /// Return the Depth of a PHI instruction in a trace center block successor. /// The PHI does not have to be part of the trace. - unsigned getPHIDepth(const MachineInstr *PHI) const; + unsigned getPHIDepth(const MachineInstr &PHI) const; /// A dependence is useful if the basic block of the defining instruction /// is part of the trace of the user instruction. It is assumed that DefMI /// dominates UseMI (see also isUsefulDominator). - bool isDepInTrace(const MachineInstr *DefMI, - const MachineInstr *UseMI) const; + bool isDepInTrace(const MachineInstr &DefMI, + const MachineInstr &UseMI) const; }; /// A trace ensemble is a collection of traces selected using the same |
