diff options
author | Andrew Trick <atrick@apple.com> | 2012-09-18 03:18:56 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-09-18 03:18:56 +0000 |
commit | e127dfd0b175b5a336e61fecaad7fc2aec65d95c (patch) | |
tree | 4757561e728399b5f74422859e930881a8e9fc5e /include/llvm/Target | |
parent | 0cb0a3533788c6c622518cb030048012eb69af15 (diff) | |
download | external_llvm-e127dfd0b175b5a336e61fecaad7fc2aec65d95c.zip external_llvm-e127dfd0b175b5a336e61fecaad7fc2aec65d95c.tar.gz external_llvm-e127dfd0b175b5a336e61fecaad7fc2aec65d95c.tar.bz2 |
TableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164092 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r-- | include/llvm/Target/TargetSubtargetInfo.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetSubtargetInfo.h b/include/llvm/Target/TargetSubtargetInfo.h index 8c6c695..90b46ed 100644 --- a/include/llvm/Target/TargetSubtargetInfo.h +++ b/include/llvm/Target/TargetSubtargetInfo.h @@ -14,6 +14,7 @@ #ifndef LLVM_TARGET_TARGETSUBTARGETINFO_H #define LLVM_TARGET_TARGETSUBTARGETINFO_H +#include "llvm/CodeGen/TargetSchedule.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/Support/CodeGen.h" @@ -43,6 +44,15 @@ public: virtual ~TargetSubtargetInfo(); + /// Initialize a copy of the scheduling model for this subtarget. + /// TargetSchedModel provides the interface for the subtarget's + /// instruction scheduling information. + void initSchedModel(TargetSchedModel &SchedModel, + const TargetInstrInfo *TII) const { + // getSchedModel returns the static MCSchedModel initialized by InitMCSubtargetInfo. + SchedModel.init(*getSchedModel(), this, TII); + } + /// getSpecialAddressLatency - For targets where it is beneficial to /// backschedule instructions that compute addresses, return a value /// indicating the number of scheduling cycles of backscheduling that |