[llvm] [AMDGPU] Expose addressable LDS size features to the frontend (PR #220394)
Chinmay Deshpande via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 2 22:59:28 PDT 2026
================
@@ -498,6 +498,12 @@ validateGenericFeatures(const Record *GPU,
SetVector<const Record *> MemberFeatures =
collectVisibleFeatures(Member, FeatureIdx);
for (const Record *F : GenericFeatures) {
+ // A generic carries the worst case of a numeric feature, e.g.
+ // gfx9-4-generic keeps addressablelocalmemorysize65536 while covering
+ // gfx950's 163840, so an exact match is not expected.
+ if (F->getValueAsString("Value") != "true")
----------------
chinmaydd wrote:
> What's rubbing me the wrong way is that we're adding a boolean to a map for all the currently-used values of a feature, which is giving "someone will forget to update this"
Generally, I agree with you. With all of the changes that we are doing to define the new TargetParser APIs we have to ensure that new (and existing) targets derive the right set of subtarget features. In that sense, we are bound to forget updating some features that define the h/w properties.
> I'd check for integer values explicitly or something?
This is what I had initially. Added it back. For the first iteration, the concern was that we had to special case the "falling-back-to-maximum" as the default. I think for the case of AMDGPU, the generic target will most likely have the "minimum" as the intended feature but to be safe I have added a check for this particular field. See [here](https://github.com/llvm/llvm-project/pull/220394/changes#diff-12462ff58982beb002601e7b247b52de228771a36e4a5835b2f51c37187eb968R537).
https://github.com/llvm/llvm-project/pull/220394
More information about the llvm-commits
mailing list