[llvm-branch-commits] [llvm] [SPIRV][SPIRVPrepareGlobals] Map AMD's dynamic LDS 0-element globals to arrays with UINT32_MAX elements (PR #166952)

2025-11-10 Thread Steven Perron via llvm-branch-commits
Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?=, Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?=, Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= Message-ID: In-Reply-To: https://github.com/s-perron approved this pull request. https://github.com/llvm/llvm-project/pull/166952

[llvm-branch-commits] [llvm] [SPIRV][SPIRVPrepareGlobals] Map AMD's dynamic LDS 0-element globals to arrays with UINT32_MAX elements (PR #166952)

2025-11-10 Thread Steven Perron via llvm-branch-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?=, Juan Manuel Martinez =?utf-8?q?Caamaño?=, Juan Manuel Martinez =?utf-8?q?Caamaño?Message-ID: In-Reply-To: s-perron wrote: > > I'm wondering if you need to change all 0-sized array or not. If so, we > > might want to centralize the conversion of 0-sized

[llvm-branch-commits] [llvm] [SPIRV][SPIRVPrepareGlobals] Map AMD's dynamic LDS 0-element globals to arrays with UINT32_MAX elements (PR #166952)

2025-11-10 Thread Steven Perron via llvm-branch-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?=, Juan Manuel Martinez =?utf-8?q?Caamaño?=, Juan Manuel Martinez =?utf-8?q?Caamaño?Message-ID: In-Reply-To: @@ -43,6 +44,29 @@ bool tryExtendLLVMBitcodeMarker(GlobalVariable &Bitcode) { return true; } +bool tryExtendDynamicLDSGlobal(

[llvm-branch-commits] [llvm] [SPIRV][SPIRVPrepareGlobals] Map AMD's dynamic LDS 0-element globals to arrays with UINT32_MAX elements (PR #166952)

2025-11-10 Thread Steven Perron via llvm-branch-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?Message-ID: In-Reply-To: @@ -52,6 +76,9 @@ bool SPIRVPrepareGlobals::runOnModule(Module &M) { if (GlobalVariable *Bitcode = M.getNamedGlobal("llvm.embedded.module")) Changed |= tryExtendLLVMBitcodeMarker(*Bitcode); + for (GlobalV

[llvm-branch-commits] [llvm] [SPIRV][SPIRVPrepareGlobals] Map AMD's dynamic LDS 0-element globals to arrays with UINT32_MAX elements (PR #166952)

2025-11-10 Thread Steven Perron via llvm-branch-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?Message-ID: In-Reply-To: @@ -43,6 +44,29 @@ bool tryExtendLLVMBitcodeMarker(GlobalVariable &Bitcode) { return true; } +bool tryExtendDynamicLDSGlobal(GlobalVariable &GV) { + constexpr unsigned WorkgroupAS = 3; s-perr

[llvm-branch-commits] [llvm] [SPIRV][SPIRVPrepareGlobals] Map AMD's dynamic LDS 0-element globals to arrays with UINT32_MAX elements (PR #166952)

2025-11-10 Thread Steven Perron via llvm-branch-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?Message-ID: In-Reply-To: @@ -43,6 +44,29 @@ bool tryExtendLLVMBitcodeMarker(GlobalVariable &Bitcode) { return true; } +bool tryExtendDynamicLDSGlobal(GlobalVariable &GV) { + constexpr unsigned WorkgroupAS = 3; + const bool IsWorkgro

[llvm-branch-commits] [llvm] [SPIRV][SPIRVPrepareGlobals] Map AMD's dynamic LDS 0-element globals to arrays with UINT32_MAX elements (PR #166952)

2025-11-10 Thread Steven Perron via llvm-branch-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?Message-ID: In-Reply-To: https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/166952 ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/

[llvm-branch-commits] [llvm] [SPIRV][SPIRVPrepareGlobals] Map AMD's dynamic LDS 0-element globals to arrays with UINT32_MAX elements (PR #166952)

2025-11-10 Thread Steven Perron via llvm-branch-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?Message-ID: In-Reply-To: https://github.com/s-perron commented: I'm wondering if you need to change all 0-sized array or not. If so, we might want to centralize the conversion of 0-sized arrays. We could try to move the code that changes them to 1 elemen

[llvm-branch-commits] [clang] [HLSL] Enable unbounded resource arrays at global scope (PR #155053)

2025-08-26 Thread Steven Perron via llvm-branch-commits
@@ -0,0 +1,64 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-compute -finclude-default-header \ +// RUN: -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s -check-prefixes=CHECK,DXIL +// RUN: %clang_cc1 -finclude-default-header -triple spirv-unknown-vulkan-compute

[llvm-branch-commits] [clang] [HLSL] Tests for local resource arrays (PR #153257)

2025-08-18 Thread Steven Perron via llvm-branch-commits
https://github.com/s-perron approved this pull request. https://github.com/llvm/llvm-project/pull/153257 ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [HLSL] Introduce address space `hlsl_constant(2)` for constant buffer declarations (PR #123411)

2025-01-21 Thread Steven Perron via llvm-branch-commits
s-perron wrote: Could we add a test for SPIR-V to make sure it gets the correct address space as well? They have different target info, so the are different code paths. https://github.com/llvm/llvm-project/pull/123411 __

[llvm-branch-commits] [clang] [HLSL] Introduce address space `hlsl_constant(2)` for constant buffer declarations (PR #123411)

2025-01-21 Thread Steven Perron via llvm-branch-commits
https://github.com/s-perron approved this pull request. LGTM. The SPIR-V code seems correct. It would be useful to have a SPIR-V specific test. https://github.com/llvm/llvm-project/pull/123411 ___ llvm-branch-commits mailing list llvm-branch-commits@l

[llvm-branch-commits] [clang] [HLSL] Introduce address space `hlsl_constant(2)` for constant buffer declarations (PR #123411)

2025-01-21 Thread Steven Perron via llvm-branch-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/123411 ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [HLSL] Add RWBuffer::Load(Index) (PR #117018)

2024-11-22 Thread Steven Perron via llvm-branch-commits
https://github.com/s-perron approved this pull request. https://github.com/llvm/llvm-project/pull/117018 ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits