Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AMDGPU] Tweak tuple weight calculation. NFC. #66490

Merged
merged 1 commit into from
Sep 15, 2023
Merged

[AMDGPU] Tweak tuple weight calculation. NFC. #66490

merged 1 commit into from
Sep 15, 2023

Conversation

jayfoad
Copy link
Contributor

@jayfoad jayfoad commented Sep 15, 2023

This just makes it more obvious that GCNRegPressure does not actually
use pressure sets.

This just makes it more obvious that GCNRegPressure does not actually
use pressure sets.
@llvmbot
Copy link
Collaborator

llvmbot commented Sep 15, 2023

@llvm/pr-subscribers-backend-amdgpu

Changes This just makes it more obvious that GCNRegPressure does not actually use pressure sets.

--
Full diff: https://github.com/llvm/llvm-project/pull/66490.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/GCNRegPressure.cpp (+3-1)
diff --git a/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp b/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
index 68cf971703692e9..1ca0f3b6e06b823 100644
--- a/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
@@ -78,7 +78,9 @@ void GCNRegPressure::inc(unsigned Reg,
 
     if (PrevMask.none()) {
       assert(NewMask.any());
-      Value[Kind] += Sign * MRI.getPressureSets(Reg).getWeight();
+      const TargetRegisterInfo *TRI = MRI.getTargetRegisterInfo();
+      Value[Kind] +=
+          Sign * TRI->getRegClassWeight(MRI.getRegClass(Reg)).RegWeight;
     }
     break;
 

@jayfoad jayfoad merged commit fcbdcb1 into llvm:main Sep 15, 2023
3 checks passed
@jayfoad jayfoad deleted the tuple-weight branch September 15, 2023 15:30
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this pull request Sep 19, 2023
This just makes it more obvious that GCNRegPressure does not actually
use pressure sets.
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.

None yet

3 participants