[llvm-branch-commits] [lld] [llvm] [RFC][AMDGPU][lld] Add object linking support (PR #206787)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jul 2 00:15:00 PDT 2026
================
@@ -100,6 +100,52 @@ LLVM_ABI void fillValidArchListR600(SmallVectorImpl<StringRef> &Values);
LLVM_ABI IsaVersion getIsaVersion(StringRef GPU);
+/// AMDGPU target properties needed to resolve object-linking resource usage
+/// without constructing MCSubtargetInfo.
+class ObjectLinkingTargetInfo {
+ GPUKind Kind = GK_NONE;
+ bool XnackOnOrAny = false;
+
+ ObjectLinkingTargetInfo(GPUKind Kind, bool XnackOnOrAny)
+ : Kind(Kind), XnackOnOrAny(XnackOnOrAny) {}
+
+public:
+ IsaVersion getVersion() const {
+ return getIsaVersion(getArchNameAMDGCN(Kind));
+ }
+
+ GPUKind getKind() const { return Kind; }
+
+ bool isGFX10Plus() const { return getVersion().Major >= 10; }
+
+ bool hasAccVGPRs() const {
----------------
arsenm wrote:
I have a pending PR on top of the sub arch patch which adds these features to the AMDGPUTargetParser.def feature table, we shouldn't need to spread more of these isa version checks around
https://github.com/llvm/llvm-project/pull/206787
More information about the llvm-branch-commits
mailing list