[clang] [HLSL] Add HLSLAttributedResourceType (PR #106181)

2024-08-27 Thread Helena Kotas via cfe-commits
@@ -799,6 +799,19 @@ static bool IsEquivalentExceptionSpec(StructuralEquivalenceContext &Context, return true; } +// Determine structural equivalence of two instances of +// HLSLAttributedResourceType::Attributes +static bool +IsStructurallyEquivalent(StructuralEquivalenceC

[clang] [HLSL] Add HLSLAttributedResourceType (PR #106181)

2024-08-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/106181 >From 11a6b3aac44889d39911a6704a9a963f29e92388 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 26 Aug 2024 12:13:09 -0700 Subject: [PATCH 1/7] Add HLSLAttributedResourceType - WIP --- clang/include/clang

[clang] [HLSL] Add HLSLAttributedResourceType (PR #106181)

2024-08-29 Thread Helena Kotas via cfe-commits
@@ -799,6 +799,19 @@ static bool IsEquivalentExceptionSpec(StructuralEquivalenceContext &Context, return true; } +// Determine structural equivalence of two instances of +// HLSLAttributedResourceType::Attributes +static bool +IsStructurallyEquivalent(StructuralEquivalenceC

[clang] [HLSL] Add HLSLAttributedResourceType (PR #106181)

2024-08-29 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/106181 >From 11a6b3aac44889d39911a6704a9a963f29e92388 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 26 Aug 2024 12:13:09 -0700 Subject: [PATCH 1/8] Add HLSLAttributedResourceType - WIP --- clang/include/clang

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-29 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/106657 Adjust register binding diagnostic flags code in a couple of ways: - Store the resource class in the Flags struct to avoid duplicated scanning for HLSLResourceClassAttribute - Avoid unnecessary indirection when c

[clang] [HLSL] Add HLSLAttributedResourceType (PR #106181)

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

[clang] [HLSL] Implement TransformHLSLAttributedResourceType (PR #106673)

2024-08-29 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/106673 Implements `TreeTransform::TransformHLSLAttributedResourceType` which will enable use of attributed resource types inside templates. Follow up from llvm/llvm-project#106181 Related to llvm/llvm-project#104861

[clang] [HLSL] Implement TransformHLSLAttributedResourceType (PR #106673)

2024-08-30 Thread Helena Kotas via cfe-commits
hekota wrote: > Tests? There are tests yet because the code that creates HLSLAttributedResourceType is not in yet. There will be tests for this included in the PR that switches resource attributes to be on types. I understand this is not ideal. I am just trying to reduce the size of that PR b

[clang] [HLSL] Implement TransformHLSLAttributedResourceType (PR #106673)

2024-08-30 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/106673 >From f060654648707f3bf7ecf68b01db8d7c0a8b2bf6 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 29 Aug 2024 23:51:54 -0700 Subject: [PATCH 1/2] [HLSL] Implement TransformHLSLAttributedResourceType to enabl

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Helena Kotas via cfe-commits
@@ -612,57 +588,61 @@ static RegisterBindingFlags HLSLFillRegisterBindingFlags(Sema &S, return Flags; } - if (!isDeclaredWithinCOrTBuffer(TheDecl)) { -// make sure the type is a basic / numeric type -if (TheVarDecl) { - QualType TheQualTy = TheVarDecl->get

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Helena Kotas via cfe-commits
@@ -480,6 +480,9 @@ struct RegisterBindingFlags { bool ContainsNumeric = false; bool DefaultGlobals = false; + + // used only when Resource == true + llvm::dxil::ResourceClass ResourceClass = llvm::dxil::ResourceClass::UAV; hekota wrote: Yes, the indivi

[clang] [HLSL] Implement TransformHLSLAttributedResourceType (PR #106673)

2024-08-30 Thread Helena Kotas via cfe-commits
hekota wrote: > Is there some other way to slice this so that there's a smaller part of your > larger change that can actually be tested? The thing is that we are already using resource attributes in many places, and they all need to be updated when we switch to having the attributes on types

[clang] [HLSL] Implement TransformHLSLAttributedResourceType (PR #106673)

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

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/106657 >From 214f801923d654f5fcc96241840aa7742cd0e85b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 29 Aug 2024 20:32:02 -0700 Subject: [PATCH 1/2] Improve code that fills resource binding flags --- clang/lib

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread Helena Kotas via cfe-commits
@@ -612,57 +588,61 @@ static RegisterBindingFlags HLSLFillRegisterBindingFlags(Sema &S, return Flags; } - if (!isDeclaredWithinCOrTBuffer(TheDecl)) { -// make sure the type is a basic / numeric type -if (TheVarDecl) { - QualType TheQualTy = TheVarDecl->get

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread Helena Kotas via cfe-commits
@@ -612,57 +588,61 @@ static RegisterBindingFlags HLSLFillRegisterBindingFlags(Sema &S, return Flags; } - if (!isDeclaredWithinCOrTBuffer(TheDecl)) { -// make sure the type is a basic / numeric type -if (TheVarDecl) { - QualType TheQualTy = TheVarDecl->get

[clang] [HLSL] Add test for export function redeclaration (PR #97370)

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

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-30 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/89809 >From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 23 Apr 2024 00:49:28 -0700 Subject: [PATCH 1/4] Add environment parameter to clang availability attribute ---

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-05-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/89809 >From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 23 Apr 2024 00:49:28 -0700 Subject: [PATCH 1/5] Add environment parameter to clang availability attribute ---

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-05-07 Thread Helena Kotas via cfe-commits
@@ -3859,7 +3862,7 @@ def warn_availability_fuchsia_unavailable_minor : Warning< InGroup; def warn_unguarded_availability : - Warning<"%0 is only available on %1 %2 or newer">, + Warning<"%0 %select{is only|is not}5 available %select{|in %4 environment }3on %1 %2 %select{

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-05-08 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/89809 >From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 23 Apr 2024 00:49:28 -0700 Subject: [PATCH 1/6] Add environment parameter to clang availability attribute ---

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

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

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-05-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/89809 >From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 23 Apr 2024 00:49:28 -0700 Subject: [PATCH 1/7] Add environment parameter to clang availability attribute ---

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-05-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/89809 >From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 23 Apr 2024 00:49:28 -0700 Subject: [PATCH 1/7] Add environment parameter to clang availability attribute ---

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/91699 None >From 6220a5f61f92c3161772fd7c2be9d387169f8e03 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 9 May 2024 22:14:05 -0700 Subject: [PATCH] Enable unguarded availability diagnostic on instantiated temp

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

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

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

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

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Helena Kotas via cfe-commits
@@ -177,16 +177,19 @@ void justAtAvailable(void) { #ifdef OBJCPP -int f(char) AVAILABLE_10_12; +int f(char) AVAILABLE_10_12; // #f_char_def int f(int); template int use_f() { - // FIXME: We should warn here! - return f(T()); + // expected-warning@#f_call {{'f' is only

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/91699 >From 6220a5f61f92c3161772fd7c2be9d387169f8e03 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 9 May 2024 22:14:05 -0700 Subject: [PATCH 1/2] Enable unguarded availability diagnostic on instantiated templa

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Helena Kotas via cfe-commits
@@ -177,16 +177,19 @@ void justAtAvailable(void) { #ifdef OBJCPP -int f(char) AVAILABLE_10_12; +int f(char) AVAILABLE_10_12; // #f_char_def int f(int); template int use_f() { - // FIXME: We should warn here! - return f(T()); hekota wrote: Thanks for t

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-05-13 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/89809 >From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 23 Apr 2024 00:49:28 -0700 Subject: [PATCH 1/7] Add environment parameter to clang availability attribute ---

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-05-14 Thread Helena Kotas via cfe-commits
@@ -18,14 +18,21 @@ namespace hlsl { #define _HLSL_BUILTIN_ALIAS(builtin) \ __attribute__((clang_builtin_alias(builtin))) -#define _HLSL_AVAILABILITY(environment, version) \ - __attribute__((availabil

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-05-14 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/89809 >From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 23 Apr 2024 00:49:28 -0700 Subject: [PATCH 1/8] Add environment parameter to clang availability attribute ---

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-05-14 Thread Helena Kotas via cfe-commits
@@ -18,14 +18,21 @@ namespace hlsl { #define _HLSL_BUILTIN_ALIAS(builtin) \ __attribute__((clang_builtin_alias(builtin))) -#define _HLSL_AVAILABILITY(environment, version) \ - __attribute__((availabil

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-05-14 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,140 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel5.0-compute -fsyntax-only -verify %s hekota wrote: Done. https://github.com/llvm/llvm-project/pull/89809 ___ cfe-commits mailing list cfe-commits@lists.

[clang] HLSL availability diagnostics documentation (PR #92207)

2024-05-14 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/92207 None >From 3df0ba0fd2171a0115427bc6ba5e3f8e84831747 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 14 May 2024 19:06:59 -0700 Subject: [PATCH 1/2] HLSL Availability Diagnostics Design Document - initial

[clang] HLSL availability diagnostics design doc (PR #92207)

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

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-15 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,53 @@ += +HLSL Availability Diagnostics += + +.. contents:: + :local: + +Introduction + + +HLSL availability diagnostics emits errors or warning when unavailable shader APIs are used. Unavailable sha

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-15 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92207 >From 3df0ba0fd2171a0115427bc6ba5e3f8e84831747 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 14 May 2024 19:06:59 -0700 Subject: [PATCH 1/3] HLSL Availability Diagnostics Design Document - initial commit

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

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

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-15 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92207 >From 3df0ba0fd2171a0115427bc6ba5e3f8e84831747 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 14 May 2024 19:06:59 -0700 Subject: [PATCH 1/4] HLSL Availability Diagnostics Design Document - initial commit

[clang] HLSL availability diagnostics design doc (PR #92207)

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

[clang] HLSL availability diagnostics design doc (PR #92207)

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

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-16 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92207 >From 3df0ba0fd2171a0115427bc6ba5e3f8e84831747 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 14 May 2024 19:06:59 -0700 Subject: [PATCH 1/5] HLSL Availability Diagnostics Design Document - initial commit

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-16 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92207 >From 3df0ba0fd2171a0115427bc6ba5e3f8e84831747 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 14 May 2024 19:06:59 -0700 Subject: [PATCH 1/6] HLSL Availability Diagnostics Design Document - initial commit

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-16 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,53 @@ += +HLSL Availability Diagnostics += + +.. contents:: + :local: + +Introduction + + +HLSL availability diagnostics emits errors or warning when unavailable shader APIs are used. Unavailable sha

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-16 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92207 >From 3df0ba0fd2171a0115427bc6ba5e3f8e84831747 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 14 May 2024 19:06:59 -0700 Subject: [PATCH 1/7] HLSL Availability Diagnostics Design Document - initial commit

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-05-17 Thread Helena Kotas via cfe-commits
hekota wrote: Right, and I am adding a lot more HLSL-specific tests in my upcoming PRs that implement the diagnostic modes under the SemaHLSL directory. There is a number of platform-specific tests for the availability attribute already here under Sema though

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-17 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92207 >From 3df0ba0fd2171a0115427bc6ba5e3f8e84831747 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 14 May 2024 19:06:59 -0700 Subject: [PATCH 1/8] HLSL Availability Diagnostics Design Document - initial commit

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-18 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92207 >From 3df0ba0fd2171a0115427bc6ba5e3f8e84831747 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 14 May 2024 19:06:59 -0700 Subject: [PATCH 1/8] HLSL Availability Diagnostics Design Document - initial commit

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-18 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92207 >From 3df0ba0fd2171a0115427bc6ba5e3f8e84831747 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 14 May 2024 19:06:59 -0700 Subject: [PATCH 1/9] HLSL Availability Diagnostics Design Document - initial commit

[clang] HLSL availability diagnostics design doc (PR #92207)

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

[clang] HLSL availability diagnostics design doc (PR #92207)

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

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

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

[clang] HLSL Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/92704 None >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH] HLSL Default and Relaxed Availability Diagnostics (#3) ---

[clang] [HLSL] - do not merge - Default and Relaxed Availability Diagnostics (PR #92703)

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

[clang] [HLSL] - do not merge - Default and Relaxed Availability Diagnostics (PR #92703)

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

[clang] HLSL Default and Relaxed Availability Diagnostics (PR #92704)

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

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

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

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92704 >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH 1/2] HLSL Default and Relaxed Availability Diagnostics (#3) --- cl

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92704 >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH 1/3] HLSL Default and Relaxed Availability Diagnostics (#3) --- cl

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-20 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92704 >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH 1/4] HLSL Default and Relaxed Availability Diagnostics (#3) --- cl

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

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

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-20 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92704 >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH 1/5] HLSL Default and Relaxed Availability Diagnostics (#3) --- cl

[clang] [HLSL][CMake] Cache files don't have generator vars (PR #92793)

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

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-23 Thread Helena Kotas via cfe-commits
@@ -290,3 +294,295 @@ void SemaHLSL::DiagnoseAttrStageMismatch( << A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage) << (AllowedStages.size() != 1) << join(StageStrings, ", "); } + +namespace { + +/// This class implements HLSL availability diagnostics for default

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-23 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92704 >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH 1/6] HLSL Default and Relaxed Availability Diagnostics (#3) --- cl

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-23 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92704 >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH 1/6] HLSL Default and Relaxed Availability Diagnostics (#3) --- cl

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-24 Thread Helena Kotas via cfe-commits
hekota wrote: Thanks Chris! https://github.com/llvm/llvm-project/pull/91699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

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

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-24 Thread Helena Kotas via cfe-commits
@@ -1081,6 +1088,12 @@ static llvm::Triple::EnvironmentType getEnvironmentType(llvm::StringRef Environm .Case("hull", llvm::Triple::Hull) .Case("domain", llvm::Triple::Domain) .Case("compute", llvm::Triple::Compute) + .Case("r

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-24 Thread Helena Kotas via cfe-commits
@@ -290,3 +294,295 @@ void SemaHLSL::DiagnoseAttrStageMismatch( << A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage) << (AllowedStages.size() != 1) << join(StageStrings, ", "); } + +namespace { + +/// This class implements HLSL availability diagnostics for default

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-24 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,108 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library \ +// RUN: -fsyntax-only -Wno-error=hlsl-availability -verify %s + +__attribute__((availability(shadermodel, introduced = 6.5))) +float fx(float); // #fx + +__attribute__((availability(shadermodel, intro

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-24 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute \ +// RUN: -fsyntax-only -verify %s + +__attribute__((availability(shadermodel, introduced = 6.5))) +float fx(float); // #fx + +__attribute__((availability(shadermodel, introduced = 5.0, environment = pi

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-24 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,108 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library \ +// RUN: -fsyntax-only -Wno-error=hlsl-availability -verify %s + +__attribute__((availability(shadermodel, introduced = 6.5))) +float fx(float); // #fx + +__attribute__((availability(shadermodel, intro

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-31 Thread Helena Kotas via cfe-commits
@@ -1390,7 +1390,8 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target, #include "clang/Basic/HLSLIntangibleTypes.def" } - if (Target.hasAArch64SVETypes()) { + if (Target.hasAArch64SVETypes() || hekota wrote: I don't see this change in this PR

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-31 Thread Helena Kotas via cfe-commits
@@ -23,7 +23,7 @@ export module b; import a; export int b(); -// CHECK: https://github.com/llvm/llvm-project/pull/97362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-31 Thread Helena Kotas via cfe-commits
@@ -115,6 +116,18 @@ GlobalVariable *replaceBuffer(CGHLSLRuntime::Buffer &Buf) { } // namespace +llvm::Type *CGHLSLRuntime::convertHLSLSpecificType(const Type *T) { + assert(T->isHLSLSpecificType() && "Not an HLSL specific type!"); + + // Check if the target has a specific

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-31 Thread Helena Kotas via cfe-commits
hekota wrote: > > I also don't see anywhere that actually successfully uses > > `__builtin_hlsl_resource_t`. Am I missing it, or should I not expect to see > > it? > > You are correct - the type cannot be directly declared in user code, so the > tests only check for errors and that the type s

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/95331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
hekota wrote: > Linking functions as internal should mean that they won't be included in the > final output if they don't have any calls. A test that verifies that behavior > would be useful. > > Even if they are called, a test that verifies that they have the "internal" > attribute applied w

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -1,5 +1,8 @@ // RUN: %clang_cc1 -triple dxil-unknown-shadermodel6.6-library -S -fnative-half-type -finclude-default-header -o - -ast-dump %s | FileCheck %s // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -967,6 +967,10 @@ static void checkUndefinedButUsed(Sema &S) { Func->getIdentifier()->isMangledOpenMPVariantName(); } } + // Do not warn on undefined internal functions in HLSL, they will get hekota wrote: Good

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -119,3 +119,16 @@ behavior between Clang and DXC. Some examples include: diagnostic notifying the user of the conversion rather than silently altering precision relative to the other overloads (as FXC does) or generating code that will fail validation (as DXC does). +

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -158,7 +158,8 @@ def FunctionTmpl def HLSLEntry : SubsetSubjectisExternallyVisible() && !isa(S)}], + [{S->getDeclContext()->getRedeclContext()->isFileContext() && +S->getStorageClass() != SC_Static}], hekota wrote:

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -119,3 +119,16 @@ behavior between Clang and DXC. Some examples include: diagnostic notifying the user of the conversion rather than silently altering precision relative to the other overloads (as FXC does) or generating code that will fail validation (as DXC does). +

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -119,3 +119,49 @@ behavior between Clang and DXC. Some examples include: diagnostic notifying the user of the conversion rather than silently altering precision relative to the other overloads (as FXC does) or generating code that will fail validation (as DXC does). +

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -353,6 +353,23 @@ llvm::Value *CGHLSLRuntime::emitInputSemantic(IRBuilder<> &B, return nullptr; } +void CGHLSLRuntime::emitFunctionProlog(const FunctionDecl *FD, + llvm::Function *Fn) { + if (!FD || !Fn) +return; + + if (FD->ha

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-02 Thread Helena Kotas via cfe-commits
@@ -664,11 +664,25 @@ LinkageComputer::getLVForNamespaceScopeDecl(const NamedDecl *D, if (PrevVar->getStorageClass() == SC_Static) return LinkageInfo::internal(); } + +if (Context.getLangOpts().HLSL && +Var->hasAttr()) + return LinkageInfo::i

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

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

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

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

[clang] [HLSL] Add __is_scalarized_layout_compatible (PR #102227)

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

[clang] [llvm] [HLSL] Add list of exported functions as named metadata node 'dx.exports` (PR #102275)

2024-08-06 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/102275 Adds list of exported functions as named metadata node 'dx.exports`. During CodeGen each exported functions is marked with an "hlsl.export" attribute. Based on these attributes the DXILTranslateMetadata pass wil

[clang] [llvm] [HLSL] Add list of exported functions as named metadata node 'dx.exports` (PR #102275)

2024-08-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/102275 >From 340834e9c1ea12c8de4ee9f5a6b7c0191e96f489 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 6 Aug 2024 23:19:20 -0700 Subject: [PATCH 1/2] [HLSL] Add list of exported functions as named metadata node '

[clang] [llvm] [HLSL] Add list of exported functions as named metadata node `dx.exports` (PR #102275)

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

[clang] [llvm] [HLSL] Add list of exported functions as named metadata node `dx.exports` (PR #102275)

2024-08-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/102275 >From 340834e9c1ea12c8de4ee9f5a6b7c0191e96f489 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 6 Aug 2024 23:19:20 -0700 Subject: [PATCH 1/3] [HLSL] Add list of exported functions as named metadata node '

[clang] [llvm] [HLSL] Add list of exported functions as named metadata node `dx.exports` (PR #102275)

2024-08-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/102275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add list of exported functions as named metadata node `dx.exports` (PR #102275)

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

[clang] [llvm] [HLSL] Add list of exported functions as named metadata node `dx.exports` (PR #102275)

2024-08-07 Thread Helena Kotas via cfe-commits
hekota wrote: > Could this be an analysis pass which collect the list as a > SmallVector instead of creating the list in 'dx.exports' metadata? You mean the DXILFinalizeLinkage pass (coming soon) that needs a list of entries and exported functions should get the information from "hlsl.shader"

[clang] [llvm] [HLSL] Add list of exported functions as named metadata node `dx.exports` (PR #102275)

2024-08-07 Thread Helena Kotas via cfe-commits
hekota wrote: > I mean DXILFinalizeLinkage pass could use an analysis pass to get the list of > export functions. The collecting of the list happens in the analysis pass. No > need to create a named metadata and remove it later. Sounds good. It will probably be easier for the DXILFinalizeLinka

<    1   2   3   4   5   6   7   8   9   >