diff options
author | Andrew Trick <atrick@apple.com> | 2012-11-06 07:10:38 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-11-06 07:10:38 +0000 |
commit | 8d4abb2446f80986ad5136bbec30c5da18cd6f4b (patch) | |
tree | a4337cf1caade4cd909ac3244330c83e838d7129 /include/llvm/CodeGen/ScheduleDAGInstrs.h | |
parent | 2276453e2be12badb07f84f8be9cf89626da48b6 (diff) | |
download | external_llvm-8d4abb2446f80986ad5136bbec30c5da18cd6f4b.zip external_llvm-8d4abb2446f80986ad5136bbec30c5da18cd6f4b.tar.gz external_llvm-8d4abb2446f80986ad5136bbec30c5da18cd6f4b.tar.bz2 |
misched: TargetSchedule interface for machine resources.
Expose the processor resources defined by the machine model to the
scheduler and other clients through the TargetSchedule interface.
Normalize each resource count with respect to other kinds of
resources. This allows scheduling heuristics to balance resources
against other kinds of resources and latency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167444 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/ScheduleDAGInstrs.h')
-rw-r--r-- | include/llvm/CodeGen/ScheduleDAGInstrs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/ScheduleDAGInstrs.h b/include/llvm/CodeGen/ScheduleDAGInstrs.h index b4496a0..4bcd35a 100644 --- a/include/llvm/CodeGen/ScheduleDAGInstrs.h +++ b/include/llvm/CodeGen/ScheduleDAGInstrs.h @@ -189,6 +189,13 @@ namespace llvm { /// \brief Get the machine model for instruction scheduling. const TargetSchedModel *getSchedModel() const { return &SchedModel; } + /// \brief Resolve and cache a resolved scheduling class for an SUnit. + const MCSchedClassDesc *getSchedClass(SUnit *SU) const { + if (!SU->SchedClass) + SU->SchedClass = SchedModel.resolveSchedClass(SU->getInstr()); + return SU->SchedClass; + } + /// begin - Return an iterator to the top of the current scheduling region. MachineBasicBlock::iterator begin() const { return RegionBegin; } |