[clang] [NFC][HLSL][DX] Update invalid environment tests (PR #81052)

2024-02-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. https://github.com/llvm/llvm-project/pull/81052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Prevent null pointer dereference in DiagnoseDeclAvailability() (PR #97095)

2024-07-01 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. https://github.com/llvm/llvm-project/pull/97095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Prevent null pointer dereference in DiagnoseDeclAvailability() (PR #97095)

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

[clang] [HLSL] Implement `export` keyword (PR #96823)

2024-07-01 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,56 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s -verify + +export void f1(); + +export void f1() {} + +namespace { // expected-note {{anonymous namespace begins here}} +export void f2(); // expected-error {{export declaration appear

[clang] [HLSL] Implement `export` keyword (PR #96823)

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

[clang] [HLSL] Run availability diagnostic on exported functions (PR #97352)

2024-07-01 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/97352 Implements availability diagnostic on `export` functions. For shader libraries the HLSL availability diagnostic should run on all entry points and export functions. Now that the `export` keyword is implemented,

[clang] [HLSL] Run availability diagnostic on exported functions (PR #97352)

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

[clang] [HLSL] Run availability diagnostic on exported functions (PR #97352)

2024-07-01 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/97352 >From b67ecd20cc2c11f4f99c2d90c95fdbd988659947 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 26 Jun 2024 12:31:39 -0700 Subject: [PATCH 1/5] [HLSL] Implement `export` keyword Fixes #92812 --- .../clang/

[clang] [HLSL] Run availability diagnostic on exported functions (PR #97352)

2024-07-01 Thread Helena Kotas via cfe-commits
@@ -129,6 +129,55 @@ class MyClass } }; +// Exported function without body - not used +export void exportedFunctionUnused(float f); hekota wrote: Good catch! This is currently not reporting an error and the redeclaration is not recognized as exported funct

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

2024-07-01 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/97362 llvm/llvm-project#90631 >From a07ea8d187cbba5717b89f5c54138f12993b3ee8 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 6 Jun 2024 11:44:56 -0700 Subject: [PATCH 1/4] wip: Stub out adding an HLSLResource

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

2024-07-01 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited 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] Run availability diagnostic on exported functions (PR #97352)

2024-07-01 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/97352 >From b67ecd20cc2c11f4f99c2d90c95fdbd988659947 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 26 Jun 2024 12:31:39 -0700 Subject: [PATCH 1/6] [HLSL] Implement `export` keyword Fixes #92812 --- .../clang/

[clang] [HLSL] Run availability diagnostic on exported functions (PR #97352)

2024-07-01 Thread Helena Kotas via cfe-commits
@@ -129,6 +129,55 @@ class MyClass } }; +// Exported function without body - not used +export void exportedFunctionUnused(float f); hekota wrote: Done. https://github.com/llvm/llvm-project/pull/97352 ___ cfe-comm

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

2024-07-01 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/97370 Related to llvm/llvm-project#92812 >From 21a7e8bc992ff6e743d0a027469a83e24c48c1d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 1 Jul 2024 18:30:20 -0700 Subject: [PATCH] [HLSL] Add test for export funct

[clang] [HLSL] Run availability diagnostic on exported functions (PR #97352)

2024-07-01 Thread Helena Kotas via cfe-commits
@@ -129,6 +129,55 @@ class MyClass } }; +// Exported function without body - not used +export void exportedFunctionUnused(float f); hekota wrote: Also adding test for this here: https://github.com/llvm/llvm-project/pull/97370 https://github.com/llvm/llvm-p

[clang] [HLSL] Run availability diagnostic on exported functions (PR #97352)

2024-07-02 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/97352 >From b67ecd20cc2c11f4f99c2d90c95fdbd988659947 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 26 Jun 2024 12:31:39 -0700 Subject: [PATCH 1/6] [HLSL] Implement `export` keyword Fixes #92812 --- .../clang/

[clang] [HLSL] Run availability diagnostic on exported functions (PR #97352)

2024-07-02 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/97352 ___ 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-07-02 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/97362 >From a07ea8d187cbba5717b89f5c54138f12993b3ee8 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 6 Jun 2024 11:44:56 -0700 Subject: [PATCH 1/5] wip: Stub out adding an HLSLResource builtin type There are a

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

2024-07-02 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/97362 >From a07ea8d187cbba5717b89f5c54138f12993b3ee8 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 6 Jun 2024 11:44:56 -0700 Subject: [PATCH 1/6] wip: Stub out adding an HLSLResource builtin type There are a

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

2024-07-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/97362 >From a07ea8d187cbba5717b89f5c54138f12993b3ee8 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 6 Jun 2024 11:44:56 -0700 Subject: [PATCH 1/6] wip: Stub out adding an HLSLResource builtin type There are a

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

2024-07-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/97362 >From a07ea8d187cbba5717b89f5c54138f12993b3ee8 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 6 Jun 2024 11:44:56 -0700 Subject: [PATCH 1/6] wip: Stub out adding an HLSLResource builtin type There are a

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

2024-07-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited 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] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited 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] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited 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] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited 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] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review 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] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-03 Thread Helena Kotas via cfe-commits
hekota wrote: @ChuanqiXu9 - any idea why is your new test `Modules/no-external-type-id.cppm` failing on my PR? It is expecting `// CHECK: https://github.com/llvm/llvm-project/pull/97362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

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

2024-07-03 Thread Helena Kotas via cfe-commits
@@ -757,7 +757,8 @@ void USRGenerator::VisitType(QualType T) { case BuiltinType::OCLReserveID: Out << "@BT@OCLReserveID"; break; case BuiltinType::OCLSampler: - Out << "@BT@OCLSampler"; break; + Out << "@BT@OCLSampler"; + bre

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

2024-07-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/97362 >From a07ea8d187cbba5717b89f5c54138f12993b3ee8 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 6 Jun 2024 11:44:56 -0700 Subject: [PATCH 1/7] wip: Stub out adding an HLSLResource builtin type There are a

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

2024-07-03 Thread Helena Kotas via cfe-commits
@@ -2241,6 +2247,11 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const { Align = ALIGN; \ break; #include "clang/Basic/AMDGPUTypes.def" +#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case Buil

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

2024-07-03 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-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited 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] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-03 Thread Helena Kotas via cfe-commits
hekota wrote: > I see many places where extra cases have been added for the intangible types > but no corresponding tests. Is that ok? How did you know to update these > places? I looked at similar types in other languages, such as the `image*` types in [OpenCL](https://github.com/llvm/llvm-p

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

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

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/107160 Fixes #104861 >From 337a9ed1d5e7c71fb5be5741afe7726f5b76af7b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 3 Sep 2024 15:30:50 -0700 Subject: [PATCH] [HLSL] Apply resource attributes to the resource ty

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107160 >From 337a9ed1d5e7c71fb5be5741afe7726f5b76af7b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 3 Sep 2024 15:30:50 -0700 Subject: [PATCH 1/2] [HLSL] Apply resource attributes to the resource type rather t

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 01/12] Implement `__builtin_is_intangible` --- clang/include/clan

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 01/12] Implement `__builtin_is_intangible` --- clang/include/clan

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

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

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107160 >From 337a9ed1d5e7c71fb5be5741afe7726f5b76af7b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 3 Sep 2024 15:30:50 -0700 Subject: [PATCH 1/3] [HLSL] Apply resource attributes to the resource type rather t

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

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

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

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

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

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

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 01/13] Implement `__builtin_is_intangible` --- clang/include/clan

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 01/14] Implement `__builtin_is_intangible` --- clang/include/clan

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 01/15] Implement `__builtin_is_intangible` --- clang/include/clan

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

2024-09-04 Thread Helena Kotas via cfe-commits
hekota wrote: Thank you @kazutakahirata! I will remove the code; the consistency check is repeated later in a called function. https://github.com/llvm/llvm-project/pull/106657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 01/16] Implement `__builtin_is_intangible` --- clang/include/clan

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107160 >From 337a9ed1d5e7c71fb5be5741afe7726f5b76af7b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 3 Sep 2024 15:30:50 -0700 Subject: [PATCH 1/4] [HLSL] Apply resource attributes to the resource type rather t

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-04 Thread Helena Kotas via cfe-commits
@@ -5695,6 +5696,15 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, return true; return false; } + case UTT_IsIntangibleType: +assert(Self.getLangOpts().HLSL && "intangible types are HLSL-only feature"); +if (!T->isVoidType() && !T->isI

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-04 Thread Helena Kotas via cfe-commits
@@ -249,4 +249,8 @@ FIELD(HasDeclaredCopyAssignmentWithConstParam, 1, MERGE_OR) /// base classes or fields have a no-return destructor FIELD(IsAnyDestructorNoReturn, 1, NO_MERGE) +/// Whether the record type is intangible (if any base classes or fields have +/// type that is i

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Helena Kotas via cfe-commits
@@ -77,6 +77,23 @@ class SemaHLSL : public SemaBase { ExprResult ActOnOutParamExpr(ParmVarDecl *Param, Expr *Arg); QualType getInoutParameterType(QualType Ty); + + // FIXME: This can be hidden (as static function in SemaHLSL.cpp) once we no + // longer need to create bui

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Helena Kotas via cfe-commits
@@ -1,32 +1,32 @@ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s - -// CHECK: -HLSLResourceClassAttr 0x{{[0-9a-f]+}} SRV -struct Eg1 { - [[hlsl::resource_class(SRV)]] int i; +// CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} {{.*}}

[clang] [HLSL] Remove variables that are used only in assert (PR #107299)

2024-09-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/107299 Changes the assert to test the same condition without using the variables. This change is done in response to a comment [here](https://github.com/llvm/llvm-project/pull/106657#issuecomment-2327493439). >From

[clang] [HLSL] Remove variables that are used only in assert (PR #107299)

2024-09-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107299 >From 038e47d8ec75c03b895eb8bb5540f1fee9f4b936 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 4 Sep 2024 12:55:43 -0700 Subject: [PATCH 1/2] [HLSL] Remove variables used only in assert --- clang/lib/Sem

[clang] [HLSL] Remove variables that are used only in assert (PR #107299)

2024-09-04 Thread Helena Kotas via cfe-commits
@@ -834,17 +834,10 @@ static void ValidateMultipleRegisterAnnotations(Sema &S, Decl *TheDecl, static void DiagnoseHLSLRegisterAttribute(Sema &S, SourceLocation &ArgLoc, Decl *TheDecl, RegisterType regType) { - // Samplers, UAVs, and

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

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

[clang] [HLSL] Remove variables that are used only in assert (PR #107299)

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

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Helena Kotas via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Helena Kotas via cfe-commits
@@ -2062,6 +2066,7 @@ void TypePrinter::printBTFTagAttributedAfter(const BTFTagAttributedType *T, void TypePrinter::printHLSLAttributedResourceBefore( const HLSLAttributedResourceType *T, raw_ostream &OS) { printBefore(T->getWrappedType(), OS); + printAfter(T->getWrappe

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Helena Kotas via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107160 >From 337a9ed1d5e7c71fb5be5741afe7726f5b76af7b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 3 Sep 2024 15:30:50 -0700 Subject: [PATCH 1/5] [HLSL] Apply resource attributes to the resource type rather t

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107160 >From 337a9ed1d5e7c71fb5be5741afe7726f5b76af7b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 3 Sep 2024 15:30:50 -0700 Subject: [PATCH 1/6] [HLSL] Apply resource attributes to the resource type rather t

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107160 >From 337a9ed1d5e7c71fb5be5741afe7726f5b76af7b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 3 Sep 2024 15:30:50 -0700 Subject: [PATCH 1/6] [HLSL] Apply resource attributes to the resource type rather t

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-05 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104856 >From 44e814b925a1ad8ac40fe6904542cbade516c065 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 19 Aug 2024 13:34:13 -0700 Subject: [PATCH 1/4] [DirectX] Add DirectXTargetCodeGenInfo Adds TargetCodeGenInfo

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-05 Thread Helena Kotas via cfe-commits
hekota wrote: > It would be good to have some test coverage to go along with this. Test added. https://github.com/llvm/llvm-project/pull/104856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-05 Thread Helena Kotas via cfe-commits
hekota wrote: > We should be able to test this by defining a global or calling a function > with the `__hlsl_resource_t` type. Test added. https://github.com/llvm/llvm-project/pull/104856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-05 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,53 @@ +//===- DirectX.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: Apa

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Helena Kotas via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-05 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,53 @@ +//===- DirectX.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: Apa

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-05 Thread Helena Kotas via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

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

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104856 >From 44e814b925a1ad8ac40fe6904542cbade516c065 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 19 Aug 2024 13:34:13 -0700 Subject: [PATCH 1/6] [DirectX] Add DirectXTargetCodeGenInfo Adds TargetCodeGenInfo

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-09 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s + +void foo(__hlsl_resource_t res); + +// CHECK: define void @"?bar@@YAXU__hlsl_resource_t@@@Z"(target("dx.TypedBuffer", <4 x float>, 1, 0,

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-09 Thread Helena Kotas via cfe-commits
@@ -879,6 +879,10 @@ static TargetTypeInfo getTargetTypeInfo(const TargetExtType *Ty) { ScalableVectorType::get(Type::getInt8Ty(C), TotalNumElts)); } + // DirectX intangible types + if (Name.starts_with("dx.")) +return TargetTypeInfo(PointerType::get(C, 0), Ta

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-09 Thread Helena Kotas via cfe-commits
@@ -879,6 +879,10 @@ static TargetTypeInfo getTargetTypeInfo(const TargetExtType *Ty) { ScalableVectorType::get(Type::getInt8Ty(C), TotalNumElts)); } + // DirectX intangible types + if (Name.starts_with("dx.")) hekota wrote: I have updated the co

[clang] [HLSL] Add `[[hlsl::row_access]]` attribute (PR #107954)

2024-09-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/107954 This PR introduces new HLSL resource type attribute `[[hlsl::row_access]]`. Presence of this attribute on a resource handle means that the resource must be accessed in 16-byte blocks at-a-time, or four 32-bit co

[clang] [HLSL] Add `[[hlsl::row_access]]` attribute (PR #107954)

2024-09-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107954 >From 1c66d2767ca20f42b6edaae834cc186be7d23712 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 9 Sep 2024 19:39:02 -0700 Subject: [PATCH 1/2] [HLSL] Add `[[hlsl::row_access]]` attribute This PR introduces

[clang] [HLSL] Warn on duplicate is_rov attribute; remove unnecessary parentheses (PR #107973)

2024-09-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/107973 We should issue a warning whenever a duplicate resource type attribute is found. Currently we do that only for `resource_class`. This PR fixes that by checking for duplicate `is_rov` attributes as well. Also re

[clang] [HLSL] Add `[[hlsl::row_access]]` attribute (PR #107954)

2024-09-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107954 >From 1c66d2767ca20f42b6edaae834cc186be7d23712 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 9 Sep 2024 19:39:02 -0700 Subject: [PATCH 1/3] [HLSL] Add `[[hlsl::row_access]]` attribute This PR introduces

[clang] [HLSL] Add `[[hlsl::row_access]]` attribute (PR #107954)

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

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104856 >From 44e814b925a1ad8ac40fe6904542cbade516c065 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 19 Aug 2024 13:34:13 -0700 Subject: [PATCH 1/7] [DirectX] Add DirectXTargetCodeGenInfo Adds TargetCodeGenInfo

[clang] [HLSL] Warn on duplicate is_rov attribute; remove unnecessary parentheses (PR #107973)

2024-09-10 Thread Helena Kotas via cfe-commits
@@ -8844,7 +8844,11 @@ static void processTypeAttrs(TypeProcessingState &state, QualType &type, } case ParsedAttr::AT_HLSLResourceClass: case ParsedAttr::AT_HLSLROV: { - if (state.getSema().HLSL().handleResourceTypeAttr(attr)) + // Only collect HLSL resou

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

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

[clang] [HLSL] Warn on duplicate is_rov attribute; remove unnecessary parentheses (PR #107973)

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

[clang] [HLSL] Add `[[hlsl::row_access]]` attribute (PR #107954)

2024-09-10 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107954 >From 1c66d2767ca20f42b6edaae834cc186be7d23712 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 9 Sep 2024 19:39:02 -0700 Subject: [PATCH 1/4] [HLSL] Add `[[hlsl::row_access]]` attribute This PR introduces

[clang] [llvm] [HLSL] Mark exported functions with "hlsl.export" attribute (PR #102275)

2024-08-13 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed 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] [HLSL] Split out the ROV attribute from the resource attribute, make it a new spellable attribute. (PR #102414)

2024-08-13 Thread Helena Kotas via cfe-commits
@@ -296,12 +296,13 @@ void CGHLSLRuntime::annotateHLSLResource(const VarDecl *D, GlobalVariable *GV) { for (auto *FD : RD->fields()) { const auto *HLSLResAttr = FD->getAttr(); const auto *HLSLResClassAttr = FD->getAttr(); +const auto *ROVAttr = FD->getAttr(); ---

[clang] [HLSL] Split out the ROV attribute from the resource attribute, make it a new spellable attribute. (PR #102414)

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

[clang] [HLSL] Split out the ROV attribute from the resource attribute, make it a new spellable attribute. (PR #102414)

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

[clang] [HLSL] Implement '__builtin_is_intangible' type trait (PR #104544)

2024-08-15 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/104544 Implements `__builtin_is_intangible` type trait. HLSL intangible types are special implementation-defined types such as resource handles or samplers. Any class that is an array of intangible type or contains ba

[clang] [HLSL] Implement '__builtin_is_intangible' type trait (PR #104544)

2024-08-15 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 1/4] Implement `__builtin_is_intangible` --- clang/include/clang/

[clang] [HLSL] Implement '__builtin_is_intangible' type trait (PR #104544)

2024-08-15 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 1/5] Implement `__builtin_is_intangible` --- clang/include/clang/

[clang] [HLSL] Implement '__builtin_is_intangible' type trait (PR #104544)

2024-08-15 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 1/6] Implement `__builtin_is_intangible` --- clang/include/clang/

[clang] [HLSL] Implement '__builtin_is_intangible' type trait (PR #104544)

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

[clang] Fix spurious non-strict availability warning (PR #94377)

2024-06-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota commented: LGTM! https://github.com/llvm/llvm-project/pull/94377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Use llvm::Triple::EnvironmentType instead of HLSLShaderAttr::ShaderType (PR #93847)

2024-06-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/93847 >From dd175a247480396b9d35cb995333fcd14152e347 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 29 May 2024 18:38:45 -0700 Subject: [PATCH 1/3] [HLSL] Use llvm::Triple::EnvironmentType instead of ShaderType

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

2024-06-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/93336 ___ 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 (PR #93336)

2024-06-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/93336 ___ 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 (PR #93336)

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

  1   2   3   4   5   6   7   8   9   >