[all-commits] [llvm/llvm-project] b9c6d9: AMDGPU: Propagate amdgpu-waves-per-eu with attributor

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri Jun 16 12:04:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b9c6d9e6c3b9fab632d2ee33ecce899fadcee456
      https://github.com/llvm/llvm-project/commit/b9c6d9e6c3b9fab632d2ee33ecce899fadcee456
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-06-16 (Fri, 16 Jun 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
    M llvm/test/CodeGen/AMDGPU/addrspacecast-constantexpr.ll
    M llvm/test/CodeGen/AMDGPU/annotate-existing-abi-attributes.ll
    M llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa-call.ll
    M llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa.ll
    M llvm/test/CodeGen/AMDGPU/attributor-loop-issue-58639.ll
    M llvm/test/CodeGen/AMDGPU/direct-indirect-call.ll
    M llvm/test/CodeGen/AMDGPU/duplicate-attribute-indirect.ll
    M llvm/test/CodeGen/AMDGPU/implicitarg-offset-attributes.ll
    M llvm/test/CodeGen/AMDGPU/propagate-flat-work-group-size.ll
    M llvm/test/CodeGen/AMDGPU/propagate-waves-per-eu.ll
    M llvm/test/CodeGen/AMDGPU/simple-indirect-call.ll
    M llvm/test/CodeGen/AMDGPU/uniform-work-group-attribute-missing.ll
    M llvm/test/CodeGen/AMDGPU/uniform-work-group-multistep.ll
    M llvm/test/CodeGen/AMDGPU/uniform-work-group-nested-function-calls.ll
    M llvm/test/CodeGen/AMDGPU/uniform-work-group-prevent-attribute-propagation.ll
    M llvm/test/CodeGen/AMDGPU/uniform-work-group-propagate-attribute.ll
    M llvm/test/CodeGen/AMDGPU/uniform-work-group-recursion-test.ll
    M llvm/test/CodeGen/AMDGPU/uniform-work-group-test.ll

  Log Message:
  -----------
  AMDGPU: Propagate amdgpu-waves-per-eu with attributor

This will do a value range merging down the callgraph, unlike the
current pass which can only propagate values to undecorated functions
from a kernel.

This one is a bit weird due to the interaction with the implied range
from amdgpu-flat-workgroup-size. At the default group range of 1,1024,
the minimum implied bounds is 4 so this ends up introducing the
attribute on undecorated functions. We could probably simplify this by
ignoring it and propagating the raw values. The subtarget interaction
and the interaction with amdgpu-flat-workgroup-size only really clamp
invalid values (plus the lower bound doesn't seem to do anything as
far as I can tell anyway).


  Commit: 7ed1aec3b3400fd0abcadd3a4ba19a7f590cdf85
      https://github.com/llvm/llvm-project/commit/7ed1aec3b3400fd0abcadd3a4ba19a7f590cdf85
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-06-16 (Fri, 16 Jun 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp

  Log Message:
  -----------
  AMDGPU: Remove unnecessary Attributor overrides


Compare: https://github.com/llvm/llvm-project/compare/3632e2f5179a...7ed1aec3b340


More information about the All-commits mailing list