diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-07-19 08:55:18 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-07-19 08:55:18 +0000 |
commit | 64c391dbe48062a857a75148ad399e3a8835bfb9 (patch) | |
tree | dfa36c7c79a12a4bd01ca7d3b796174765120052 /llvm/lib/CodeGen/MachineScheduler.cpp | |
parent | 03e8746f90f43cb837e1a42fa290ff61ea253782 (diff) | |
download | bcm5719-llvm-64c391dbe48062a857a75148ad399e3a8835bfb9.tar.gz bcm5719-llvm-64c391dbe48062a857a75148ad399e3a8835bfb9.zip |
Fix uninitialized memory read found by MemorySanitizer: always set output parameter of ConvergingScheduler::SchedBoundary::getOtherResourceCount
llvm-svn: 186658
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 314f621c092..2ee8775f2c4 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -1593,6 +1593,7 @@ findMaxLatency(ArrayRef<SUnit*> ReadySUs) { // resource index, or zero if the zone is issue limited. unsigned ConvergingScheduler::SchedBoundary:: getOtherResourceCount(unsigned &OtherCritIdx) { + OtherCritIdx = 0; if (!SchedModel->hasInstrSchedModel()) return 0; @@ -1600,7 +1601,6 @@ getOtherResourceCount(unsigned &OtherCritIdx) { + (RetiredMOps * SchedModel->getMicroOpFactor()); DEBUG(dbgs() << " " << Available.getName() << " + Remain MOps: " << OtherCritCount / SchedModel->getMicroOpFactor() << '\n'); - OtherCritIdx = 0; for (unsigned PIdx = 1, PEnd = SchedModel->getNumProcResourceKinds(); PIdx != PEnd; ++PIdx) { unsigned OtherCount = getResourceCount(PIdx) + Rem->RemainingCounts[PIdx]; |