[AMDGPU] NFC: Decouple getRealRegPressure from current region#149219
Merged
[AMDGPU] NFC: Decouple getRealRegPressure from current region#149219
Conversation
Change-Id: I40021f0afafc2cfc68b0ba4753c3cfd7f67f4fe8
Member
|
@llvm/pr-subscribers-backend-amdgpu Author: Jeffrey Byrnes (jrbyrnes) ChangesWe're already accepting a RegionIdx for the LiveIns, also use this for the instruciton iterators. Enables querying RP for other blocks which is useful for function wide transformations (e.g. rematerialization, rewriting, etc). Full diff: https://github.com/llvm/llvm-project/pull/149219.diff 1 Files Affected:
diff --git a/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp b/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
index fce8f36d45969..d995d3950ffda 100644
--- a/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
@@ -803,7 +803,7 @@ void GCNScheduleDAGMILive::schedule() {
GCNRegPressure
GCNScheduleDAGMILive::getRealRegPressure(unsigned RegionIdx) const {
GCNDownwardRPTracker RPTracker(*LIS);
- RPTracker.advance(begin(), end(), &LiveIns[RegionIdx]);
+ RPTracker.advance(Regions[RegionIdx].first, Regions[RegionIdx].second, &LiveIns[RegionIdx]);
return RPTracker.moveMaxPressure();
}
|
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
Change-Id: Ia5c131be3017254f292dfa6bd5b9078feb8a0eb9
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/19158 Here is the relevant piece of the build log for the reference |
This was referenced Jul 23, 2025
jrbyrnes
added a commit
to jrbyrnes/llvm-project
that referenced
this pull request
Aug 13, 2025
…49219) 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).