Skip to content

Commit fa1524d

Browse files
committed
Remove nested debugs
1 parent 890c105 commit fa1524d

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,8 @@ bool ClusteredLowOccStage::initGCNSchedStage() {
10861086
}
10871087

10881088
/// Allows to easily filter for this stage's debug output.
1089-
#define REMAT_DEBUG(X) LLVM_DEBUG(dbgs() << "[PreRARemat] "; X;)
1089+
#define REMAT_PREFIX "[PreRARemat] "
1090+
#define REMAT_DEBUG(X) LLVM_DEBUG(dbgs() << REMAT_PREFIX; X;)
10901091

10911092
bool PreRARematStage::initGCNSchedStage() {
10921093
// FIXME: This pass will invalidate cached BBLiveInMap and MBBLiveIns for
@@ -1729,18 +1730,21 @@ bool PreRARematStage::canIncreaseOccupancyOrReduceSpill() {
17291730
MF.getFunction().printAsOperand(dbgs(), false);
17301731
dbgs() << ": ";
17311732
if (OptRegions.empty()) {
1732-
LLVM_DEBUG(dbgs() << "no objective to achieve, occupancy is maximal at "
1733-
<< MFI.getMaxWavesPerEU() << "\n");
1733+
dbgs() << "no objective to achieve, occupancy is maximal at "
1734+
<< MFI.getMaxWavesPerEU();
17341735
} else if (!TargetOcc) {
1735-
LLVM_DEBUG(dbgs() << "reduce spilling (minimum target occupancy is "
1736-
<< MFI.getMinWavesPerEU() << ")\n");
1736+
dbgs() << "reduce spilling (minimum target occupancy is "
1737+
<< MFI.getMinWavesPerEU() << ')';
17371738
} else {
1738-
LLVM_DEBUG(dbgs() << "increase occupancy from " << DAG.MinOccupancy
1739-
<< " to " << TargetOcc << '\n');
1739+
dbgs() << "increase occupancy from " << DAG.MinOccupancy << " to "
1740+
<< TargetOcc;
17401741
}
1742+
dbgs() << '\n';
17411743
for (unsigned I = 0, E = DAG.Regions.size(); I != E; ++I) {
1742-
if (auto OptIt = OptRegions.find(I); OptIt != OptRegions.end())
1743-
REMAT_DEBUG(dbgs() << " [" << I << "] " << OptIt->getSecond() << '\n');
1744+
if (auto OptIt = OptRegions.find(I); OptIt != OptRegions.end()) {
1745+
dbgs() << REMAT_PREFIX << " [" << I << "] " << OptIt->getSecond()
1746+
<< '\n';
1747+
}
17441748
}
17451749
});
17461750
if (OptRegions.empty())

0 commit comments

Comments
 (0)