mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Fix uninitialized memory read found by MemorySanitizer: always set output parameter of ConvergingScheduler::SchedBoundary::getOtherResourceCount
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186658 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1593,6 +1593,7 @@ findMaxLatency(ArrayRef<SUnit*> ReadySUs) {
|
|||||||
// resource index, or zero if the zone is issue limited.
|
// resource index, or zero if the zone is issue limited.
|
||||||
unsigned ConvergingScheduler::SchedBoundary::
|
unsigned ConvergingScheduler::SchedBoundary::
|
||||||
getOtherResourceCount(unsigned &OtherCritIdx) {
|
getOtherResourceCount(unsigned &OtherCritIdx) {
|
||||||
|
OtherCritIdx = 0;
|
||||||
if (!SchedModel->hasInstrSchedModel())
|
if (!SchedModel->hasInstrSchedModel())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -1600,7 +1601,6 @@ getOtherResourceCount(unsigned &OtherCritIdx) {
|
|||||||
+ (RetiredMOps * SchedModel->getMicroOpFactor());
|
+ (RetiredMOps * SchedModel->getMicroOpFactor());
|
||||||
DEBUG(dbgs() << " " << Available.getName() << " + Remain MOps: "
|
DEBUG(dbgs() << " " << Available.getName() << " + Remain MOps: "
|
||||||
<< OtherCritCount / SchedModel->getMicroOpFactor() << '\n');
|
<< OtherCritCount / SchedModel->getMicroOpFactor() << '\n');
|
||||||
OtherCritIdx = 0;
|
|
||||||
for (unsigned PIdx = 1, PEnd = SchedModel->getNumProcResourceKinds();
|
for (unsigned PIdx = 1, PEnd = SchedModel->getNumProcResourceKinds();
|
||||||
PIdx != PEnd; ++PIdx) {
|
PIdx != PEnd; ++PIdx) {
|
||||||
unsigned OtherCount = getResourceCount(PIdx) + Rem->RemainingCounts[PIdx];
|
unsigned OtherCount = getResourceCount(PIdx) + Rem->RemainingCounts[PIdx];
|
||||||
|
Reference in New Issue
Block a user