diff options
| author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2019-01-04 15:08:38 +0000 |
|---|---|---|
| committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2019-01-04 15:08:38 +0000 |
| commit | 3f4b54850f270820421400af99f9f88b346679fd (patch) | |
| tree | 5318884f4a12776fa2715acba6b6f76eb286d180 /llvm/lib/MCA/HardwareUnits/ResourceManager.cpp | |
| parent | 7ee228562569a307a7ff8608a9c010ea2a9d41a8 (diff) | |
| download | bcm5719-llvm-3f4b54850f270820421400af99f9f88b346679fd.tar.gz bcm5719-llvm-3f4b54850f270820421400af99f9f88b346679fd.zip | |
[MCA] Improved handling of in-order issue/dispatch resources.
Added field 'MustIssueImmediately' to the instruction descriptor of instructions
that only consume in-order issue/dispatch processor resources.
This speeds up queries from the hardware Scheduler, and gives an average ~5%
speedup on a release build.
No functional change intended.
llvm-svn: 350397
Diffstat (limited to 'llvm/lib/MCA/HardwareUnits/ResourceManager.cpp')
| -rw-r--r-- | llvm/lib/MCA/HardwareUnits/ResourceManager.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/llvm/lib/MCA/HardwareUnits/ResourceManager.cpp b/llvm/lib/MCA/HardwareUnits/ResourceManager.cpp index c7f45fd9542..b68e996ff9e 100644 --- a/llvm/lib/MCA/HardwareUnits/ResourceManager.cpp +++ b/llvm/lib/MCA/HardwareUnits/ResourceManager.cpp @@ -267,24 +267,6 @@ bool ResourceManager::canBeIssued(const InstrDesc &Desc) const { }); } -// Returns true if all resources are in-order, and there is at least one -// resource which is a dispatch hazard (BufferSize = 0). -bool ResourceManager::mustIssueImmediately(const InstrDesc &Desc) const { - if (!canBeIssued(Desc)) - return false; - bool AllInOrderResources = all_of(Desc.Buffers, [&](uint64_t BufferMask) { - unsigned Index = getResourceStateIndex(BufferMask); - const ResourceState &Resource = *Resources[Index]; - return Resource.isInOrder() || Resource.isADispatchHazard(); - }); - if (!AllInOrderResources) - return false; - - return any_of(Desc.Buffers, [&](uint64_t BufferMask) { - return Resources[getResourceStateIndex(BufferMask)]->isADispatchHazard(); - }); -} - void ResourceManager::issueInstruction( const InstrDesc &Desc, SmallVectorImpl<std::pair<ResourceRef, ResourceCycles>> &Pipes) { |

