[all-commits] [llvm/llvm-project] a4b84a: [RFC][AMDGPU] Add BARRIER address space

Pierre van Houtryve via All-commits all-commits at lists.llvm.org
Tue Sep 8 06:16:41 PDT 2026


  Branch: refs/heads/users/pierre-vh/barrier-as-impl
  Home:   https://github.com/llvm/llvm-project
  Commit: a4b84a457f00856c43442a6eee6cc45d8b5a38e9
      https://github.com/llvm/llvm-project/commit/a4b84a457f00856c43442a6eee6cc45d8b5a38e9
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M clang/lib/Basic/Targets/AMDGPU.cpp
    M clang/test/CodeGen/target-data.c
    M clang/test/CodeGenHIP/amdgpu-barrier-type.hip
    M clang/test/CodeGenOpenCL/amdgpu-env-amdgcn.cl
    M clang/test/CodeGenOpenCL/builtins-amdgcn-gfx12.cl
    M clang/test/CodeGenOpenCL/builtins-amdgcn-gfx1250.cl
    M lld/test/ELF/lto/amdgcn-oses.ll
    M lld/test/ELF/lto/amdgcn.ll
    M llvm/docs/AMDGPUUsage.rst
    M llvm/include/llvm/IR/IntrinsicsAMDGPU.td
    M llvm/include/llvm/Support/AMDGPUAddrSpace.h
    M llvm/lib/Target/AMDGPU/AMDGPU.h
    M llvm/lib/Target/AMDGPU/AMDGPU.td
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULowerExecSync.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUMachineFunctionInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUMachineFunctionInfo.h
    M llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.cpp
    M llvm/lib/Target/AMDGPU/SIDefines.h
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.td
    M llvm/lib/TargetParser/TargetDataLayout.cpp
    M llvm/test/Analysis/UniformityAnalysis/AMDGPU/always_uniform.ll
    A llvm/test/CodeGen/AMDGPU/addrspacecast-barrier.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-lower-exec-sync-and-module-lds.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-lower-exec-sync-and-sw-lds.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-lower-exec-sync.ll
    M llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa.ll
    M llvm/test/CodeGen/AMDGPU/attributor-flatscratchinit.ll
    M llvm/test/CodeGen/AMDGPU/attributor-noalias-addrspace.ll
    A llvm/test/CodeGen/AMDGPU/barrier-addrspace-dereference.ll
    M llvm/test/CodeGen/AMDGPU/lds-link-time-codegen-named-barrier.ll
    M llvm/test/CodeGen/AMDGPU/lds-link-time-named-barrier.ll
    A llvm/test/CodeGen/AMDGPU/null-named-barrier-gv.ll
    M llvm/test/CodeGen/AMDGPU/s-barrier-id-allocation.ll
    A llvm/test/CodeGen/AMDGPU/s-barrier-lowering-bad-absolute-symbol.ll
    A llvm/test/CodeGen/AMDGPU/s-barrier-lowering-wrong-gv-signature.ll
    M llvm/test/CodeGen/AMDGPU/s-barrier-lowering.ll
    M llvm/test/CodeGen/AMDGPU/s-barrier-signal-var-gep.ll
    M llvm/test/CodeGen/AMDGPU/s-barrier.ll
    M llvm/test/CodeGen/AMDGPU/s-wakeup-barrier.ll
    M llvm/test/CodeGen/AMDGPU/simple-indirect-call.ll
    M mlir/include/mlir/Dialect/LLVMIR/ROCDLDialect.td
    M mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
    M mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
    M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
    M mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl-barriers-gfx12.mlir
    M mlir/test/Dialect/LLVMIR/rocdl.mlir
    M mlir/test/Target/LLVMIR/rocdl.mlir

  Log Message:
  -----------
  [RFC][AMDGPU] Add BARRIER address space

Add a new BARRIER address space that is used for global variables that are used to represent the barrier IDs in GFX12.5.

These barrier addresses just have values corresponding 1-1 to barrier IDs. They are still implemented on top of LDS, but the offsetting happens during an addrspacecast to generic, not whenever the barrier GV is used.

