diff options
Diffstat (limited to 'llvm/tools/llvm-mca/lib/HardwareUnits')
-rw-r--r-- | llvm/tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp | 6 | ||||
-rw-r--r-- | llvm/tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/llvm/tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp b/llvm/tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp index 18d0e74a774..b3dcfa7b498 100644 --- a/llvm/tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp +++ b/llvm/tools/llvm-mca/lib/HardwareUnits/ResourceManager.cpp @@ -247,7 +247,7 @@ bool ResourceManager::mustIssueImmediately(const InstrDesc &Desc) const { void ResourceManager::issueInstruction( const InstrDesc &Desc, - SmallVectorImpl<std::pair<ResourceRef, double>> &Pipes) { + SmallVectorImpl<std::pair<ResourceRef, ResourceCycles>> &Pipes) { for (const std::pair<uint64_t, ResourceUsage> &R : Desc.Resources) { const CycleSegment &CS = R.second.CS; if (!CS.size()) { @@ -263,8 +263,8 @@ void ResourceManager::issueInstruction( // Replace the resource mask with a valid processor resource index. const ResourceState &RS = *Resources[getResourceStateIndex(Pipe.first)]; Pipe.first = RS.getProcResourceID(); - Pipes.emplace_back( - std::pair<ResourceRef, double>(Pipe, static_cast<double>(CS.size()))); + Pipes.emplace_back(std::pair<ResourceRef, ResourceCycles>( + Pipe, ResourceCycles(CS.size()))); } else { assert((countPopulation(R.first) > 1) && "Expected a group!"); // Mark this group as reserved. diff --git a/llvm/tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp b/llvm/tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp index 151af2333f6..8bfa761c8a1 100644 --- a/llvm/tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp +++ b/llvm/tools/llvm-mca/lib/HardwareUnits/Scheduler.cpp @@ -66,7 +66,7 @@ Scheduler::Status Scheduler::isAvailable(const InstRef &IR) const { void Scheduler::issueInstructionImpl( InstRef &IR, - SmallVectorImpl<std::pair<ResourceRef, double>> &UsedResources) { + SmallVectorImpl<std::pair<ResourceRef, ResourceCycles>> &UsedResources) { Instruction *IS = IR.getInstruction(); const InstrDesc &D = IS->getDesc(); @@ -86,7 +86,8 @@ void Scheduler::issueInstructionImpl( // Release the buffered resources and issue the instruction. void Scheduler::issueInstruction( - InstRef &IR, SmallVectorImpl<std::pair<ResourceRef, double>> &UsedResources, + InstRef &IR, + SmallVectorImpl<std::pair<ResourceRef, ResourceCycles>> &UsedResources, SmallVectorImpl<InstRef> &ReadyInstructions) { const Instruction &Inst = *IR.getInstruction(); bool HasDependentUsers = Inst.hasDependentUsers(); |