[all-commits] [llvm/llvm-project] 8cbc3f: [SPIRV][SPIRVPrepareGlobals] Map AMD's dynamic LDS...

Juan Manuel Martinez Caamaño via All-commits all-commits at lists.llvm.org
Mon Nov 10 04:18:19 PST 2025


  Branch: refs/heads/users/jmmartinez/spirv/hip_dyn_lds
  Home:   https://github.com/llvm/llvm-project
  Commit: 8cbc3fd6403aef2cff7dbe585aa8d6762a011ef4
      https://github.com/llvm/llvm-project/commit/8cbc3fd6403aef2cff7dbe585aa8d6762a011ef4
  Author: Juan Manuel Martinez Caamaño <jmartinezcaamao at gmail.com>
  Date:   2025-11-10 (Mon, 10 Nov 2025)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVPrepareGlobals.cpp
    A llvm/test/CodeGen/SPIRV/hip_dyn_lds.ll

  Log Message:
  -----------
  [SPIRV][SPIRVPrepareGlobals] Map AMD's dynamic LDS 0-element globals to arrays with UINT32_MAX elements

In HIP, dynamic LDS globals are represented using 0-element global
arrays in the __shared__ language addressspace.

  extern __shared__ LDS[];

These are not representable in SPIRV directly.
To represent them, for AMD, we use an array with UINT32_MAX-elements.
These are reverse translated to 0-element arrays later in AMD's SPIRV runtime
pipeline.


  Commit: 0376c3e6457061bea6ec16cb9df6789b93cac69f
      https://github.com/llvm/llvm-project/commit/0376c3e6457061bea6ec16cb9df6789b93cac69f
  Author: Juan Manuel Martinez Caamaño <jmartinezcaamao at gmail.com>
  Date:   2025-11-10 (Mon, 10 Nov 2025)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVPrepareGlobals.cpp

  Log Message:
  -----------
  [Review] Rename Magic->UInt32Max


Compare: https://github.com/llvm/llvm-project/compare/3d8cf0383226...0376c3e64570

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