The motivation for this is to make the relation between LDS and barrier GVs explicit in the compiler. It does add a bit more complexity, but that complexity was already there, just hidden by pretending barrier GVs were actual LDS.


  Commit: 88d7b49f75c32e5938ebe14cc207d21c8972c94c
      https://github.com/llvm/llvm-project/commit/88d7b49f75c32e5938ebe14cc207d21c8972c94c
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M llvm/docs/AMDGPUUsage.rst
    M llvm/lib/IR/Type.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUMachineFunctionInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.h
    M llvm/test/CodeGen/AMDGPU/s-barrier-lowering-wrong-gv-signature.ll
    M llvm/test/CodeGen/AMDGPU/s-wakeup-barrier.ll

  Log Message:
  -----------
  Comments


  Commit: c41ea2dac456f5ce6d630833647f554033e3df3d
      https://github.com/llvm/llvm-project/commit/c41ea2dac456f5ce6d630833647f554033e3df3d
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M lld/test/ELF/lto/amdgpu.ll
    M llvm/lib/IR/AutoUpgrade.cpp
    M llvm/unittests/Bitcode/DataLayoutUpgradeTest.cpp

  Log Message:
  -----------
  Add DL auto-upgrade


  Commit: c36fdfd8f3bea2acde500a5b237f2b3f9f8b81f0
      https://github.com/llvm/llvm-project/commit/c36fdfd8f3bea2acde500a5b237f2b3f9f8b81f0
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUMachineFunctionInfo.cpp
    M llvm/test/CodeGen/AMDGPU/null-named-barrier-gv.ll
    M llvm/test/CodeGen/AMDGPU/s-barrier-lowering-bad-absolute-symbol.ll
    M llvm/unittests/Bitcode/DataLayoutUpgradeTest.cpp

  Log Message:
  -----------
  comments


  Commit: 1228c55e6e748c01c2a0cd46657182f8d6ae2439
      https://github.com/llvm/llvm-project/commit/1228c55e6e748c01c2a0cd46657182f8d6ae2439
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M llvm/lib/IR/AutoUpgrade.cpp
    M llvm/unittests/Bitcode/DataLayoutUpgradeTest.cpp

  Log Message:
  -----------
  Add reserved AS to autoupgrade


  Commit: 4fb141a8b0ff590005ca923c6ef83876f465eec8
      https://github.com/llvm/llvm-project/commit/4fb141a8b0ff590005ca923c6ef83876f465eec8
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M llvm/lib/IR/AutoUpgrade.cpp
    M llvm/unittests/Bitcode/DataLayoutUpgradeTest.cpp

  Log Message:
  -----------
  Fix Autoupgrade


  Commit: 70ac2f8764172fcc23944962dabe944a137e9ec8
      https://github.com/llvm/llvm-project/commit/70ac2f8764172fcc23944962dabe944a137e9ec8
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUMachineFunctionInfo.cpp
    M llvm/lib/TargetParser/TargetDataLayout.cpp
    M llvm/test/CodeGen/AMDGPU/addrspacecast-barrier.ll

  Log Message:
  -----------
  Rebase + comments


  Commit: 0fb6b4caf7abd4a83f93bef1d322163fa35e943b
      https://github.com/llvm/llvm-project/commit/0fb6b4caf7abd4a83f93bef1d322163fa35e943b
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M llvm/test/CodeGen/AMDGPU/addrspacecast-barrier.ll
    M llvm/test/CodeGen/AMDGPU/s-barrier-signal-var-gep.ll

  Log Message:
  -----------
  rebase


  Commit: 37e6528effb6a803db939fe949da8cb37f2d4640
      https://github.com/llvm/llvm-project/commit/37e6528effb6a803db939fe949da8cb37f2d4640
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M clang/test/CodeGen/target-data.c
    M clang/test/CodeGenOpenCL/amdgpu-env-amdgcn.cl

  Log Message:
  -----------
  Fix DL


  Commit: 912212170e0d441b43e543a07c1b081c8a727a71
      https://github.com/llvm/llvm-project/commit/912212170e0d441b43e543a07c1b081c8a727a71
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M llvm/test/CodeGen/AMDGPU/attributor-flatscratchinit-undefined-behavior.ll

  Log Message:
  -----------
  rebase


Compare: https://github.com/llvm/llvm-project/compare/2baac66bbb04...912212170e0d

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list