diff options
author | Mark de Wever <koraq@xs4all.nl> | 2020-01-01 17:23:21 +0100 |
---|---|---|
committer | Mark de Wever <koraq@xs4all.nl> | 2020-01-01 20:01:37 +0100 |
commit | 8dc7b982b4556c243e0502e6e230bdd53ddd65ff (patch) | |
tree | 518a39bbece25299e56350272605c7a9bd8f60c6 /llvm/lib/MCA | |
parent | 9b24dad6c06bba771b805ffd9bd047af25317e52 (diff) | |
download | bcm5719-llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.tar.gz bcm5719-llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.zip |
[NFC] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
Differential Revision: https://reviews.llvm.org/D71857
Diffstat (limited to 'llvm/lib/MCA')
-rw-r--r-- | llvm/lib/MCA/HardwareUnits/ResourceManager.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/MCA/Stages/InstructionTables.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/MCA/HardwareUnits/ResourceManager.cpp b/llvm/lib/MCA/HardwareUnits/ResourceManager.cpp index 088aea3e23c..30c4f14d13a 100644 --- a/llvm/lib/MCA/HardwareUnits/ResourceManager.cpp +++ b/llvm/lib/MCA/HardwareUnits/ResourceManager.cpp @@ -281,7 +281,7 @@ void ResourceManager::releaseBuffers(uint64_t ConsumedBuffers) { uint64_t ResourceManager::checkAvailability(const InstrDesc &Desc) const { uint64_t BusyResourceMask = 0; - for (const std::pair<uint64_t, const ResourceUsage> &E : Desc.Resources) { + for (const std::pair<uint64_t, ResourceUsage> &E : Desc.Resources) { unsigned NumUnits = E.second.isReserved() ? 0U : E.second.NumUnits; unsigned Index = getResourceStateIndex(E.first); if (!Resources[Index]->isReady(NumUnits)) diff --git a/llvm/lib/MCA/Stages/InstructionTables.cpp b/llvm/lib/MCA/Stages/InstructionTables.cpp index adeefb45ec2..a0cdfb89c55 100644 --- a/llvm/lib/MCA/Stages/InstructionTables.cpp +++ b/llvm/lib/MCA/Stages/InstructionTables.cpp @@ -24,7 +24,8 @@ Error InstructionTables::execute(InstRef &IR) { UsedResources.clear(); // Identify the resources consumed by this instruction. - for (const std::pair<uint64_t, ResourceUsage> Resource : Desc.Resources) { + for (const std::pair<const uint64_t, ResourceUsage> Resource : + Desc.Resources) { // Skip zero-cycle resources (i.e., unused resources). if (!Resource.second.size()) continue; |