https://github.com/llvm-beanz approved this pull request.
Thank you for the vote of confidence :smile:
https://github.com/llvm/llvm-project/pull/114863
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
@@ -852,34 +852,51 @@ void TypePrinter::printExtVectorAfter(const ExtVectorType
*T, raw_ostream &OS) {
void TypePrinter::printConstantMatrixBefore(const ConstantMatrixType *T,
raw_ostream &OS) {
+ if (Policy.UseHLSLTypes)
+OS <
https://github.com/llvm-beanz requested changes to this pull request.
I think there is actually a bigger problem with your earlier PR that we need to
address.
There is an inconsistency in the [design
document](https://github.com/llvm/wg-hlsl/blob/main/proposals/0011-resource-element-type-valid
https://github.com/llvm-beanz dismissed
https://github.com/llvm/llvm-project/pull/112245
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -323,30 +324,127 @@ struct TemplateParameterListBuilder {
S.Context, Builder.Record->getDeclContext(), SourceLocation(),
SourceLocation(), /* TemplateDepth */ 0, Position,
&S.Context.Idents.get(Name, tok::TokenKind::identifier),
-/* Typename *
https://github.com/llvm-beanz approved this pull request.
Love it!
https://github.com/llvm/llvm-project/pull/111625
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,109 +1,28 @@
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-library
-finclude-default-header -fnative-half-type -verify %s
// expected-no-diagnostics
-struct oneInt {
-int i;
-};
-
-struct twoInt {
- int aa;
- int ab;
-};
-
-struct threeInts {
- oneInt o;
-
@@ -2200,47 +2200,43 @@ static void BuildFlattenedTypeList(QualType BaseTy,
}
bool SemaHLSL::IsTypedResourceElementCompatible(clang::QualType QT) {
- if (QT.isNull())
+ // null and array types are not allowed.
+ if (QT.isNull() || QT->isArrayType())
return false;
-
@@ -2200,47 +2200,43 @@ static void BuildFlattenedTypeList(QualType BaseTy,
}
bool SemaHLSL::IsTypedResourceElementCompatible(clang::QualType QT) {
- if (QT.isNull())
+ // null and array types are not allowed.
+ if (QT.isNull() || QT->isArrayType())
return false;
-
@@ -2200,47 +2200,43 @@ static void BuildFlattenedTypeList(QualType BaseTy,
}
bool SemaHLSL::IsTypedResourceElementCompatible(clang::QualType QT) {
- if (QT.isNull())
+ // null and array types are not allowed.
+ if (QT.isNull() || QT->isArrayType())
return false;
-
@@ -2200,47 +2200,43 @@ static void BuildFlattenedTypeList(QualType BaseTy,
}
bool SemaHLSL::IsTypedResourceElementCompatible(clang::QualType QT) {
- if (QT.isNull())
+ // null and array types are not allowed.
+ if (QT.isNull() || QT->isArrayType())
return false;
-
@@ -359,6 +356,176 @@ struct TemplateParameterListBuilder {
return Builder;
}
};
+
+// Builder for methods of builtin types. Allows adding methods to builtin types
+// using the builder pattern like this:
+//
+// BuiltinTypeMethodBuilder(Sema, RecordBuilder, "MethodName
@@ -282,6 +258,23 @@ struct BuiltinTypeDeclBuilder {
return *this;
}
+ FieldDecl *getResourceHandleField() {
+FieldDecl *FD = Fields["h"];
+if (FD && FD->getType()->isHLSLAttributedResourceType())
llvm-beanz wrote:
These should be `asserts` rat
@@ -359,6 +356,176 @@ struct TemplateParameterListBuilder {
return Builder;
}
};
+
+// Builder for methods of builtin types. Allows adding methods to builtin types
+// using the builder pattern like this:
+//
+// BuiltinTypeMethodBuilder(Sema, RecordBuilder, "MethodName
@@ -282,6 +258,23 @@ struct BuiltinTypeDeclBuilder {
return *this;
}
+ FieldDecl *getResourceHandleField() {
+FieldDecl *FD = Fields["h"];
+if (FD && FD->getType()->isHLSLAttributedResourceType())
+ return FD;
+return nullptr;
+ }
+
+ QualType getFirs
@@ -528,8 +719,13 @@ void
HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() {
ResourceKind::TypedBuffer, /*IsROV=*/false,
/*RawBuffer=*/true)
.addArraySubscriptOperators()
+.addIncrementCounterMethod(*SemaP
https://github.com/llvm-beanz 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/llvm-beanz commented:
Mostly looking good. I really like the additions to the builder API. Can you
please add an AST test to verify the shape of the new AST nodes and their
instantiations?
https://github.com/llvm/llvm-project/pull/114148
_
@@ -0,0 +1,50 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -emit-llvm
-disable-llvm-passes -o - %s | FileCheck %s --enable-var-scope
+
+// CHECK-LABEL: define void {{.*}}arr_assign1
+// CHECK: [[Arr:%.*]] = alloca [2 x i32], align 4
+// CHECK: [[Arr2:%.*]] = allo
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/109323
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz commented:
We either need to fix code generation so that we correctly handle modifications
of the binary operator's lvalue, or we need to represent the binary operator in
the AST as returning an rvalue.
This code should either work following C++ rules, or fail to
@@ -0,0 +1,50 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -emit-llvm
-disable-llvm-passes -o - %s | FileCheck %s --enable-var-scope
+
+// CHECK-LABEL: define void {{.*}}arr_assign1
+// CHECK: [[Arr:%.*]] = alloca [2 x i32], align 4
+// CHECK: [[Arr2:%.*]] = allo
@@ -401,6 +401,194 @@ void SemaHLSL::DiagnoseAttrStageMismatch(
<< (AllowedStages.size() != 1) << join(StageStrings, ", ");
}
+template
+static void castVector(Sema &S, ExprResult &E, QualType &Ty, unsigned Sz) {
+ if (const auto *VTy = Ty->getAs())
+Ty = VTy->getE
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/110195
HLSL has a different set of usual arithmetic conversions for vector types to
resolve a common type for binary operator expressions.
This PR implements the current spec proposal from:
https://github.com/micr
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/108659
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/110191
Reverts llvm/llvm-project#108659
>From d5ee252c6bddcd27210e3a031cef8065679c8da5 Mon Sep 17 00:00:00 2001
From: Chris B
Date: Thu, 26 Sep 2024 19:34:17 -0500
Subject: [PATCH] Revert "[HLSL] Vector Usual Arith
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/110191
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -422,6 +422,55 @@ template constexpr uint asuint(T F) {
return __detail::bit_cast(F);
}
+//===--===//
+// asuint splitdouble builtins
+//===---
@@ -438,6 +438,55 @@ template constexpr uint asuint(T F) {
return __detail::bit_cast(F);
}
+//===--===//
+// asuint splitdouble builtins
+//===---
@@ -3,12 +3,12 @@
// Supported targets
//
-// RUN: %clang -target dxil-unknown-shadermodel6.2-compute %s -S -o /dev/null
2>&1 | FileCheck --allow-empty --check-prefix=CHECK-VALID %s
-// RUN: %clang -target spirv-unknown-vulkan-compute %s -S -o /dev/null 2>&1 |
FileCheck --al
@@ -0,0 +1,217 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump %s
| FileCheck %s
+
+// CHECK-LABEL: arr_assign1
+// CHECK: CompoundStmt 0x{{[0-9a-f]+}} {{.*}}
+// CHECK: DeclStmt 0x{{[0-9a-f]+}} {{.*}}
+// CHECK: VarDecl [[A:0x[0-9a-f]+]] {{.*}} co
https://github.com/llvm-beanz commented:
A few notes on the test cases, but otherwise I think this is looking good.
https://github.com/llvm/llvm-project/pull/109323
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/110195
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,113 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -emit-llvm
-disable-llvm-passes -o - %s | FileCheck %s --enable-var-scope
+
+// CHECK-LABEL: define void {{.*}}arr_assign1
+// CHECK: [[Arr:%.*]] = alloca [2 x i32], align 4
+// CHECK: [[Arr2:%.*]] = all
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/110195
>From 4226fd6d3788396bc7515d20d46cf6f358489d3e Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Thu, 26 Sep 2024 20:06:20 -0500
Subject: [PATCH] HLSL has a different set of usual arithmetic conversions for
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/110195
>From 4226fd6d3788396bc7515d20d46cf6f358489d3e Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Thu, 26 Sep 2024 20:06:20 -0500
Subject: [PATCH] HLSL has a different set of usual arithmetic conversions for
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/110306
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -422,6 +422,55 @@ template constexpr uint asuint(T F) {
return __detail::bit_cast(F);
}
+//===--===//
+// asuint splitdouble builtins
+//===---
@@ -6,6 +6,10 @@ uint4 test_asuint_too_many_arg(float p0, float p1) {
// expected-error@-1 {{no matching function for call to 'asuint'}}
// expected-note@hlsl/hlsl_intrinsics.h:* {{candidate function template not
viable: requires single argument 'V', but 2 arguments were pr
@@ -3,12 +3,12 @@
// Supported targets
//
-// RUN: %clang -target dxil-unknown-shadermodel6.2-compute %s -S -o /dev/null
2>&1 | FileCheck --allow-empty --check-prefix=CHECK-VALID %s
-// RUN: %clang -target spirv-unknown-vulkan-compute %s -S -o /dev/null 2>&1 |
FileCheck --al
https://github.com/llvm-beanz requested changes to this pull request.
I have concerns about a few aspects of this change. @joaosaffran, let's sync up
on Monday.
https://github.com/llvm/llvm-project/pull/109331
___
cfe-commits mailing list
cfe-commits@
@@ -3,12 +3,12 @@
// Supported targets
//
-// RUN: %clang -target dxil-unknown-shadermodel6.2-compute %s -S -o /dev/null
2>&1 | FileCheck --allow-empty --check-prefix=CHECK-VALID %s
-// RUN: %clang -target spirv-unknown-vulkan-compute %s -S -o /dev/null 2>&1 |
FileCheck --al
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/108902
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/108894
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/108659
>From 9a3660e32da5e3829d2167ae7d160e4f973a9e33 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Fri, 30 Aug 2024 18:40:43 -0500
Subject: [PATCH 1/2] [HLSL] Vector Usual Arithmetic Conversions
HLSL has a d
llvm-beanz wrote:
I think we should separate adding the internal linkage (missing `static`
keywords) from the other refactoring since they're unrelated.
Adding the missing `static` keywords is all good. I'm not sure I agree with the
other refactoring.
https://github.com/llvm/llvm-project/pull
@@ -312,6 +312,8 @@ def err_invalid_vector_long_double_decl_spec : Error<
"cannot use 'long double' with '__vector'">;
def err_invalid_vector_complex_decl_spec : Error<
"cannot use '_Complex' with '__vector'">;
+def err_invalid_vector_size : Error<
+ "expected vector size
@@ -4492,6 +4492,31 @@ void CXXNameMangler::mangleType(const ArrayParameterType
*T) {
mangleType(cast(T));
}
+void CXXNameMangler::mangleType(const HLSLAttributedResourceType *T) {
+ mangleType(T->getWrappedType());
+ const HLSLAttributedResourceType::Attributes &Attrs =
@@ -3753,6 +3754,32 @@ void MicrosoftCXXNameMangler::mangleType(const
DependentBitIntType *T,
Error(Range.getBegin(), "DependentBitInt type") << Range;
}
+void MicrosoftCXXNameMangler::mangleType(const HLSLAttributedResourceType *T,
+
@@ -10506,7 +10506,9 @@ def err_second_argument_to_cwsc_not_pointer : Error<
"second argument to __builtin_call_with_static_chain must be of pointer
type">;
def err_vector_incorrect_num_initializers : Error<
- "%select{too many|too few}0 elements in vector initialization (
@@ -10506,7 +10506,9 @@ def err_second_argument_to_cwsc_not_pointer : Error<
"second argument to __builtin_call_with_static_chain must be of pointer
type">;
def err_vector_incorrect_num_initializers : Error<
- "%select{too many|too few}0 elements in vector initialization (
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/109323
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/110546
HLSL doesn't distinguish `main` from any other function. It does treat entry
points special, but they're not required to be called `main` so we have a
different attribute annotation to mark them.
At the mom
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/110546
>From c966c604e8e40ddae4e738d6048bb7f87cfeeb25 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Mon, 30 Sep 2024 13:05:09 -0500
Subject: [PATCH 1/3] [HLSL] Treat `main` as any other function
HLSL doesn't
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/110546
>From c966c604e8e40ddae4e738d6048bb7f87cfeeb25 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Mon, 30 Sep 2024 13:05:09 -0500
Subject: [PATCH 1/2] [HLSL] Treat `main` as any other function
HLSL doesn't
llvm-beanz wrote:
> There is still logic elsewhere that sets the default entry point to "main",
> right? This looks right to me.
Yes, and we apply the HLSLShader attribute to main and key generating the entry
off that in clangCodeGen.
https://github.com/llvm/llvm-project/pull/110546
_
@@ -4492,6 +4492,31 @@ void CXXNameMangler::mangleType(const ArrayParameterType
*T) {
mangleType(cast(T));
}
+void CXXNameMangler::mangleType(const HLSLAttributedResourceType *T) {
llvm-beanz wrote:
I assume the intent is that we're mangling this as a vend
llvm-beanz wrote:
> Correct, I'll edit the spec to reflect this more clearly. I've removed most
> of the struct tests.
I don't think that solves this problem. The code as implemented doesn't match
what it should be doing. You shouldn't need to build the flattened type list if
only vectors and
https://github.com/llvm-beanz commented:
Why is this a clang-based tool? Other than using clang/Basic to get the clang
version (which could also be retrieved from LLVM), this doesn't seem to have
any dependencies on Clang.
As I'm seeing the SYCL patches coming in I'm getting concerned that the
https://github.com/llvm-beanz requested changes to this pull request.
I'd really like to understand why this is a clang-level tool and get feedback
from @AaronBallman before this goes further.
https://github.com/llvm/llvm-project/pull/112245
___
cfe-c
https://github.com/llvm-beanz commented:
At a minimum I think this change needs more tests. There's a lot of code added
with very minimal test coverage.
I'm uncomfortable with adding a design that is effectively a workaround with an
unwritten "TODO" to fix it up later, but I also don't want to
llvm-beanz wrote:
> I don't think `lld` makes sense, but you can definitely use the LTO interface
> inside of this tool to create a similar effect.
Why not? `lld` is a toolchain linker (which you said this is supposed to
emulate), and it is an interface to the LTO interface... so it seems to
llvm-beanz wrote:
> I guess the closest analogue would be the WASM target?
LLD has a wasm target.
> It seems like overkill since the `ld.lld` source code doesn't really share
> much code and this target pretty much only consumes LLVM-IR.
I think LLD also needs to eventually gain a SPIR-V targ
llvm-beanz wrote:
I think we could all benefit from some documentation describing how the SYCL
compiler flow is intended to work, what tools are added/modified, and what the
expected outputs are at each compiler phase. Without some idea of the
architecture of what is being built changes like t
llvm-beanz wrote:
> The goal is to just have a tool that clang can use as a normal toolchain
> linker so we can reuse as much as possible when it comes to creating link
> jobs.
Clang can use `lld`, `llvm-ar`, and `dsymutil` (among others), so being part of
Clang certainly isn't necessary for
llvm-beanz wrote:
> I don't know if there's some existing heuristic for what clang tools do, but
> generally I find it to either be something that the user interfaces in, or
> something that clang uses when it's building job actions. This is the latter.
Generally clang-based tools have depende
llvm-beanz wrote:
I'm also concerned that there are no tests for the new tool. There are tests
for the clang driver changes, but none for the new tool. The new tool seems to
be just a wrapper around llvm-link, which does make me think this should
probably just be folded into llvm-link. Underst
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/111010
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvm-beanz wrote:
It seems to me like this should be done through the LTO interface and driven
through `lld`. I can understand if an intermediate step is required while the
SPIR-V backend is under development, but clang shouldn't be in the business of
linking, and generally neither should llvm
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/114544
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz commented:
I think we need to think a bit about the IR metadata in the middle of the
compiler and how it will be used in various scenarios.
DXIL and SPIR-V both have branch hints that indicate to the GPU backends if a
branch should be profitable to flatten or pres
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/116698
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -53,3 +53,6 @@ LLVM_FIXED_MD_KIND(MD_DIAssignID, "DIAssignID", 38)
LLVM_FIXED_MD_KIND(MD_coro_outside_frame, "coro.outside.frame", 39)
LLVM_FIXED_MD_KIND(MD_mmra, "mmra", 40)
LLVM_FIXED_MD_KIND(MD_noalias_addrspace, "noalias.addrspace", 41)
+// TODO: this will likelly be pla
@@ -53,3 +53,6 @@ LLVM_FIXED_MD_KIND(MD_DIAssignID, "DIAssignID", 38)
LLVM_FIXED_MD_KIND(MD_coro_outside_frame, "coro.outside.frame", 39)
LLVM_FIXED_MD_KIND(MD_mmra, "mmra", 40)
LLVM_FIXED_MD_KIND(MD_noalias_addrspace, "noalias.addrspace", 41)
+// TODO: this will likelly be pla
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/116696
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -323,19 +325,114 @@ struct TemplateParameterListBuilder {
return *this;
}
- BuiltinTypeDeclBuilder &finalizeTemplateArgs() {
+ /*
+The concept specialization expression (CSE) constructed in
llvm-beanz wrote:
nit: generally LLVM does per-line commen
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/116700
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -323,19 +325,114 @@ struct TemplateParameterListBuilder {
return *this;
}
- BuiltinTypeDeclBuilder &finalizeTemplateArgs() {
+ // The concept specialization expression (CSE) constructed in
+ // constructConceptSpecializationExpr is constructed so that it
+ // matc
https://github.com/llvm-beanz commented:
I think the way that you're staging these changes is awkward and results in
more review time than we strictly need. We're also going to need to re-review a
bunch of this code in a wider context in the near future, so I'm not sure I'm
comfortable with th
@@ -784,6 +785,17 @@ void SemaHLSL::handleSV_DispatchThreadIDAttr(Decl *D,
const ParsedAttr &AL) {
HLSLSV_DispatchThreadIDAttr(getASTContext(), AL));
}
+void SemaHLSL::handleSV_GroupIDAttr(Decl *D, const ParsedAttr &AL) {
+ auto *VD = cast(D);
+ if (!isLega
@@ -323,19 +325,114 @@ struct TemplateParameterListBuilder {
return *this;
}
- BuiltinTypeDeclBuilder &finalizeTemplateArgs() {
+ // The concept specialization expression (CSE) constructed in
+ // constructConceptSpecializationExpr is constructed so that it
+ // matc
@@ -1,109 +1,28 @@
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-library
-finclude-default-header -fnative-half-type -verify %s
// expected-no-diagnostics
-struct oneInt {
-int i;
-};
-
-struct twoInt {
- int aa;
- int ab;
-};
-
-struct threeInts {
- oneInt o;
-
@@ -483,10 +583,103 @@ static BuiltinTypeDeclBuilder
setupBufferType(CXXRecordDecl *Decl, Sema &S,
.addDefaultHandleConstructor(S, RC);
}
+BinaryOperator *constructSizeOfLEQ16Expr(ASTContext &Context,
+ SourceLocation NameLoc,
+
@@ -323,30 +324,129 @@ struct TemplateParameterListBuilder {
S.Context, Builder.Record->getDeclContext(), SourceLocation(),
SourceLocation(), /* TemplateDepth */ 0, Position,
&S.Context.Idents.get(Name, tok::TokenKind::identifier),
-/* Typename *
@@ -5322,6 +5324,11 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo
&CallInfo,
IRCallArgs[FirstIRArg] = Val;
break;
}
+ } else if (I->getType()->isArrayParameterType()) {
+// use the tmp created by the HLSLOutArgExpr
+/
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/112600
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/115045
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvm-beanz wrote:
Looks like you added a file that has some odd characters and maybe a diff?
https://github.com/llvm/llvm-project/pull/116413
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.
@@ -472,10 +569,91 @@ static BuiltinTypeDeclBuilder
setupBufferType(CXXRecordDecl *Decl, Sema &S,
.addDefaultHandleConstructor(S);
}
+Expr *constructTypedBufferConstraintExpr(Sema &S, SourceLocation NameLoc,
+ TemplateTypeParmDecl
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/108902
>From 9deebd707410a6ad8474f615a97c943937ceeb34 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Mon, 16 Sep 2024 18:21:38 -0500
Subject: [PATCH 1/3] [HLSL] Make casting functions constexpr
This marks the
@@ -828,101 +831,85 @@ static void
updateResourceClassFlagsFromRecordType(RegisterBindingFlags &Flags,
const Type *FieldTy = FD->getType().getTypePtr();
if (const HLSLAttributedResourceType *AttrResType =
dyn_cast(FieldTy)) {
-updateResourceCl
https://github.com/llvm-beanz approved this pull request.
One minor nit inline, but I think this is fine either way.
https://github.com/llvm/llvm-project/pull/108924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/106588
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/109023
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -30,22 +30,36 @@
#include
#include
+#define GENERATE_HLSL_INTRINSIC_FUNCTION_DEFAULT(FunctionName,
\
+ IntrinsicPostfix)
\
+ GENERATE_HLSL_INTRINSIC_FUNCTION(FunctionName, IntrinsicPostfix, 1,
@@ -2076,7 +2076,28 @@ void CodeGenFunction::EmitBranchOnBoolExpr(
Weights = createProfileWeights(TrueCount, CurrentCount - TrueCount);
}
- Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights, Unpredictable);
+ auto *BrInst = Builder.CreateCondBr(CondV, TrueBloc
@@ -300,6 +301,36 @@ static MDTuple *emitTopLevelLibraryNode(Module &M, MDNode
*RMD,
return constructEntryMetadata(nullptr, nullptr, RMD, Properties, Ctx);
}
+// TODO: We might need to refactor this to be more generic,
+// in case we need more metadata to be replaced.
+stat
@@ -2694,19 +2694,49 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register
ResVReg,
}
return MIB.constrainAllUses(TII, TRI, RBI);
}
- case Intrinsic::spv_loop_merge:
- case Intrinsic::spv_selection_merge: {
-const auto Opcode = IID == Intrinsic::spv_select
https://github.com/llvm-beanz 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
@@ -1,109 +1,28 @@
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-library
-finclude-default-header -fnative-half-type -verify %s
// expected-no-diagnostics
-struct oneInt {
-int i;
-};
-
-struct twoInt {
- int aa;
- int ab;
-};
-
-struct threeInts {
- oneInt o;
-
601 - 700 of 932 matches
Mail list logo