summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/Views
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2019-01-10 13:59:13 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2019-01-10 13:59:13 +0000
commit97ed076dd1bc1e3fd674d50b925b2a4a6eba5c79 (patch)
treee6a0241555dc410e6e6ceb01fcde5f0ea0a0b2db /llvm/tools/llvm-mca/Views
parent73af3d4060463e3222c56fb1cedb166c05771402 (diff)
downloadbcm5719-llvm-97ed076dd1bc1e3fd674d50b925b2a4a6eba5c79.tar.gz
bcm5719-llvm-97ed076dd1bc1e3fd674d50b925b2a4a6eba5c79.zip
[MCA] Fix wrong definition of ResourceUnitMask in DefaultResourceStrategy.
Field ResourceUnitMask was incorrectly defined as a 'const unsigned' mask. It should have been a 64 bit quantity instead. That means, ResourceUnitMask was always implicitly truncated to a 32 bit quantity. This issue has been found by inspection. Surprisingly, that bug was latent, and it never negatively affected any existing upstream targets. This patch fixes the wrong definition of ResourceUnitMask, and adds a bunch of extra debug prints to help debugging potential issues related to invalid processor resource masks. llvm-svn: 350820
Diffstat (limited to 'llvm/tools/llvm-mca/Views')
-rw-r--r--llvm/tools/llvm-mca/Views/SummaryView.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mca/Views/SummaryView.cpp b/llvm/tools/llvm-mca/Views/SummaryView.cpp
index 3a7eb827c47..d8ac709e784 100644
--- a/llvm/tools/llvm-mca/Views/SummaryView.cpp
+++ b/llvm/tools/llvm-mca/Views/SummaryView.cpp
@@ -27,7 +27,8 @@ SummaryView::SummaryView(const MCSchedModel &Model, ArrayRef<MCInst> S,
unsigned Width)
: SM(Model), Source(S), DispatchWidth(Width), LastInstructionIdx(0),
TotalCycles(0), NumMicroOps(0),
- ProcResourceUsage(Model.getNumProcResourceKinds(), 0) {
+ ProcResourceUsage(Model.getNumProcResourceKinds(), 0),
+ ProcResourceMasks(Model.getNumProcResourceKinds()) {
computeProcResourceMasks(SM, ProcResourceMasks);
}
OpenPOWER on IntegriCloud