[llvm] [AMDGPU] NFC: Add helper to query archVGPR (PR #102690)
Jeffrey Byrnes via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 9 15:32:48 PDT 2024
https://github.com/jrbyrnes created https://github.com/llvm/llvm-project/pull/102690
For any users that is interested in just the ArchVGPR count (without comparing to AGPR count)
>From 51d8ce47e287bbe991dfa3cadbb25dfe43cfb2b1 Mon Sep 17 00:00:00 2001
From: Jeffrey Byrnes <Jeffrey.Byrnes at amd.com>
Date: Fri, 9 Aug 2024 15:24:46 -0700
Subject: [PATCH] [AMDGPU] NFC: Add helper to query archVGPR
Change-Id: Ie7d10498c0b1bb2d00a54fa17fd978752a9f1d52
---
llvm/lib/Target/AMDGPU/GCNRegPressure.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/llvm/lib/Target/AMDGPU/GCNRegPressure.h b/llvm/lib/Target/AMDGPU/GCNRegPressure.h
index 98f9b3bc6aada..08102a3524a7a 100644
--- a/llvm/lib/Target/AMDGPU/GCNRegPressure.h
+++ b/llvm/lib/Target/AMDGPU/GCNRegPressure.h
@@ -54,6 +54,8 @@ struct GCNRegPressure {
}
return std::max(Value[VGPR32], Value[AGPR32]);
}
+ unsigned getArchVGPRNum() const { return Value[VGPR32];}
+
unsigned getAGPRNum() const { return Value[AGPR32]; }
unsigned getVGPRTuplesWeight() const { return std::max(Value[VGPR_TUPLE],
More information about the llvm-commits
mailing list