[llvm-branch-commits] [llvm] [DirectX] Improve error message when a binding cannot be found for a resource (PR #140642)

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

[llvm-branch-commits] [llvm] [HLSL] Diagnose overlapping resource bindings (PR #140982)

2025-05-27 Thread Helena Kotas via llvm-branch-commits
@@ -50,15 +51,55 @@ static void reportInvalidDirection(Module &M, DXILResourceMap &DRM) { } } -} // namespace +static void reportOverlappingError(Module &M, ResourceInfo R1, + ResourceInfo R2) { + SmallString<64> Message; + raw_svector_os

[llvm-branch-commits] [llvm] [DirectX] Update resource type names in DXIL metadata to include element type (PR #140937)

2025-05-22 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/140937 >From 3f882eb22c0035e5f9dfe7b7324fb44a7a66dea8 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 21 May 2025 09:18:02 -0700 Subject: [PATCH 1/4] [DirectX] Update resource type names in DXIL metadata to incl

[llvm-branch-commits] [llvm] [HLSL] Diagnose overlapping resource bindings (PR #140982)

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

[llvm-branch-commits] [llvm] [HLSL] Diagnose overlapping resource bindings (PR #140982)

2025-05-21 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/140982 Adds reporting of overlapping binding errors to `DXILPostOptimizationValidation` pass. Only runs when `DXILResourceBindingAnalysis` detects there is an overlapping binding. Fixes #110723 Depends on #140635, #1

[llvm-branch-commits] [llvm] [DirectX] Update resource type names in DXIL metadata to include element type (PR #140937)

2025-05-21 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/140937 >From 3f882eb22c0035e5f9dfe7b7324fb44a7a66dea8 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 21 May 2025 09:18:02 -0700 Subject: [PATCH 1/3] [DirectX] Update resource type names in DXIL metadata to incl

[llvm-branch-commits] [llvm] [DirectX] Use resource names when generating DXIL metadata (PR #140635)

2025-05-20 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/140635 >From 0dc74a35fe2c774d8d3de847fe4272363b38ff85 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 19 May 2025 15:18:09 -0700 Subject: [PATCH 1/2] [DirectX] Use resource names in DXIL metadata pass --- llvm/

[llvm-branch-commits] [llvm] [DirectX] Detect resources with identical overlapping binding (PR #140645)

2025-05-19 Thread Helena Kotas via llvm-branch-commits
@@ -167,7 +167,6 @@ TEST_F(ResourceBindingAnalysisTest, TestUnboundedAndOverlap) { // StructuredBuffer C[] : register(t0, space2); // StructuredBuffer D: register(t4, space2); /* overlapping */ StringRef Assembly = R"( -%__cblayout_CB = type <{ i32 }> --

[llvm-branch-commits] [llvm] [DirectX] Detect resources with identical overlapping binding (PR #140645)

2025-05-19 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/140645 This change uses resource name during DXIL resource binding analysis to detect when two (or more) resources have identical overlapping binding. The DXIL resource analysis just detects that there is a problem wit

[llvm-branch-commits] [llvm] [DirectX] Improve error message when a binding cannot be found for a resource (PR #140642)

2025-05-19 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/140642 Closes #137868 Depends on #140633 >From 9ba94a335ffca203b7299f363ea8663a46d64bf8 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 19 May 2025 15:57:02 -0700 Subject: [PATCH] [DirectX] Improve error messa

[llvm-branch-commits] [llvm] [DirectX] Use resource names when generating DXIL metadata (PR #140635)

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

[llvm-branch-commits] [llvm] [DirectX] Use resource names when generating DXIL metadata (PR #140635)

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

[llvm-branch-commits] [llvm] [DirectX] Gather resource names in DXIL resource analysis (PR #140633)

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

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

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

[llvm-branch-commits] [llvm] [DirectX] Gather resource names in DXIL resource analysis (PR #140633)

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

[llvm-branch-commits] [llvm] [DirectX] Gather resource names in DXIL resource analysis (PR #140633)

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

[llvm-branch-commits] [llvm] [DirectX] Gather resource names in DXIL resource analysis (PR #140633)

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

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

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

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

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

[llvm-branch-commits] [llvm] [DirectX] Gather resource names in DXIL resource analysis (PR #140633)

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

[llvm-branch-commits] [llvm] [DirectX] Use resource names when generating DXIL metadata (PR #140635)

2025-05-19 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/140635 Use resource names gathered during the DXIL resource analysis when creating DXIL resources metadata. Part 4/4 of https://github.com/llvm/llvm-project/issues/105059 Closes #140529 Depends on #140633 >From 0d

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

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

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

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

[llvm-branch-commits] [clang] [llvm] [DirectX] Add resource name argument to llvm.dx.handlefrom[implicit]binding intrinsic (DirectX only) (PR #139991)

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

[llvm-branch-commits] [llvm] [DirectX] Gather resource names in DXIL resource analysis (PR #140633)

2025-05-19 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/140633 Gather resource names from `llvm.dx.resource.handlefrombinding` calls during DXIL resource analysis and add them to ResourceMap. Part 3/4 of llvm/llvm-project#105059 >From a73cdb9288a0f325d4c03a58daf6803e8d8d2d

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

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

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

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

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

2025-05-12 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/139022 >From 8194951b52e024b78c7f148d65ce6c23b3fcf424 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 7 May 2025 21:05:39 -0700 Subject: [PATCH 1/6] [HLSL] Implicit binding for cbuffers Constant buffers defined

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

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

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

2025-05-09 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/138976 >From dfce6ce8edc520251c0561cfd50cc6c11af46ecd Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 7 May 2025 14:43:27 -0700 Subject: [PATCH] [HLSL] Add resource constructor with implicit binding for global r

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

2025-05-09 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/139022 >From 8194951b52e024b78c7f148d65ce6c23b3fcf424 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 7 May 2025 21:05:39 -0700 Subject: [PATCH 1/4] [HLSL] Implicit binding for cbuffers Constant buffers defined

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

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

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

2025-05-09 Thread Helena Kotas via llvm-branch-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

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

2025-05-09 Thread Helena Kotas via llvm-branch-commits
@@ -32,6 +32,6 @@ export float TestLoad() { // CHECK: %[[PTR1:.*]] = call ptr @llvm.dx.resource.getpointer.p0.tdx.RawBuffer_f32_1_1t(target("dx.RawBuffer", float, 1, 1) %{{[0-9]+}}, i32 %{{[0-9]+}}) // CHECK: %[[VALUE1:.*]] = load float, ptr %[[PTR1]] -// CHECK: declare i32

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

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

[llvm-branch-commits] [llvm] [DirectX] Implement DXILResourceImplicitBinding pass (PR #138043)

2025-05-09 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/138043 >From f58e2d5c079f31d7a4d99d481a569ad4c754c4e7 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 30 Apr 2025 15:08:04 -0700 Subject: [PATCH 1/3] [HLSL] Implementation of DXILResourceImplicitBinding pass Thi

[llvm-branch-commits] [llvm] [DirectX] Implement DXILResourceImplicitBinding pass (PR #138043)

2025-05-09 Thread Helena Kotas via llvm-branch-commits
@@ -994,6 +994,61 @@ void DXILResourceBindingInfo::populate(Module &M, DXILResourceTypeMap &DRTM) { } } +// returns false if binding could not be found in given space +bool DXILResourceBindingInfo::findAvailableBinding(dxil::ResourceClass RC, +

[llvm-branch-commits] [llvm] [DirectX] Implement DXILResourceImplicitBinding pass (PR #138043)

2025-05-08 Thread Helena Kotas via llvm-branch-commits
@@ -0,0 +1,182 @@ +//===- DXILResourceImplicitBinding.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: Apac

[llvm-branch-commits] [llvm] [DirectX] Implement DXILResourceImplicitBinding pass (PR #138043)

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

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

2025-05-07 Thread Helena Kotas via llvm-branch-commits
@@ -21,7 +21,7 @@ void InitBuf(RWBuffer buf) { // CHECK-NEXT: br i1 [[Tmp3]] // CHECK-NOT: _Init_thread_header // CHECK: init.check: -// CHECK-NEXT: call void @_ZN4hlsl8RWBufferIiEC1Ev +// CHECK-NEXT: call void @_ZN4hlsl8RWBufferIiEC1Ejijj hekota wrote: Same a

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

2025-05-07 Thread Helena Kotas via llvm-branch-commits
@@ -32,6 +32,6 @@ export float TestLoad() { // CHECK: %[[PTR1:.*]] = call ptr @llvm.dx.resource.getpointer.p0.tdx.RawBuffer_f32_1_1t(target("dx.RawBuffer", float, 1, 1) %{{[0-9]+}}, i32 %{{[0-9]+}}) // CHECK: %[[VALUE1:.*]] = load float, ptr %[[PTR1]] -// CHECK: declare i32

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

2025-05-07 Thread Helena Kotas via llvm-branch-commits
@@ -33,7 +33,7 @@ void SecondEntry() {} // Verify the constructor is alwaysinline // NOINLINE: ; Function Attrs: {{.*}}alwaysinline -// NOINLINE-NEXT: define linkonce_odr void @_ZN4hlsl8RWBufferIfEC2Ev({{.*}} [[CtorAttr:\#[0-9]+]] +// NOINLINE-NEXT: define linkonce_odr void @

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

2025-05-07 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/138976 Adds constructor for resources with implicit binding and applies it to all resources without binding at the global scope. Adds Clang builtin function `__builtin_hlsl_resource_handlefromimplicitbinding` that gets

[llvm-branch-commits] [llvm] [DirectX] Implement DXILResourceImplicitBinding pass (PR #138043)

2025-05-06 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/138043 >From f58e2d5c079f31d7a4d99d481a569ad4c754c4e7 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 30 Apr 2025 15:08:04 -0700 Subject: [PATCH 1/2] [HLSL] Implementation of DXILResourceImplicitBinding pass Thi

[llvm-branch-commits] [llvm] [DirectX] Implement DXILResourceImplicitBinding pass (PR #138043)

2025-04-30 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/138043 >From f58e2d5c079f31d7a4d99d481a569ad4c754c4e7 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 30 Apr 2025 15:08:04 -0700 Subject: [PATCH 1/2] [HLSL] Implementation of DXILResourceImplicitBinding pass Thi

[llvm-branch-commits] [llvm] [DirectX] Implement DXILResourceImplicitBinding pass (PR #138043)

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

[llvm-branch-commits] [llvm] [DirectX] Implementation of DXILResourceImplicitBinding pass (PR #138043)

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

[llvm-branch-commits] [llvm] [HLSL] Implementation of DXILResourceImplicitBinding pass (PR #138043)

2025-04-30 Thread Helena Kotas via llvm-branch-commits
@@ -0,0 +1,44 @@ +; RUN: opt -S -dxil-resource-implicit-binding %s | FileCheck %s hekota wrote: I just realized this test is not complete... working on a fix. https://github.com/llvm/llvm-project/pull/138043 ___ llvm-b

[llvm-branch-commits] [llvm] [HLSL] Implementation of DXILResourceImplicitBinding pass (PR #138043)

2025-04-30 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/138043 The `DXILResourceImplicitBinding` pass uses the results of `DXILResourceBindingAnalysis` to assigns register slots to resources that do not have explicit binding. It replaces all `llvm.dx.resource.handlefromimp

[llvm-branch-commits] [clang] [llvm] [HLSL] Allow resource annotations to specify only register space (PR #135287)

2025-04-23 Thread Helena Kotas via llvm-branch-commits
@@ -4723,20 +4723,25 @@ def HLSLResourceBinding: InheritableAttr { private: RegisterType RegType; - unsigned SlotNumber; + int SlotNumber; // -1 if the register slot was not specified hekota wrote: Good catch! DXC actually ignores the regist

[llvm-branch-commits] [clang] [llvm] [HLSL] Allow resource annotations to specify only register space (PR #135287)

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

[llvm-branch-commits] [clang] [llvm] [HLSL] Allow resource annotations to specify only register space (PR #135287)

2025-04-22 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/135287 >From 6fb658a603f116f29e635e4802a8d77b896150ff Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 10 Apr 2025 17:31:57 -0700 Subject: [PATCH 1/5] [HLSL] Allow register annotations to specify only `space` Spe

[llvm-branch-commits] [clang] [llvm] [HLSL] Allow resource annotations to specify only register space (PR #135287)

2025-04-21 Thread Helena Kotas via llvm-branch-commits
@@ -163,11 +163,16 @@ void Parser::ParseHLSLAnnotations(ParsedAttributes &Attrs, SourceLocation SlotLoc = Tok.getLocation(); ArgExprs.push_back(ParseIdentifierLoc()); -// Add numeric_constant for fix-it. -if (SlotStr.size() == 1 && Tok.is(tok::numeric_constant)

[llvm-branch-commits] [clang] [llvm] [HLSL] Allow resource annotations to specify only register space (PR #135287)

2025-04-11 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/135287 >From 6fb658a603f116f29e635e4802a8d77b896150ff Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 10 Apr 2025 17:31:57 -0700 Subject: [PATCH 1/4] [HLSL] Allow register annotations to specify only `space` Spe

[llvm-branch-commits] [clang] [HLSL] DO NOT MERGE - Resource constructors prototype (PR #132453)

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

[llvm-branch-commits] [clang] [llvm] [HLSL] Allow resource annotations to specify only register space (PR #135287)

2025-04-11 Thread Helena Kotas via llvm-branch-commits
@@ -1529,72 +1529,80 @@ void SemaHLSL::handleResourceBindingAttr(Decl *TheDecl, const ParsedAttr &AL) { diag::err_incomplete_type)) return; } - StringRef Space = "space0"; + StringRef Slot = ""; + StringRef Space = ""; + Source

[llvm-branch-commits] [clang] [llvm] [HLSL] Allow resource annotations to specify only register space (PR #135287)

2025-04-10 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/135287 >From 6fb658a603f116f29e635e4802a8d77b896150ff Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 10 Apr 2025 17:31:57 -0700 Subject: [PATCH 1/2] [HLSL] Allow register annotations to specify only `space` Spe

[llvm-branch-commits] [clang] [llvm] [HLSL] Allow resource annotations to specify only register space (PR #135287)

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

[llvm-branch-commits] [clang] [llvm] [HLSL] Allow resource annotations to specify only register space (PR #135287)

2025-04-10 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/135287 >From 6fb658a603f116f29e635e4802a8d77b896150ff Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 10 Apr 2025 17:31:57 -0700 Subject: [PATCH 1/3] [HLSL] Allow register annotations to specify only `space` Spe

[llvm-branch-commits] [clang] [llvm] [HLSL] Allow resource annotations to specify only register space (PR #135287)

2025-04-10 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/135287 Specifying only `space` in a `register` annotation means the compiler should implicitly assign a register slot to the resource from the provided virtual register space. Fixes #133346 Depends on PR #135120 >

[llvm-branch-commits] [clang] [HLSL][NFC] Use method builder to create default resource constructor (PR #131384)

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

[llvm-branch-commits] [clang] [HLSL] DO NOT MERGE - Resource constructors prototype (PR #132453)

2025-03-26 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/132453 None >From 47b41c88a60a7f376070b9ff779ec955eebf523a Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 12 Mar 2025 17:20:51 -0700 Subject: [PATCH 1/3] [HLSL] Create default resource constructor with Builtin

[llvm-branch-commits] [clang] [HLSL][NFC] Use builtin method builder to create default resource constructor (PR #131384)

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

[llvm-branch-commits] [clang] [HLSL][NFC] Use builtin method builder to create default resource constructor (PR #131384)

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

[llvm-branch-commits] [clang] [HLSL][NFC] Use method builder to create default resource constructor (PR #131384)

2025-03-14 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/131384 Updates the `BuiltinTypeMethodBuilder` to support creating constructors and use it to create the default resource constructor. This enables us to have a shared code for implementing both builtin methods and cons

[llvm-branch-commits] [clang] [HLSL][NFC] Use method builder to create default resource constructor (PR #131384)

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

[llvm-branch-commits] [llvm] [DirectX] Remove DXILResourceMDAnalysis (PR #130323)

2025-03-10 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/130323 >From 80765757f067527816c4c8b9d728169568b04b7a Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Fri, 7 Mar 2025 10:40:20 -0800 Subject: [PATCH 1/2] [DirectX] Remove DXILResourceMDAnalysis Part 1/2 of #114126 --

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

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

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

2025-03-07 Thread Helena Kotas via llvm-branch-commits
@@ -125,15 +125,6 @@ class CGHLSLRuntime { // End of reserved area for HLSL intrinsic getters. //===--===// - struct BufferResBinding { hekota wrote: The register number and space are u

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

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

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

2025-03-07 Thread Helena Kotas via llvm-branch-commits
@@ -11,59 +11,9 @@ //===--===// #include "llvm/Frontend/HLSL/HLSLResource.h" -#include "llvm/IR/IRBuilder.h" -#include "llvm/IR/Metadata.h" using namespace llvm; using namespace llvm::hlsl; -GlobalVaria

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

2025-03-07 Thread Helena Kotas via llvm-branch-commits
hekota wrote: Reopening. I've accidentally deleted the pr branch this depends on and it closed this PR. https://github.com/llvm/llvm-project/pull/128991 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cg

[llvm-branch-commits] [llvm] [DirectX] Remove DXILResourceMDAnalysis (PR #130323)

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

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

2025-03-07 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/130338 Fixes #114126 >From c574bedb001f61f4bcdbf00613eec932028cf392 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Fri, 7 Mar 2025 12:09:33 -0800 Subject: [PATCH] [HLSL] Remove old resource annotations Fixes #11412

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

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

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

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

[llvm-branch-commits] [llvm] [DirectX] Remove DXILResourceMDAnalysis (PR #130323)

2025-03-07 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/130323 `DXILResourceMDAnalysis` gathers information about resources from obsolete resource metadata annotations that are going to be removed in a follow-up PR. Part 1/2 of #114126 >From 80765757f067527816c4c8b9d728169

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

2025-02-27 Thread Helena Kotas via llvm-branch-commits
@@ -179,21 +179,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

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

2025-02-27 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/128991 >From e982a61657da5eb4c7f2618c95f0c6d3493cb854 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 26 Feb 2025 19:14:20 -0800 Subject: [PATCH 1/3] [HLSL] Implement explicit layout for default constant buffer

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

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

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

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

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

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

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

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

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

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

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

2025-02-26 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/128991 >From e982a61657da5eb4c7f2618c95f0c6d3493cb854 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 26 Feb 2025 19:14:20 -0800 Subject: [PATCH 1/2] [HLSL] Implement explicit layout for default constant buffer

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

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

[llvm-branch-commits] [clang] [HLSL] Implement explicit layout for default constant buffer (PR #128991)

2025-02-26 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/128991 Fixes #123801 >From e982a61657da5eb4c7f2618c95f0c6d3493cb854 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 26 Feb 2025 19:14:20 -0800 Subject: [PATCH] [HLSL] Implement explicit layout for default consta

[llvm-branch-commits] [llvm] [DirectX] Support the CBufferLoadLegacy operation (PR #128699)

2025-02-25 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota approved this pull request. LGTM! Just one copy-paste nit. https://github.com/llvm/llvm-project/pull/128699 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[llvm-branch-commits] [llvm] [DirectX] Support the CBufferLoadLegacy operation (PR #128699)

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

[llvm-branch-commits] [llvm] [DirectX] Support the CBufferLoadLegacy operation (PR #128699)

2025-02-25 Thread Helena Kotas via llvm-branch-commits
@@ -816,6 +822,19 @@ def CreateHandle : DXILOp<57, createHandle> { let attributes = [Attributes]; } +def CBufferLoadLegacy : DXILOp<59, cbufferLoadLegacy> { + let Doc = "reads from a TypedBuffer"; hekota wrote: ```suggestion let Doc = "reads from a const

[llvm-branch-commits] [llvm] [DirectX] Fix printing of DXIL cbuffer info (PR #128698)

2025-02-25 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota approved this pull request. https://github.com/llvm/llvm-project/pull/128698 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

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

2025-02-20 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/125807 >From 42bb34f66f0030f55e1055c4ee0b362511b7f45b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 4 Feb 2025 22:01:49 -0800 Subject: [PATCH 1/5] [HLSL] Implement default constant buffer `$Globals` All variab

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

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

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

2025-02-18 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/125807 >From 42bb34f66f0030f55e1055c4ee0b362511b7f45b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 4 Feb 2025 22:01:49 -0800 Subject: [PATCH 1/5] [HLSL] Implement default constant buffer `$Globals` All variab

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

2025-02-18 Thread Helena Kotas via llvm-branch-commits
@@ -286,10 +286,7 @@ void CGHLSLRuntime::emitBufferGlobalsAndMetadata(const HLSLBufferDecl *BufDecl, .str( && "layout type does not match the converted element type"); -// there might be resources inside the used defined st

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

2025-02-18 Thread Helena Kotas via llvm-branch-commits
@@ -5753,6 +5765,30 @@ void HLSLBufferDecl::addLayoutStruct(CXXRecordDecl *LS) { addDecl(LS); } +void HLSLBufferDecl::addDefaultBufferDecl(Decl *D) { + assert(isImplicit() && + "default decls can only be added to the implicit/default constant " + "buffer $Gl

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

2025-02-18 Thread Helena Kotas via llvm-branch-commits
@@ -5072,6 +5080,20 @@ class HLSLBufferDecl final : public NamedDecl, public DeclContext { return static_cast(const_cast(DC)); } + // Iterator for the buffer decls. Concatenates the list of decls parented hekota wrote: That is correct. We are not depe

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

2025-02-18 Thread Helena Kotas via llvm-branch-commits
@@ -159,11 +159,16 @@ class SemaHLSL : public SemaBase { // List of all resource bindings ResourceBindings Bindings; + // default constant buffer $Globals + HLSLBufferDecl *DefaultCBuffer; + private: void collectResourcesOnVarDecl(VarDecl *D); void collectResource

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

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

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

2025-02-14 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/125807 >From 42bb34f66f0030f55e1055c4ee0b362511b7f45b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 4 Feb 2025 22:01:49 -0800 Subject: [PATCH 1/4] [HLSL] Implement default constant buffer `$Globals` All variab

  1   2   >