Skip to content

Conversation

@jrbyrnes
Copy link
Contributor

@jrbyrnes jrbyrnes commented Jul 16, 2025

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).

Change-Id: I40021f0afafc2cfc68b0ba4753c3cfd7f67f4fe8
@llvmbot
Copy link
Member

llvmbot commented Jul 16, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Jeffrey Byrnes (jrbyrnes)

Changes

We'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:

  • (modified) llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp (+1-1)
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();
 }
 

@github-actions
Copy link

github-actions bot commented Jul 16, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

Change-Id: Ia5c131be3017254f292dfa6bd5b9078feb8a0eb9
Copy link
Contributor

@lucas-rami lucas-rami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jrbyrnes jrbyrnes merged commit 283a62f into llvm:main Jul 17, 2025
9 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2025

LLVM Buildbot has detected a new failure on builder arc-builder running on arc-worker while building llvm at step 6 "test-build-unified-tree-check-all".

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
Step 6 (test-build-unified-tree-check-all) failure: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
...
11.536 [1/12/46] Linking CXX executable unittests/Transforms/Coroutines/CoroTests
12.113 [1/11/47] Linking CXX executable unittests/Target/TargetMachineCTests
12.210 [1/10/48] Linking CXX executable unittests/Passes/PassBuilderBindings/PassesBindingsTests
12.223 [1/9/49] Linking CXX executable unittests/Transforms/Instrumentation/InstrumentationTests
13.742 [1/8/50] Linking CXX executable unittests/tools/llvm-mca/LLVMMCATests
13.840 [1/7/51] Linking CXX executable unittests/Passes/Plugins/PluginsTests
14.274 [1/6/52] Linking CXX executable unittests/Target/X86/X86Tests
15.427 [1/5/53] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
15.717 [1/4/54] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
18.209 [1/3/55] Linking CXX executable tools/clang/unittests/Interpreter/ClangReplInterpreterTests
command timed out: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=1219.009304

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants