================
@@ -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
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits