[clang] [llvm] [HLSL][NFC] Update resource metadata tests to not use obsolete metadata annotations (PR #130222)

2025-03-06 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/130222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][NFC] Update resource metadata tests to not use obsolete metadata annotations (PR #130222)

2025-03-06 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/130222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make sure `isSigned` flag is set on target type for `TypedBuffer` resources with signed int vectors (PR #130223)

2025-03-06 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/130223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Buffer handle globals should not be constants (PR #130231)

2025-03-07 Thread Helena Kotas via cfe-commits
@@ -214,12 +213,12 @@ void CGHLSLRuntime::addBuffer(const HLSLBufferDecl *BufDecl) { llvm::TargetExtType *TargetTy = cast(convertHLSLSpecificType( ResHandleTy, BufDecl->hasValidPackoffset() ? &Layout : nullptr)); - llvm::GlobalVariable *BufGV = - new Gl

[clang] [HLSL][SPIR-V] Add hlsl_private address space for HLSL/SPIR-V (PR #122103)

2025-03-10 Thread Helena Kotas via cfe-commits
Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -std=hlsl202x -emit-llvm -o - -disable-llvm-passes %s | FileCheck %s --check-prefixes=CHECK +// RUN: %clang_cc1 -triple spirv-pc-vulkan1.3-compute -std

[clang] [HLSL][SPIR-V] Add hlsl_private address space for HLSL/SPIR-V (PR #122103)

2025-03-10 Thread Helena Kotas via cfe-commits
Nathan =?utf-8?q?Gau=C3=ABr?= Message-ID: In-Reply-To: https://github.com/hekota approved this pull request. LGTM with one question. https://github.com/llvm/llvm-project/pull/122103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [HLSL][SPIR-V] Add hlsl_private address space for HLSL/SPIR-V (PR #122103)

2025-03-10 Thread Helena Kotas via cfe-commits
Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/122103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-10 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/128991 >From 9faff902639aece87b72ed5235d71b8b68533074 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 26 Feb 2025 17:39:16 -0800 Subject: [PATCH 1/6] Add resource binding attribute on $Globals numeric constants

[clang] [HLSL][SPIR-V] Add hlsl_private address space for HLSL/SPIR-V (PR #122103)

2025-03-10 Thread Helena Kotas via cfe-commits
Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -5386,6 +5386,23 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; } + + if (LangOpts.HLSL) { +if (D == nullptr)

[clang] [llvm] [HLSL][NFC] Update resource metadata tests to not use obsolete annotations (PR #130222)

2025-03-10 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/130222 >From 99539251dcf58aab9a88973f9162156ae6f1aa77 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 6 Mar 2025 18:22:07 -0800 Subject: [PATCH 1/3] [HLSL][NFC] Update resource metadata tests to not use obsolete

[clang] [HLSL] Add HLSLResourceBindingAttr to default constant buffer numeric declarations ($Globals) (PR #128981)

2025-02-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/128981 >From 9faff902639aece87b72ed5235d71b8b68533074 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 26 Feb 2025 17:39:16 -0800 Subject: [PATCH 1/2] Add resource binding attribute on $Globals numeric constants

[clang] [HLSL] Add HLSLResourceBindingAttr to default constant buffer numeric declarations ($Globals) (PR #128981)

2025-02-27 Thread Helena Kotas via cfe-commits
@@ -1,41 +1,56 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -finclude-default-header -ast-dump -o - %s | FileCheck %s -// CHECK:HLSLBufferDecl 0x[[CB:[0-9a-f]+]

[clang] [HLSL] Add HLSLResourceBindingAttr to default constant buffer numeric declarations ($Globals) (PR #128981)

2025-02-27 Thread Helena Kotas via cfe-commits
@@ -1,41 +1,56 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -finclude-default-header -ast-dump -o - %s | FileCheck %s hekota wrote: The default

[clang] [HLSL] Add HLSLResourceBindingAttr to default constant buffer numeric declarations ($Globals) (PR #128981)

2025-02-27 Thread Helena Kotas via cfe-commits
@@ -1,41 +1,56 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -finclude-default-header -ast-dump -o - %s | FileCheck %s -// CHECK:HLSLBufferDecl 0x[[CB:[0-9a-f]+]

[clang] [HLSL] error on out of bounds vector accesses (PR #128952)

2025-03-11 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/128952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][NFC] Update HLSL AST tests to be more readable (PR #130910)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/130910 Replacing all occurences of - `0x{{[0-9A-Fa-f]+}} <> ` - `0x{{[0-9A-Fa-f]+}} <>` - `0x{{[0-9A-Fa-f]+}}` - `0x{{[0-9a-fA-F]+}} ` - `0x{{[0-9a-fA-F]+}} col:#` with - `{{.*}}` to improve readability and concisenes

[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-11 Thread Helena Kotas via cfe-commits
@@ -89,14 +99,57 @@ llvm::TargetExtType *HLSLBufferLayoutBuilder::createLayoutType( RecordTypes.pop_back(); for (const auto *FD : RT->getDecl()->fields()) { - assert((!Packoffsets || Index < Packoffsets->size()) && - "number of elements in layout stru

[clang] [llvm] [DirectX] Remove DXILResourceMDAnalysis (PR #130323)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/130323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Remove old resource annotations (PR #130338)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/130338 >From 99539251dcf58aab9a88973f9162156ae6f1aa77 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 6 Mar 2025 18:22:07 -0800 Subject: [PATCH 1/3] [HLSL][NFC] Update resource metadata tests to not use obsolete

[clang] [llvm] [HLSL] Remove old resource annotations (PR #130338)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/130338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][NFC] Update HLSL AST tests to be more readable (PR #130910)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/130910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Buffer handle globals should not be constants (PR #130231)

2025-03-13 Thread Helena Kotas via cfe-commits
@@ -214,12 +213,12 @@ void CGHLSLRuntime::addBuffer(const HLSLBufferDecl *BufDecl) { llvm::TargetExtType *TargetTy = cast(convertHLSLSpecificType( ResHandleTy, BufDecl->hasValidPackoffset() ? &Layout : nullptr)); - llvm::GlobalVariable *BufGV = - new Gl

[clang] [HLSL][NFC] Update HLSL AST tests to be more readable (PR #130910)

2025-03-13 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/130910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][NFC] Refactor HLSLExternalSemaSource (PR #131032)

2025-03-13 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/131032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Fix resrouce wrapper declaration (PR #129100)

2025-03-05 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! Thanks :) https://github.com/llvm/llvm-project/pull/129100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Fix resrouce wrapper declaration (PR #129100)

2025-03-05 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/129100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Buffer handle globals should not be constants (PR #130231)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! Consider updating "Buffer" in the title to "Constant buffer" since this does not apply to other buffer resources. https://github.com/llvm/llvm-project/pull/130231 ___ cfe-commits mailing list

[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-12 Thread Helena Kotas via cfe-commits
@@ -89,14 +99,57 @@ llvm::TargetExtType *HLSLBufferLayoutBuilder::createLayoutType( RecordTypes.pop_back(); for (const auto *FD : RT->getDecl()->fields()) { - assert((!Packoffsets || Index < Packoffsets->size()) && - "number of elements in layout stru

[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/128991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-12 Thread Helena Kotas via cfe-commits
@@ -174,21 +176,45 @@ createBufferHandleType(const HLSLBufferDecl *BufDecl) { return cast(QT.getTypePtr()); } +// Iterates over all declarations in the HLSL buffer and based on the +// packoffset or register(c#) annotations it fills outs the Layout +// vector with the user-s

[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-12 Thread Helena Kotas via cfe-commits
@@ -174,21 +176,45 @@ createBufferHandleType(const HLSLBufferDecl *BufDecl) { return cast(QT.getTypePtr()); } +// Iterates over all declarations in the HLSL buffer and based on the +// packoffset or register(c#) annotations it fills outs the Layout +// vector with the user-s

[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/128991 >From 9faff902639aece87b72ed5235d71b8b68533074 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 26 Feb 2025 17:39:16 -0800 Subject: [PATCH 1/8] Add resource binding attribute on $Globals numeric constants

[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-11 Thread Helena Kotas via cfe-commits
@@ -89,14 +99,57 @@ llvm::TargetExtType *HLSLBufferLayoutBuilder::createLayoutType( RecordTypes.pop_back(); for (const auto *FD : RT->getDecl()->fields()) { - assert((!Packoffsets || Index < Packoffsets->size()) && - "number of elements in layout stru

[clang] [HLSL][NFC] Refactoring HLSLExternalSemaSource (PR #131032)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/131032 Moving builder classes into separate files `HLSLBuiltinTypeDeclBuilder.cpp`/`.h` and changing a some `HLSLExternalSemaSource` methods to private. This is a prep work before we start adding more builtin types an

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-19 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,39 @@ +//===- HLSLTargetInfo.h ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-19 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,39 @@ +//===- HLSLTargetInfo.h ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-19 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,39 @@ +//===- HLSLTargetInfo.h ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [HLSL][Sema] Fix Struct Size Calculation containing 16/32 bit scalars (PR #128086)

2025-02-21 Thread Helena Kotas via cfe-commits
@@ -172,6 +172,27 @@ Decl *SemaHLSL::ActOnStartBuffer(Scope *BufferScope, bool CBuffer, return Result; } +static unsigned calculateLegacyCbufferFieldAlign(const ASTContext &Context, + QualType T) { + // Aggregate types are al

[clang] [HLSL][Sema] Fix Struct Size Calculation containing 16/32 bit scalars (PR #128086)

2025-02-21 Thread Helena Kotas via cfe-commits
@@ -172,6 +172,27 @@ Decl *SemaHLSL::ActOnStartBuffer(Scope *BufferScope, bool CBuffer, return Result; } +static unsigned calculateLegacyCbufferFieldAlign(const ASTContext &Context, + QualType T) { + // Aggregate types are al

[clang] [HLSL][Sema] Fix Struct Size Calculation containing 16/32 bit scalars (PR #128086)

2025-02-21 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,60 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefix=CHECK-HALF + +// RUN: %clang_cc1 -std=hlsl

[clang] [HLSL] Allow EmptyDecl in cbuffer/tbuffer (PR #128250)

2025-02-21 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/128250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement default constant buffer $Globals (2nd attempt) (PR #128589)

2025-02-24 Thread Helena Kotas via cfe-commits
@@ -5769,11 +5776,11 @@ void HLSLBufferDecl::addLayoutStruct(CXXRecordDecl *LS) { addDecl(LS); } -void HLSLBufferDecl::addDefaultBufferDecl(Decl *D) { +void HLSLBufferDecl::setDefaultBufferDecls(ArrayRef Decls) { hekota wrote: Good idea! https://github.co

[clang] [HLSL] Implement default constant buffer $Globals (2nd attempt) (PR #128589)

2025-02-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/128589 All variable declarations in the global scope that are not resources, static or empty are implicitly added to implicit constant buffer `$Globals`. They are created in `hlsl_constant` address space and collected

[clang] [HLSL][Sema] Fix Struct Size Calculation containing 16/32 bit scalars (PR #128086)

2025-02-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/128086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-20 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,201 @@ +//===- HLSLTargetInto.cpp--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-20 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/124886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement default constant buffer `$Globals` (PR #125807)

2025-02-20 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/125807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement default constant buffer `$Globals` (PR #125807)

2025-02-20 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/125807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement default constant buffer `$Globals` (PR #125807)

2025-02-20 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/125807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add HLSLResourceBindingAttr to numeric default constant declarations ($Globals) (PR #128981)

2025-02-26 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/128981 Translates `register(c#`) annotations on numeric constants in the global scope to `HLSLResourceBindingAttr`. Applies to scalar, vector and array constants. Fixes #128964 >From 9faff902639aece87b72ed5235d71b8b68

[clang] [HLSL] Add HLSLResourceBindingAttr to default constant buffer numeric declarations ($Globals) (PR #128981)

2025-02-26 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/128981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement default constant buffer $Globals (2nd attempt) (PR #128589)

2025-02-25 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/128589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement default constant buffer $Globals (2nd attempt) (PR #128589)

2025-02-25 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/128589 >From 5bdff894dd52d2ad68c1e3cfb62f007d2bc647c2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 20 Feb 2025 17:27:53 -0800 Subject: [PATCH 1/3] [HLSL] Implement default constant buffer `$Globals` (#125807)

[clang] [HLSL] Fix codegen to support classes in `cbuffer` (PR #132828)

2025-03-31 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/132828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [Clang][Cmake] fix libtool duplicate member name warnings (PR #133850)

2025-04-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/133850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][NFC] Refactor HLSLExternalSemaSource (PR #131032)

2025-03-21 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/131032 >From 7ebfc826ca27c71ef80f4a1b38b2d3a2e155b777 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 12 Mar 2025 14:09:24 -0700 Subject: [PATCH 1/3] [HLSL][NFC] Refactoring HLSLExternalSemaSource Moving builder

[clang] [llvm] [DirectX] Add target builtins (PR #134439)

2025-04-04 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,23 @@ +//===- SemaDirectX.cpp - Semantic Analysis for DirectX constructs--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [llvm] [DirectX] Add target builtins (PR #134439)

2025-04-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/134439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Add target builtins (PR #134439)

2025-04-04 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,29 @@ +//===- SemaDirectX.h - Semantic Analysis for DirectX +// constructs===// hekota wrote: Is this supposed to be on 2 lines? https://github.com/llvm/llvm-project/pull/134439 ___ cfe-commi

[clang] [llvm] [DirectX] Add target builtins (PR #134439)

2025-04-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! Just a few comments. https://github.com/llvm/llvm-project/pull/134439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Add target builtins (PR #134439)

2025-04-04 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,23 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 hekota wrote: The filename should probably be dot2add.hlsl. https://github.com/llvm/llvm-project/pull/134439 __

[clang] [HLSL][NFC] Test cleanup - remove function attributes (PR #139302)

2025-05-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/139302 The function attribute numbers are not stable. They are not part of the test and can be removed. >From 14eda614ef4d2f3d5617dcedd935adfe97ec9c1a Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Fri, 9 May 2025

[clang] [HLSL][NFC] Rename isImplicit() to hasRegisterStot() on HLSLResourceBindingAttr (PR #138964)

2025-05-08 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/138964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][NFC] Rename isImplicit() to hasRegisterStot() on HLSLResourceBindingAttr (PR #138964)

2025-05-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/138964 Renaming because the name `isImplicit` is ambiguous. It can mean implicit attribute or implicit binding. >From 989c75d4376eaedfb8756bc564f81aee6199756a Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 7 M

[clang] [HLSL] Update Sema Checking Diagnostics for builtins (PR #138429)

2025-05-09 Thread Helena Kotas via cfe-commits
@@ -2164,30 +2085,49 @@ static bool CheckModifiableLValue(Sema *S, CallExpr *TheCall, return true; } -static bool CheckNoDoubleVectors(Sema *S, CallExpr *TheCall) { - auto checkDoubleVector = [](clang::QualType PassedType) -> bool { -if (const auto *VecTy = PassedType-

[clang] [HLSL] Update Sema Checking Diagnostics for builtins (PR #138429)

2025-05-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/138429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Update Sema Checking Diagnostics for builtins (PR #138429)

2025-05-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/138429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Update Sema Checking Diagnostics for builtins (PR #138429)

2025-05-09 Thread Helena Kotas via cfe-commits
@@ -42,47 +42,47 @@ float2 test_mad_element_type_mismatch(half2 p0, float2 p1) { float2 test_builtin_mad_float2_splat(float p0, float2 p1) { return __builtin_hlsl_mad(p0, p1, p1); - // expected-error@-1 {{all arguments to '__builtin_hlsl_mad' must be vectors}} + // expect

[clang] [HLSL] Update Sema Checking Diagnostics for builtins (PR #138429)

2025-05-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota commented: Look good! One suggestion and a one question why the diag message uses has `double` when the argument is `float`. https://github.com/llvm/llvm-project/pull/138429 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [HLSL][NFC] Test cleanup - remove function attributes (PR #139302)

2025-05-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/139302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/138976 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/138976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/138976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-13 Thread Helena Kotas via cfe-commits
@@ -3269,27 +3285,42 @@ static bool initVarDeclWithCtor(Sema &S, VarDecl *VD, return true; } -static bool initGlobalResourceDecl(Sema &S, VarDecl *VD) { +bool SemaHLSL::initGlobalResourceDecl(VarDecl *VD) { + std::optional RegisterSlot; + uint32_t SpaceNo = 0; HLSLResou

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-13 Thread Helena Kotas via cfe-commits
@@ -668,6 +668,26 @@ BuiltinTypeDeclBuilder::addHandleConstructorFromBinding() { .finalize(); } +BuiltinTypeDeclBuilder & +BuiltinTypeDeclBuilder::addHandleConstructorFromImplicitBinding() { + if (Record->isCompleteDefinition()) hekota wrote: If I reca

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-13 Thread Helena Kotas via cfe-commits
@@ -55,11 +55,33 @@ export void foo() { // CHECK-SAME: i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) // CHECK-NEXT: ret void -// Buf2 initialization part 1 - FIXME: constructor with implicit binding does not exist yet; -// the global init function currently

[clang] [llvm] [HLSL] Add resource name argument to resource class constructors (PR #139985)

2025-05-16 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/139985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add resource name argument to resource class constructors (PR #139985)

2025-05-16 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/139985 >From 8776c02d4f296f13f356c34707f4052f057c4538 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 14 May 2025 17:26:10 -0700 Subject: [PATCH] [HLSL] Add resource name argument to resource class constructors

[clang] [HLSL][NFC] Simplify resource constructors codegen tests (PR #139842)

2025-05-14 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/139842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][NFC] Simplify resource constructors codegen tests (PR #139842)

2025-05-14 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/139842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-14 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/138976 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-14 Thread Helena Kotas via cfe-commits
@@ -55,11 +55,33 @@ export void foo() { // CHECK-SAME: i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) // CHECK-NEXT: ret void -// Buf2 initialization part 1 - FIXME: constructor with implicit binding does not exist yet; -// the global init function currently

[clang] [HLSL] Simplify resource constructors codegen tests (PR #139842)

2025-05-13 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/139842 None Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [HLSL][NFC] Simplify resource constructors codegen tests (PR #139842)

2025-05-13 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/139842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implicit resource binding for cbuffers (PR #139022)

2025-05-15 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/139022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implicit resource binding for cbuffers (PR #139022)

2025-05-15 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/139022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Update Sema Checking Diagnostics for builtins (PR #138429)

2025-05-20 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. https://github.com/llvm/llvm-project/pull/138429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add resource name argument to resource class constructors (PR #139985)

2025-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/139985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add resource name argument to resource class constructors (PR #139985)

2025-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/139985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add resource name argument to resource class constructors (PR #139985)

2025-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/139985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add resource name argument to resource class constructors (PR #139985)

2025-05-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/139985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Add resource name argument to llvm.dx.handlefrom[implicit]binding intrinsics (PR #139991)

2025-05-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/139991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    4   5   6   7   8   9