https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/123394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota ready_for_review
https://github.com/llvm/llvm-project/pull/123394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/123394
>From 1d04bfa8e1b138a13acf30c3fc46428d3b260569 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Fri, 17 Jan 2025 12:40:21 -0800
Subject: [PATCH 1/2] [HLSL] Fix global resource initialization
Fixes #120636
---
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/123394
>From 1d04bfa8e1b138a13acf30c3fc46428d3b260569 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Fri, 17 Jan 2025 12:40:21 -0800
Subject: [PATCH 1/2] [HLSL] Fix global resource initialization
Fixes #120636
---
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/123394
Create separate resource initialization function for each resource and add them
to CodeGenModule's `CXXGlobalInits` list. fixes Fixes #120636 and addresses
this [comment
](https://github.com/llvm/llvm-project/p
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/122820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/122820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/122820
>From 71ddb5a2b4cc8a9609410b436e896484401f5e90 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Mon, 13 Jan 2025 15:03:12 -0800
Subject: [PATCH 1/4] [HLSL] cbuffer: Create host layout struct and add
resource ha
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/122103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5362,6 +5362,23 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const
VarDecl *D) {
if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS))
return AS;
}
+
+ if (LangOpts.HLSL) {
+if (D == nullptr)
+ return LangAS::hlsl_private;
+
+// Except
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/122820
>From 71ddb5a2b4cc8a9609410b436e896484401f5e90 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Mon, 13 Jan 2025 15:03:12 -0800
Subject: [PATCH 1/3] [HLSL] cbuffer: Create host layout struct and add
resource ha
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/122820
>From 71ddb5a2b4cc8a9609410b436e896484401f5e90 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Mon, 13 Jan 2025 15:03:12 -0800
Subject: [PATCH 1/2] [HLSL] cbuffer: Create host layout struct and add
resource ha
@@ -253,12 +257,253 @@ static void validatePackoffset(Sema &S, HLSLBufferDecl
*BufDecl) {
}
}
+// Returns true if the array has a zero size = if any of the dimensions is 0
+static bool isZeroSizedArray(const ConstantArrayType *CAT) {
+ while (CAT && !CAT->isZeroSize())
+
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/122820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -253,12 +257,253 @@ static void validatePackoffset(Sema &S, HLSLBufferDecl
*BufDecl) {
}
}
+// Returns true if the array has a zero size = if any of the dimensions is 0
+static bool isZeroSizedArray(const ConstantArrayType *CAT) {
+ while (CAT && !CAT->isZeroSize())
+
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/122820
>From 71ddb5a2b4cc8a9609410b436e896484401f5e90 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Mon, 13 Jan 2025 15:03:12 -0800
Subject: [PATCH] [HLSL] cbuffer: Create host layout struct and add resource
handle
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/121989
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -194,17 +196,19 @@ static unsigned calculateLegacyCbufferSize(const
ASTContext &Context,
calculateLegacyCbufferSize(Context, VT->getElementType());
Size = ElementSize * ElementCount;
} else {
-Size = Context.getTypeSize(T);
+Size = Context.getTypeSize(
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/121989
>From f68ea5a099636f840561335dcf2daaed82c7405c Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 7 Jan 2025 12:07:28 -0800
Subject: [PATCH 1/2] [HLSL][NFC] Move packoffset validation to separate
function an
@@ -219,33 +223,41 @@ void SemaHLSL::ActOnFinishBuffer(Decl *Dcl,
SourceLocation RBrace) {
}
}
- if (HasPackOffset && HasNonPackOffset)
-Diag(BufDecl->getLocation(), diag::warn_hlsl_packoffset_mix);
-
- if (HasPackOffset) {
-ASTContext &Context = getASTContext
@@ -4721,9 +4721,9 @@ def HLSLPackOffset: HLSLAnnotationAttr {
let Args = [IntArgument<"Subcomponent">, IntArgument<"Component">];
let Documentation = [HLSLPackOffsetDocs];
let AdditionalMembers = [{
- unsigned getOffset() {
-return subcomponent * 4 + compone
@@ -219,33 +223,41 @@ void SemaHLSL::ActOnFinishBuffer(Decl *Dcl,
SourceLocation RBrace) {
}
}
- if (HasPackOffset && HasNonPackOffset)
hekota wrote:
This is best to review with 'Hide whitespaces'
https://github.com/llvm/llvm-project/pull/121989
https://github.com/hekota ready_for_review
https://github.com/llvm/llvm-project/pull/121989
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/121989
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/121989
>From f68ea5a099636f840561335dcf2daaed82c7405c Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 7 Jan 2025 12:07:28 -0800
Subject: [PATCH] [HLSL][NFC] Move packoffset validation to separate function
and ca
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/121989
There will be more changes coming in to `SemaHLSL::ActOnFinishBuffer` so it
would be good to move the packoffset validation out to a separate function.
This PR also unifies the units for cbuffer offset calculati
https://github.com/hekota converted_to_draft
https://github.com/llvm/llvm-project/pull/119755
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/120663
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota ready_for_review
https://github.com/llvm/llvm-project/pull/120663
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/120663
Adds `T Load(int)` method on `StructuredBuffer`, `RWStructuredBuffer` and
`RasterizerOrderedStructuredBuffer`.
Uses the existing `addLoadMethods` in HLSLExternalSemalSource so most of this
change is just tests.
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/119755
>From 8cebb59304a1f893d94f2a758bc47a62f27c1b8b Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 12 Dec 2024 11:37:46 -0800
Subject: [PATCH 1/4] [HLSL] Codegen for simple `cbuffer` blocks without
embedded a
https://github.com/hekota ready_for_review
https://github.com/llvm/llvm-project/pull/119755
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/119755
>From 8cebb59304a1f893d94f2a758bc47a62f27c1b8b Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 12 Dec 2024 11:37:46 -0800
Subject: [PATCH 1/3] [HLSL] Codegen for simple `cbuffer` blocks without
embedded a
https://github.com/hekota approved this pull request.
LGTM! Please add [HLSL] to the title.
https://github.com/llvm/llvm-project/pull/119643
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump
-ast-dump-filter=__is_structured_resource_element_compatible %s | FileCheck %s
+
+// CHECK: ConceptDecl 0x{{[0-9a-f]+}} <>
__is_structured_resource_element_compatible
+// CHECK: |-Temp
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump
-ast-dump-filter=__is_structured_resource_element_compatible %s | FileCheck %s
+
+// CHECK: ConceptDecl 0x{{[0-9a-f]+}} <>
__is_structured_resource_element_compatible
+// CHECK: |-Temp
https://github.com/hekota converted_to_draft
https://github.com/llvm/llvm-project/pull/119755
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hekota wrote:
Thank you @Fznamznon !
https://github.com/llvm/llvm-project/pull/120090
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -54,69 +54,110 @@ void addDxilValVersion(StringRef ValVersionStr,
llvm::Module &M) {
auto *DXILValMD = M.getOrInsertNamedMetadata(DXILValKey);
DXILValMD->addOperand(Val);
}
+
void addDisableOptimizations(llvm::Module &M) {
StringRef Key = "dx.disable_optimizations";
@@ -868,8 +868,54 @@ static Expr *constructTypedBufferConstraintExpr(Sema &S,
SourceLocation NameLoc,
return TypedResExpr;
}
-static ConceptDecl *constructTypedBufferConceptDecl(Sema &S,
-NamespaceDecl *NSD) {
+static Expr
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/119755
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -164,18 +164,18 @@ Decl *SemaHLSL::ActOnStartBuffer(Scope *BufferScope, bool
CBuffer,
return Result;
}
-// Calculate the size of a legacy cbuffer type based on
+// Calculate the size of a legacy cbuffer type in bytes based on
//
https://learn.microsoft.com/en-us/window
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/119755
>From 8cebb59304a1f893d94f2a758bc47a62f27c1b8b Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Thu, 12 Dec 2024 11:37:46 -0800
Subject: [PATCH 1/2] [HLSL] Codegen for simple `cbuffer` blocks without
embedded a
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/119755
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota ready_for_review
https://github.com/llvm/llvm-project/pull/119755
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,26 +0,0 @@
-// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
-
-// CHECK: @[[CB:.+]] = external constant { float, double }
-cbuffer A : register(b0, spa
@@ -54,69 +54,110 @@ void addDxilValVersion(StringRef ValVersionStr,
llvm::Module &M) {
auto *DXILValMD = M.getOrInsertNamedMetadata(DXILValKey);
DXILValMD->addOperand(Val);
}
+
void addDisableOptimizations(llvm::Module &M) {
hekota wrote:
Intentional wh
@@ -164,18 +164,18 @@ Decl *SemaHLSL::ActOnStartBuffer(Scope *BufferScope, bool
CBuffer,
return Result;
}
-// Calculate the size of a legacy cbuffer type based on
+// Calculate the size of a legacy cbuffer type in bytes based on
hekota wrote:
Cbuffer & pac
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/119755
Introduces translations of `cbuffer` to LLVM target type `target("dx.CBuffer",
...) `. At this point only `cbuffer`s containing scalars and vectors are
supported as we are still working on the target type design
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/119311
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hekota wrote:
You are correct @llvm-beanz, this change is not needed at all. Sorry for
wasting your time!
https://github.com/llvm/llvm-project/pull/119311
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
hekota wrote:
> Is this the right solution, or should we be doing something to force the
> constructor function to be generated? I'm a little worried that we have one
> path for initializing some types of globals and a different approach for
> other globals.
I'll see if I can move creation of
https://github.com/hekota converted_to_draft
https://github.com/llvm/llvm-project/pull/119311
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/118536
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hekota wrote:
LGTM!
https://github.com/llvm/llvm-project/pull/115971
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/116699
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -540,10 +555,10 @@ struct BuiltinTypeMethodBuilder {
// create method decl
auto *TSInfo = AST.getTrivialTypeSourceInfo(MethodTy, SourceLocation());
-Method =
-CXXMethodDecl::Create(AST, DeclBuilder.Record, SourceLocation(),
-
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/118536
>From 97391c97c16029e2a3376ff2938ebc7e94393149 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 3 Dec 2024 11:13:47 -0800
Subject: [PATCH 1/2] [HLSL] Add Append and Consume methods on
Append/ConsumeStructu
@@ -674,6 +700,34 @@
BuiltinTypeDeclBuilder::addHandleAccessFunction(DeclarationName &Name,
.finalizeMethod();
}
+BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addAppendMethod() {
+ using PH = BuiltinTypeMethodBuilder::PlaceHolder;
+ ASTContext &AST = SemaRef.getAST
@@ -674,6 +700,34 @@
BuiltinTypeDeclBuilder::addHandleAccessFunction(DeclarationName &Name,
.finalizeMethod();
}
+BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addAppendMethod() {
+ using PH = BuiltinTypeMethodBuilder::PlaceHolder;
+ ASTContext &AST = SemaRef.getAST
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/118536
The methods are using existing clang builtins
`__builtin_hlsl_buffer_update_counter` and `__builtin_hlsl_resource_getpointer`
to update the buffer counter and then load or store the value.
Fixes #112968
>From
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/116699
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm
-disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-DXIL
+// RUN-DISABLED: %clang_cc1 -triple spirv-vulkan-library -x hlsl -emit-llvm
-disable-llvm-passes -o - %s
@@ -0,0 +1,49 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump
-DEMPTY \
hekota wrote:
Since the test now covers multiple buffers please rename it to
ByteAddressBuffer**s**-AST.hlsl and update the PR title and description.
https:
https://github.com/hekota approved this pull request.
https://github.com/llvm/llvm-project/pull/117017
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -502,7 +520,10 @@ struct BuiltinTypeMethodBuilder {
HLSLParamModifierAttr::Spelling Modifier =
HLSLParamModifierAttr::Keyword_in) {
assert(Method == nullptr && "Cannot add param, method already
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/117659
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/117659
This is a test-only change. This PR merges 5 tests for structured buffers ASTs
into one file with multiple run lines and check prefixes because these tests
have a lot of common output. It also renames RWBuffer-A
@@ -343,27 +336,224 @@ struct TemplateParameterListBuilder {
Params.clear();
QualType T = Builder.Template->getInjectedClassNameSpecialization();
-T = S.Context.getInjectedClassNameType(Builder.Record, T);
+T = AST.getInjectedClassNameType(Builder.Record, T);
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/117608
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -271,53 +246,70 @@ struct BuiltinTypeDeclBuilder {
return *this;
}
+ FieldDecl *getResourceHandleField() {
+FieldDecl *FD = Fields["h"];
hekota wrote:
Yeah, it would probably work fine too, if default value `ValueTy()` just means
`nullptr` when
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/117608
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/114148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hekota wrote:
[First version](llvm/llvm-project#114148) of this PR was reverted because of
build break.
https://github.com/llvm/llvm-project/pull/117608
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/lis
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/117448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/117448
This reverts commit 94bde8cdc39ff7e9c59ee0cd5edda882955242aa.
>From 4edec79a02e7d32fe16e257f6151669a2f009d85 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Sat, 23 Nov 2024 11:43:29 -0800
Subject: [PATCH] Rev
https://github.com/hekota closed
https://github.com/llvm/llvm-project/pull/114148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -67,6 +67,7 @@ struct BuiltinTypeDeclBuilder {
Record = CXXRecordDecl::Create(AST, TagDecl::TagKind::Class, HLSLNamespace,
SourceLocation(), SourceLocation(), &II,
PrevDecl, true);
+Record->startDe
@@ -1474,6 +1474,11 @@ DeclContext *DeclContext::getPrimaryContext() {
case Decl::ObjCCategoryImpl:
return this;
+ case Decl::CXXRecord:
+if (auto *OPD = dyn_cast(this))
+ if (auto *Def = OPD->getDefinition())
+return Def;
+return this;
default:
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/117017
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2,36 +2,36 @@
// RUN: %clang_cc1 -triple spirv-pc-vulkan-compute -finclude-default-header
-fnative-half-type -emit-llvm -o - %s | FileCheck %s -check-prefixes=SPIRV
// NOTE: The type name number and whether the struct is packed or not will
mostly
-// likely change once s
@@ -12487,6 +12487,7 @@ def err_hlsl_pointers_unsupported : Error<
"%select{pointers|references}0 are unsupported in HLSL">;
def err_hlsl_missing_resource_class : Error<"HLSL resource needs to have
[[hlsl::resource_class()]] attribute">;
def err_hlsl_attribute_needs_intangib
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/116699
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1474,6 +1474,11 @@ DeclContext *DeclContext::getPrimaryContext() {
case Decl::ObjCCategoryImpl:
return this;
+ case Decl::CXXRecord:
+if (auto *OPD = dyn_cast(this))
+ if (auto *Def = OPD->getDefinition())
+return Def;
+return this;
default:
@@ -2,36 +2,36 @@
// RUN: %clang_cc1 -triple spirv-pc-vulkan-compute -finclude-default-header
-fnative-half-type -emit-llvm -o - %s | FileCheck %s -check-prefixes=SPIRV
// NOTE: The type name number and whether the struct is packed or not will
mostly
-// likely change once s
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/117017
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -12487,6 +12487,7 @@ def err_hlsl_pointers_unsupported : Error<
"%select{pointers|references}0 are unsupported in HLSL">;
def err_hlsl_missing_resource_class : Error<"HLSL resource needs to have
[[hlsl::resource_class()]] attribute">;
def err_hlsl_attribute_needs_intangib
@@ -1,28 +1,28 @@
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute
-finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s
-check-prefixes=DXIL
// NOTE: The number in type name and whether the struct is packed or not will
mostly
-// likely cha
https://github.com/hekota approved this pull request.
Few nits, otherwise LGTM!
https://github.com/llvm/llvm-project/pull/117017
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4738,6 +4738,12 @@ def GetDeviceSideMangledName : LangBuiltin<"CUDA_LANG"> {
}
// HLSL
+def HLSLTypedBufferPointer : LangBuiltin<"HLSL_LANG"> {
+ let Spellings = ["__builtin_hlsl_resource_getpointer"];
hekota wrote:
Is this for all buffer types or just t
@@ -1,22 +1,22 @@
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute
-finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s
// NOTE: The number in type name and whether the struct is packed or not will
mostly
-// likely change once subscript ope
@@ -1,22 +1,22 @@
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute
-finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s
// NOTE: The number in type name and whether the struct is packed or not will
mostly
-// likely change once subscript ope
@@ -531,6 +531,16 @@ void
HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() {
.addArraySubscriptOperators()
.completeDefinition();
});
+
+ Decl = BuiltinTypeDeclBuilder(*SemaPtr, HLSLNamespace, "ByteAddressBuffer")
+ .Record;
+ on
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump
-DEMPTY %s | FileCheck -check-prefix=EMPTY %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump %s
| FileCheck %s
+
hekota wrote:
FYI, we ar
@@ -1474,6 +1474,11 @@ DeclContext *DeclContext::getPrimaryContext() {
case Decl::ObjCCategoryImpl:
return this;
+ case Decl::CXXRecord:
+if (auto *OPD = dyn_cast(this))
+ if (auto *Def = OPD->getDefinition())
+return Def;
+return this;
default:
@@ -531,6 +531,16 @@ void
HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() {
.addArraySubscriptOperators()
.completeDefinition();
});
+
+ Decl = BuiltinTypeDeclBuilder(*SemaPtr, HLSLNamespace, "ByteAddressBuffer")
+ .Record;
+ on
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm
-disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-DXIL
hekota wrote:
Rename to ByteAddressBuffer**s**-constructor**s**.hlsl - test cases for oth
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/114148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/114148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/114148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 683 matches
Mail list logo