Skip to content

Commit 0cb4897

Browse files
lucas-ramiarsenm
andauthored
Apply suggestions from code review
Co-authored-by: Matt Arsenault <[email protected]>
1 parent 59c75be commit 0cb4897

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,7 +1731,7 @@ struct ExcessRP {
17311731
/// Returns whether there is any excess register pressure.
17321732
operator bool() const { return ArchVGPRs != 0 || AGPRs != 0 || VGPRs != 0; }
17331733

1734-
#ifndef NDEBUG
1734+
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
17351735
friend raw_ostream &operator<<(raw_ostream &OS, const ExcessRP &Excess) {
17361736
OS << Excess.ArchVGPRs << " ArchVGPRs, " << Excess.AGPRs << " AGPRs, and "
17371737
<< Excess.VGPRs << " VGPRs (next ArchVGPR aligment in "
@@ -1910,14 +1910,15 @@ bool PreRARematStage::canIncreaseOccupancyOrReduceSpill() {
19101910
if (OptRegions.empty())
19111911
return false;
19121912

1913-
#ifndef DEBUG
1913+
#ifndef NDEBUG
19141914
if (IncreaseOccupancy)
19151915
REMAT_DEBUG(dbgs() << "Occupancy minimal in regions:\n");
19161916
else
19171917
REMAT_DEBUG(dbgs() << "Spilling in regions:\n");
1918-
for (unsigned I = 0, E = DAG.Regions.size(); I != E; ++I)
1918+
for (unsigned I = 0, E = DAG.Regions.size(); I != E; ++I) {
19191919
if (auto OptIt = OptRegions.find(I); OptIt != OptRegions.end())
19201920
REMAT_DEBUG(dbgs() << " " << I << ": " << OptIt->getSecond() << '\n');
1921+
}
19211922
#endif
19221923

19231924
// When we are reducing spilling, the target is the minimum target number of

0 commit comments

Comments
 (0)