aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2023-09-15 16:30:06 +0100
committerGitHub <noreply@github.com>2023-09-15 16:30:06 +0100
commitfcbdcb13ce1596d777184d95bdb2d4771f8a5510 (patch)
tree9147b426d23814ca43dbdbf8b89f67a6eac71657
parentc92124765eba8d3ea97e3f319a6009a0f86e22a1 (diff)
downloadllvm-fcbdcb13ce1596d777184d95bdb2d4771f8a5510.zip
llvm-fcbdcb13ce1596d777184d95bdb2d4771f8a5510.tar.gz
llvm-fcbdcb13ce1596d777184d95bdb2d4771f8a5510.tar.bz2
[AMDGPU] Tweak tuple weight calculation. NFC. (#66490)
This just makes it more obvious that GCNRegPressure does not actually use pressure sets.
-rw-r--r--llvm/lib/Target/AMDGPU/GCNRegPressure.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp b/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
index 68cf971..1ca0f3b 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;