diff options
author | Javed Absar <javed.absar@arm.com> | 2017-03-27 20:46:37 +0000 |
---|---|---|
committer | Javed Absar <javed.absar@arm.com> | 2017-03-27 20:46:37 +0000 |
commit | 3d594370933b515234c208a85a1c091d3e38d7f7 (patch) | |
tree | 74e4b77190e8420c4d80ffe6096df575bc37525d /llvm/lib/CodeGen/TargetSchedule.cpp | |
parent | f1c2f2a668db86fc2143cfeeb3ff71579afabfbc (diff) | |
download | bcm5719-llvm-3d594370933b515234c208a85a1c091d3e38d7f7.tar.gz bcm5719-llvm-3d594370933b515234c208a85a1c091d3e38d7f7.zip |
Improve machine schedulers for in-order processors
This patch enables schedulers to specify instructions that
cannot be issued with any other instructions.
It also fixes BeginGroup/EndGroup.
Reviewed by: Andrew Trick
Differential Revision: https://reviews.llvm.org/D30744
llvm-svn: 298885
Diffstat (limited to 'llvm/lib/CodeGen/TargetSchedule.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetSchedule.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetSchedule.cpp b/llvm/lib/CodeGen/TargetSchedule.cpp index a4dd753975c..04edf0e6285 100644 --- a/llvm/lib/CodeGen/TargetSchedule.cpp +++ b/llvm/lib/CodeGen/TargetSchedule.cpp @@ -84,6 +84,29 @@ void TargetSchedModel::init(const MCSchedModel &sm, } } +/// Returns true only if instruction is specified as single issue. +bool TargetSchedModel::mustBeginGroup(const MachineInstr *MI, + const MCSchedClassDesc *SC) const { + if (hasInstrSchedModel()) { + if (!SC) + SC = resolveSchedClass(MI); + if (SC->isValid()) + return SC->BeginGroup; + } + return false; +} + +bool TargetSchedModel::mustEndGroup(const MachineInstr *MI, + const MCSchedClassDesc *SC) const { + if (hasInstrSchedModel()) { + if (!SC) + SC = resolveSchedClass(MI); + if (SC->isValid()) + return SC->EndGroup; + } + return false; +} + unsigned TargetSchedModel::getNumMicroOps(const MachineInstr *MI, const MCSchedClassDesc *SC) const { if (hasInstrItineraries()) { |