Skip to content

Commit 283a62f

Browse files
authored
[AMDGPU] NFC: Decouple getRealRegPressure from current region (#149219)
We're already accepting a RegionIdx for the LiveIns, also use this for the instruction iterators. Enables querying RP for other regions -- useful for function wide transformations (e.g. rematerialization, rewriting, etc).
1 parent 1f1fd07 commit 283a62f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,8 @@ void GCNScheduleDAGMILive::schedule() {
803803
GCNRegPressure
804804
GCNScheduleDAGMILive::getRealRegPressure(unsigned RegionIdx) const {
805805
GCNDownwardRPTracker RPTracker(*LIS);
806-
RPTracker.advance(begin(), end(), &LiveIns[RegionIdx]);
806+
RPTracker.advance(Regions[RegionIdx].first, Regions[RegionIdx].second,
807+
&LiveIns[RegionIdx]);
807808
return RPTracker.moveMaxPressure();
808809
}
809810

0 commit comments

Comments
 (0)