diff options
author | Andrew Trick <atrick@apple.com> | 2012-09-17 22:18:55 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-09-17 22:18:55 +0000 |
commit | db7afac4575168c239ac9c570cb7897808f12e30 (patch) | |
tree | 761a5613520e9ad4633baafae55a5baa9536f6fc /include/llvm/Target/TargetSubtargetInfo.h | |
parent | 544c88039f16706d6764c65fda276a11f2c586d6 (diff) | |
download | external_llvm-db7afac4575168c239ac9c570cb7897808f12e30.zip external_llvm-db7afac4575168c239ac9c570cb7897808f12e30.tar.gz external_llvm-db7afac4575168c239ac9c570cb7897808f12e30.tar.bz2 |
TableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164061 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetSubtargetInfo.h')
-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..bc357ac 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 { + // CPUSchedModel is initialized to a static instance 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 |