llvm.org GIT mirror llvm / c92d72a
misched: Doxument the TargetSchedule API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165565 91177308-0d34-0410-b5e6-96231b3b80d8 Andrew Trick 7 years ago
1 changed file(s) with 22 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
3636 public:
3737 TargetSchedModel(): STI(0), TII(0) {}
3838
39 /// \brief Initialize the machine model for instruction scheduling.
40 ///
41 /// The machine model API keeps a copy of the top-level MCSchedModel table
42 /// indices and may query TargetSubtargetInfo and TargetInstrInfo to resolve
43 /// dynamic properties.
3944 void init(const MCSchedModel &sm, const TargetSubtargetInfo *sti,
4045 const TargetInstrInfo *tii);
4146
47 /// \brief TargetInstrInfo getter.
4248 const TargetInstrInfo *getInstrInfo() const { return TII; }
4349
44 /// Return true if this machine model includes an instruction-level scheduling
45 /// model. This is more detailed than the course grain IssueWidth and default
50 /// \brief Return true if this machine model includes an instruction-level
51 /// scheduling model.
52 ///
53 /// This is more detailed than the course grain IssueWidth and default
4654 /// latency properties, but separate from the per-cycle itinerary data.
4755 bool hasInstrSchedModel() const;
4856
49 /// Return true if this machine model includes cycle-to-cycle itinerary
50 /// data. This models scheduling at each stage in the processor pipeline.
57 /// \brief Return true if this machine model includes cycle-to-cycle itinerary
58 /// data.
59 ///
60 /// This models scheduling at each stage in the processor pipeline.
5161 bool hasInstrItineraries() const;
5262
53 /// computeOperandLatency - Compute and return the latency of the given data
54 /// dependent def and use when the operand indices are already known. UseMI
55 /// may be NULL for an unknown user.
63 /// \brief Compute operand latency based on the available machine model.
64 ///
65 /// Computes and return the latency of the given data dependent def and use
66 /// when the operand indices are already known. UseMI may be NULL for an
67 /// unknown user.
5668 ///
5769 /// FindMin may be set to get the minimum vs. expected latency. Minimum
5870 /// latency is used for scheduling groups, while expected latency is for
6173 const MachineInstr *UseMI, unsigned UseOperIdx,
6274 bool FindMin) const;
6375
76 /// \brief Identify the processor corresponding to the current subtarget.
6477 unsigned getProcessorID() const { return SchedModel.getProcessorID(); }
78
79 /// \brief Maximum number of micro-ops that may be scheduled per cycle.
6580 unsigned getIssueWidth() const { return SchedModel.IssueWidth; }
6681
6782 private: