diff options
Diffstat (limited to 'llvm/tools/llvm-mca')
4 files changed, 5 insertions, 4 deletions
diff --git a/llvm/tools/llvm-mca/Views/DispatchStatistics.cpp b/llvm/tools/llvm-mca/Views/DispatchStatistics.cpp index 557b8ba17b1..a1c0cf208d3 100644 --- a/llvm/tools/llvm-mca/Views/DispatchStatistics.cpp +++ b/llvm/tools/llvm-mca/Views/DispatchStatistics.cpp @@ -37,7 +37,8 @@ void DispatchStatistics::printDispatchHistogram(raw_ostream &OS) const { TempStream << "\n\nDispatch Logic - " << "number of cycles where we saw N micro opcodes dispatched:\n"; TempStream << "[# dispatched], [# cycles]\n"; - for (const std::pair<unsigned, unsigned> &Entry : DispatchGroupSizePerCycle) { + for (const std::pair<const unsigned, unsigned> &Entry : + DispatchGroupSizePerCycle) { double Percentage = ((double)Entry.second / NumCycles) * 100.0; TempStream << " " << Entry.first << ", " << Entry.second << " (" << format("%.1f", floor((Percentage * 10) + 0.5) / 10) diff --git a/llvm/tools/llvm-mca/Views/RetireControlUnitStatistics.cpp b/llvm/tools/llvm-mca/Views/RetireControlUnitStatistics.cpp index cb4fbae7803..61c115b27be 100644 --- a/llvm/tools/llvm-mca/Views/RetireControlUnitStatistics.cpp +++ b/llvm/tools/llvm-mca/Views/RetireControlUnitStatistics.cpp @@ -59,7 +59,7 @@ void RetireControlUnitStatistics::printView(raw_ostream &OS) const { << "number of cycles where we saw N instructions retired:\n"; TempStream << "[# retired], [# cycles]\n"; - for (const std::pair<unsigned, unsigned> &Entry : RetiredPerCycle) { + for (const std::pair<const unsigned, unsigned> &Entry : RetiredPerCycle) { TempStream << " " << Entry.first; if (Entry.first < 10) TempStream << ", "; diff --git a/llvm/tools/llvm-mca/Views/SchedulerStatistics.cpp b/llvm/tools/llvm-mca/Views/SchedulerStatistics.cpp index bd0ba350ab6..7a341d4c207 100644 --- a/llvm/tools/llvm-mca/Views/SchedulerStatistics.cpp +++ b/llvm/tools/llvm-mca/Views/SchedulerStatistics.cpp @@ -107,7 +107,7 @@ void SchedulerStatistics::printSchedulerStats(raw_ostream &OS) const { bool HasColors = OS.has_colors(); const auto It = std::max_element(IssueWidthPerCycle.begin(), IssueWidthPerCycle.end()); - for (const std::pair<unsigned, unsigned> &Entry : IssueWidthPerCycle) { + for (const std::pair<const unsigned, unsigned> &Entry : IssueWidthPerCycle) { unsigned NumIssued = Entry.first; if (NumIssued == It->first && HasColors) OS.changeColor(raw_ostream::SAVEDCOLOR, true, false); diff --git a/llvm/tools/llvm-mca/Views/SummaryView.cpp b/llvm/tools/llvm-mca/Views/SummaryView.cpp index ef5550048f4..f0e75f7b13a 100644 --- a/llvm/tools/llvm-mca/Views/SummaryView.cpp +++ b/llvm/tools/llvm-mca/Views/SummaryView.cpp @@ -54,7 +54,7 @@ void SummaryView::onEvent(const HWInstructionEvent &Event) { const Instruction &Inst = *Event.IR.getInstruction(); const InstrDesc &Desc = Inst.getDesc(); NumMicroOps += Desc.NumMicroOps; - for (const std::pair<uint64_t, const ResourceUsage> &RU : Desc.Resources) { + for (const std::pair<uint64_t, ResourceUsage> &RU : Desc.Resources) { if (RU.second.size()) { unsigned ProcResID = ResIdx2ProcResID[getResourceStateIndex(RU.first)]; ProcResourceUsage[ProcResID] += RU.second.size(); |