[llvm] [WIP][AMDGPU][Attributor] Make `AAAMDFlatWorkGroupSize` honor existing attribute (PR #114357)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 31 07:33:43 PDT 2024
================
@@ -168,7 +168,15 @@ class AMDGPUInformationCache : public InformationCache {
return ST.supportsGetDoorbellID();
}
- std::pair<unsigned, unsigned> getFlatWorkGroupSizes(const Function &F) {
+ std::optional<std::pair<unsigned, unsigned>>
+ getFlatWorkGroupSizeAttr(const Function &F) const {
+ Attribute A = F.getFnAttribute("amdgpu-flat-work-group-size");
+ if (!A.isStringAttribute())
+ return std::nullopt;
----------------
arsenm wrote:
The presence or absence of an attribute should not impart meaning. A function explicitly marked with the default value should be the same as one with no attribute.
This will also miss applying the calling convention based default range
https://github.com/llvm/llvm-project/pull/114357
More information about the llvm-commits
mailing list