Skip to content

Commit 5168349

Browse files
committed
Fix spurious auto-formats and typo
The typo in GCNSubtarget::getMaxNumArchVGPRs made the function return the wrong value in all cases. The returned value is now correct; this causes some unit tests to break in largely cosmetic ways, since that value is used to calculate excess RP in the remat stage.
1 parent e75789a commit 5168349

17 files changed

+636
-349
lines changed

llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ void GCNSchedStrategy::pickNodeFromQueue(SchedBoundary &Zone,
329329
const RegPressureTracker &RPTracker,
330330
SchedCandidate &Cand,
331331
bool IsBottomUp) {
332-
const SIRegisterInfo *SRI = static_cast<const SIRegisterInfo *>(TRI);
332+
const SIRegisterInfo *SRI = static_cast<const SIRegisterInfo*>(TRI);
333333
ArrayRef<unsigned> Pressure = RPTracker.getRegSetPressureAtPos();
334334
unsigned SGPRPressure = 0;
335335
unsigned VGPRPressure = 0;
@@ -1403,7 +1403,8 @@ GCNSchedStage::getScheduleMetrics(const std::vector<SUnit> &InputSchedule) {
14031403
#ifndef NDEBUG
14041404
LLVM_DEBUG(
14051405
printScheduleModel(ReadyCyclesSorted);
1406-
dbgs() << "\n\t" << "Metric: "
1406+
dbgs() << "\n\t"
1407+
<< "Metric: "
14071408
<< (SumBubbles
14081409
? (SumBubbles * ScheduleMetrics::ScaleFactor) / CurrCycle
14091410
: 1)
@@ -1438,7 +1439,8 @@ GCNSchedStage::getScheduleMetrics(const GCNScheduleDAGMILive &DAG) {
14381439
#ifndef NDEBUG
14391440
LLVM_DEBUG(
14401441
printScheduleModel(ReadyCyclesSorted);
1441-
dbgs() << "\n\t" << "Metric: "
1442+
dbgs() << "\n\t"
1443+
<< "Metric: "
14421444
<< (SumBubbles
14431445
? (SumBubbles * ScheduleMetrics::ScaleFactor) / CurrCycle
14441446
: 1)
@@ -1486,7 +1488,8 @@ bool UnclusteredHighRPStage::shouldRevertScheduling(unsigned WavesAfter) {
14861488
dbgs()
14871489
<< "\n\t *** In shouldRevertScheduling ***\n"
14881490
<< " *********** BEFORE UnclusteredHighRPStage ***********\n");
1489-
ScheduleMetrics MBefore = getScheduleMetrics(DAG.SUnits);
1491+
ScheduleMetrics MBefore =
1492+
getScheduleMetrics(DAG.SUnits);
14901493
LLVM_DEBUG(
14911494
dbgs()
14921495
<< "\n *********** AFTER UnclusteredHighRPStage ***********\n");

0 commit comments

Comments
 (0)