================ @@ -1336,6 +1311,59 @@ static void addPreloadKernArgHint(Function &F, TargetMachine &TM) { } } +static void checkWavesPerEU(Module &M, TargetMachine &TM) { + for (Function &F : M) { + const GCNSubtarget &ST = TM.getSubtarget<GCNSubtarget>(F); + + auto FlatWgrpSizeAttr = + AMDGPU::getIntegerPairAttribute(F, "amdgpu-flat-work-group-size"); + auto WavesPerEUAttr = AMDGPU::getIntegerPairAttribute( + F, "amdgpu-waves-per-eu", /*OnlyFirstRequired=*/true); + + unsigned MinWavesPerEU = ST.getMinWavesPerEU(); + unsigned MaxWavesPerEU = ST.getMaxWavesPerEU(); + + unsigned MinFlatWgrpSize = 1U; + unsigned MaxFlatWgrpSize = 1024U; ---------------- arsenm wrote:
I thought we had a not-hardcoded way to get this already https://github.com/llvm/llvm-project/pull/123995 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits