https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/118569
___
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.
This mostly looks good to me. I have a few style nits to use more idomatic
patterns and conform better to LLVM coding standards.
https://github.com/llvm/llvm-project/pull/118569
___
cfe-commits
@@ -761,7 +762,37 @@ void StoreDiags::HandleDiagnostic(DiagnosticsEngine::Level
DiagLevel,
return false;
if (!isInsideMainFile(FixIt.RemoveRange.getBegin(), SM))
return false;
- Edits.push_back(toTextEdit(FixIt, SM, *LangOpts));
+
+ auto R = too
@@ -149,26 +149,12 @@ class ErrorReporter {
Repl.getLength(),
Repl.getReplacementText());
auto &Entry = FileReplacements[R.getFilePath()];
Replacements &Replacements = Entry.Replaces;
-llvm::Error Err = Rep
@@ -342,6 +342,20 @@ llvm::Error Replacements::add(const Replacement &R) {
return llvm::Error::success();
}
+llvm::Error Replacements::addOrMerge(const Replacement &R) {
+ auto Err = add(R);
+ if (Err) {
llvm-beanz wrote:
nit: You could rewrite this as:
`
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/122105
___
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/119820
___
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/122105
#116331 introduced a regression in DXIL testing, and did not address all PR
feedback before merging. @joaosaffran is looking at the regression tracked in
#122052 and will re-land these changes with that fix
@@ -8010,15 +8010,19 @@ void Clang::ConstructJob(Compilation &C, const
JobAction &JA,
}
}
- if (Args.hasArg(options::OPT_forder_file_instrumentation)) {
- CmdArgs.push_back("-forder-file-instrumentation");
- // Enable order file instrumentation when ThinLTO is
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/122157
___
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/122337
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvm-beanz wrote:
> No failures. We would need to have tests for all intrinsics that if its not
> SM 6.2 or greater uses of half would error, but we never did that for any of
> the other intrinsics so we should probably discuss what the test coverage
> should be and apply it broadly.
In pract
@@ -253,12 +257,229 @@ 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())
+
@@ -253,12 +257,229 @@ 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())
+
@@ -0,0 +1,96 @@
+//===--- ParseHLSLRootSignature.h ---*- C++
-*-===//
+//
+// 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
llvm-beanz wrote:
As I said in your other PR, I believe not including error reporting and the
appropriate testing makes it significantly more difficult to review the
subsequent commit since not all the appropriate code will even be in the PR.
https://github.c
@@ -0,0 +1,133 @@
+//=== ParseHLSLRootSignatureTest.cpp - Parse Root Signature tests
-===//
+//
+// 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: Ap
@@ -1461,6 +1552,7 @@ static bool castPreservesZero(const CastExpr *CE) {
case CK_NonAtomicToAtomic:
case CK_AtomicToNonAtomic:
case CK_HLSLVectorTruncation:
+ case CK_HLSLAggregateCast: // TODO does CK_HLSLAggregateCast preserve zero?
llvm-beanz wrote:
@@ -707,6 +707,7 @@ ExprResult Sema::ImpCastExprToType(Expr *E, QualType Ty,
case CK_ToVoid:
case CK_NonAtomicToAtomic:
case CK_HLSLArrayRValue:
+case CK_HLSLAggregateCast:
llvm-beanz wrote:
Nope, this cast should not ever be implicit.
https:/
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/122202
___
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 talked about this yesterday in a call with @Keenuts and @s-perron.
I think one of the problems we have with HLSL is that we haven't had explicit
address space annotations except for `groupshared` in the past. We do need to
do that in the future, but
https://github.com/llvm-beanz commented:
The one design question I have here is: should we be bothering to create a
handle for the cbuffer in the frontend at all?
My thought had been that we would instead emit the cbuffer member declarations
as constant address space (2 for DXIL) declarations
https://github.com/llvm-beanz 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/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/116858
___
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/118569
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2752,7 +2787,17 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
llvm::Value *Zero = llvm::Constant::getNullValue(CGF.SizeTy);
return Builder.CreateExtractElement(Vec, Zero, "cast.vtrunc");
}
+ case CK_HLSLAggregateCast: {
+RValue RV = CGF.EmitAnyEx
@@ -491,6 +491,81 @@ static bool isTrivialFiller(Expr *E) {
return false;
}
+// emit a flat cast where the RHS is a scalar, including vector
+static void EmitHLSLScalarFlatCast(CodeGenFunction &CGF, Address DestVal,
+ QualType DestTy, llvm::
@@ -6358,3 +6359,89 @@ RValue CodeGenFunction::EmitPseudoObjectRValue(const
PseudoObjectExpr *E,
LValue CodeGenFunction::EmitPseudoObjectLValue(const PseudoObjectExpr *E) {
return emitPseudoObjectExpr(*this, E, true, AggValueSlot::ignored()).LV;
}
+
+void CodeGenFunction::Fl
@@ -2412,6 +2412,102 @@ bool SemaHLSL::CheckCompatibleParameterABI(FunctionDecl
*New,
return HadError;
}
+// Generally follows PerformScalarCast, with cases reordered for
+// clarity of what types are supported
+bool SemaHLSL::CanPerformScalarCast(QualType SrcTy, QualType D
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/118842
___
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 want to spend a little more time going over the tests, but I had a few small
comments. This seems to be mostly right from my initial review.
https://github.com/llvm/llvm-project/pull/118842
___
cfe-commits ma
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/123141
This PR implements HLSL's initialization list behvaior as specified in the
draft language specifcation under
[*Decl.Init.Agg*](https://microsoft.github.io/hlsl-specs/specs/hlsl.html
#Decl.Init.Agg).
This be
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/123141
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2412,6 +2412,102 @@ bool SemaHLSL::CheckCompatibleParameterABI(FunctionDecl
*New,
return HadError;
}
+// Generally follows PerformScalarCast, with cases reordered for
+// clarity of what types are supported
+bool SemaHLSL::CanPerformScalarCast(QualType SrcTy, QualType D
llvm-beanz wrote:
> I was kind of hoping we might be able to generate the accesses off a handle
> during codegen when the global is accessed. I'm not sure if that's possible
> though.
I'm concerned that this will be more complex to make work with the other CBV
syntaxes. For example, the impli
llvm-beanz wrote:
A couple notes for myself:
* I need to write some AST tests
* Also need to write tests to cover bit fields and unions.
https://github.com/llvm/llvm-project/pull/123141
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/122977
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvm-beanz wrote:
> > How does it not duplicate sub-expressions while also not creating temporary
> > variables to capture results?
>
> The way I thought of to comprehensively solve this in a clear general way was
> to:
>
> * create a new temporary with an anonymous struct type containing the
@@ -0,0 +1,166 @@
+#include "clang/Parse/ParseHLSLRootSignature.h"
+
+namespace clang {
+namespace hlsl {
+
+// Lexer Definitions
+
+static bool IsNumberChar(char C) {
+ // TODO(#126565): extend for float support exponents
+ return isdigit(C); // integer support
+}
+
+bool RootS
@@ -2804,6 +2804,42 @@ bool SemaHLSL::ContainsBitField(QualType BaseTy) {
return false;
}
+// Can perform an HLSL splat cast if the Dest is an aggregate and the
+// Src is a scalar or a vector of length 1
+// Or if Dest is a vector and Src is a vector of length 1
+bool SemaH
@@ -370,6 +370,9 @@ CAST_OPERATION(HLSLArrayRValue)
// Aggregate by Value cast (HLSL only).
CAST_OPERATION(HLSLElementwiseCast)
+// Splat cast for Aggregates (HLSL only).
+CAST_OPERATION(HLSLSplatCast)
llvm-beanz wrote:
nit: can we call this `HLSLAggregateSpl
@@ -2245,6 +2245,17 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s \
+// RUN: -emit-llvm -O1 -verify
+
+bool test_too_few_arg(bool a) {
+ return __builtin_hlsl_and(a);
+ // expected-error@-1 {{too few arguments to function call
@@ -1730,6 +1731,16 @@ void AggExprEmitter::VisitCXXParenListOrInitListExpr(
}
#endif
+ // HLSL initialization lists in the AST are an expansion which can contain
+ // side-effecting expressions wrapped in opaque value expressions. To
properly
+ // emit these we need to
@@ -1462,6 +1462,14 @@ void CXXRecordDecl::addedMember(Decl *D) {
if (Using->getDeclName().getCXXOverloadedOperator() == OO_Equal)
data().HasInheritedAssignment = true;
}
+
+ // HLSL: All user-defined data types are aggregates and use aggregate
+ // initialization
@@ -2229,6 +2241,41 @@ static bool CheckResourceHandle(
// returning an ExprError
bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall)
{
switch (BuiltinID) {
+ case Builtin::BI__builtin_hlsl_adduint64: {
+if (SemaRef.checkArgCount(TheCall, 2))
@@ -10655,6 +10655,8 @@ def err_second_argument_to_cwsc_not_pointer : Error<
def err_vector_incorrect_num_elements : Error<
"%select{too many|too few}0 elements in vector
%select{initialization|operand}3 (expected %1 elements, have %2)">;
+def err_invalid_even_odd_vector_el
@@ -2229,6 +2241,41 @@ static bool CheckResourceHandle(
// returning an ExprError
bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall)
{
switch (BuiltinID) {
+ case Builtin::BI__builtin_hlsl_adduint64: {
+if (SemaRef.checkArgCount(TheCall, 2))
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/123977
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2064,6 +2064,9 @@ llvm::Value *CodeGenFunction::EmitToMemory(llvm::Value
*Value, QualType Ty) {
if (Ty->isExtVectorBoolType()) {
llvm::Type *StoreTy = convertTypeForLoadStore(Ty, Value->getType());
+if (getLangOpts().HLSL)
llvm-beanz wrote:
Do
https://github.com/llvm-beanz commented:
I commented on the first two that I saw, but I think there are a lot of places
left where you're conditionalizing the CodeGen behavior on HLSL, that we could
instead make the condition based on the types involved requiring conversions.
https://github.co
@@ -2081,6 +2084,9 @@ llvm::Value *CodeGenFunction::EmitToMemory(llvm::Value
*Value, QualType Ty) {
llvm::Value *CodeGenFunction::EmitFromMemory(llvm::Value *Value, QualType Ty) {
if (Ty->isExtVectorBoolType()) {
const auto *RawIntTy = Value->getType();
+if (getLangO
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/127098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2245,6 +2245,17 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
@@ -3173,9 +3173,18 @@ bool SemaHLSL::TransformInitList(const InitializedEntity
&Entity,
BuildFlattenedTypeList(InitTy, DestTypes);
llvm::SmallVector ArgExprs;
- for (Expr *Arg : Init->inits())
-if (!BuildInitializerList(SemaRef, Ctx, Arg, ArgExprs, DestTypes))
+ fo
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/127346
This PR disallows virtual inheritance and virtual functions in HLSL.
>From e62dc4bfc4f1cff2a624caf70fcc7bb0dc4a6236 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Sat, 15 Feb 2025 14:34:05 -0600
Subject
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/127346
>From e62dc4bfc4f1cff2a624caf70fcc7bb0dc4a6236 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Sat, 15 Feb 2025 14:34:05 -0600
Subject: [PATCH 1/2] [HLSL] Disallow virtual inheritance and functions
This
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/127098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
@@ -2576,3 +2576,162 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl
*VD) {
}
}
}
+
+static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E,
+llvm::SmallVectorImpl &List,
+llvm::SmallVectorImpl &DestT
llvm-beanz wrote:
I did find a bug in this for handling data structures with resources... I'm
working on it and will update the PR when I have a fix.
https://github.com/llvm/llvm-project/pull/123141
___
cfe-commits mailing list
cfe-commits@lists.llvm.
@@ -2245,6 +2245,17 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
@@ -2079,6 +2079,14 @@ static bool CheckFloatingOrIntRepresentation(Sema *S,
CallExpr *TheCall) {
checkAllSignedTypes);
}
+static bool CheckBoolRepresentation(Sema *S, CallExpr *TheCall) {
+ auto checkAllBoolTypes = [](clang::QualType Pass
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/123141
___
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/129396
___
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:
this is not NFC, so we should verify that we can call these intrinsics with
`half` values even if 16-bit types aren't enabled, and that they properly
codegen to 32-bit variants.
https://github.com/llvm/llvm-project/pull/132804
__
llvm-beanz wrote:
> Finish the work of #81782
Maybe instead:
> Apply pattern of #81782 to intrinsics added in #95999.
Also probably worth having a description of the problem this solves in the
description so that it ends up in the final commit message.
https://github.com/llvm/llvm-project/pu
@@ -2276,6 +2276,29 @@ void CodeGenFunction::EmitSwitchStmt(const SwitchStmt
&S) {
// failure.
llvm::BasicBlock *DefaultBlock = createBasicBlock("sw.default");
SwitchInsn = Builder.CreateSwitch(CondV, DefaultBlock);
+ switch (HLSLControlFlowAttr) {
+ case HLSLControlFl
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/131739
___
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:
One small nit on formatting, otherwise looks good.
https://github.com/llvm/llvm-project/pull/129939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/133508
This refactors the initialization list transformation code to handle incomplete
array types.
Fixes #132958
>From 6234f442adfebaaf73328d2c09ee443facc848b0 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date:
@@ -16,6 +16,84 @@ namespace hlsl {
// unsigned integer and floating point. Keeping this ordering consistent will
// help keep this file manageable as it grows.
+#define _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(fn)
\
+ constexpr float fn(double V) {
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/132979
___
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/133162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3964,6 +3964,8 @@ Value *ScalarExprEmitter::EmitRem(const BinOpInfo &Ops) {
if (Ops.Ty->hasUnsignedIntegerRepresentation())
return Builder.CreateURem(Ops.LHS, Ops.RHS, "rem");
+ else if (CGF.getLangOpts().HLSL && Ops.Ty->hasFloatingRepresentation())
+return Buil
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/135125
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -280,6 +280,17 @@ constexpr bool4 isinf(double4 V) { return
isinf((float4)V); }
_DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp)
_DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp)
+//===--===//
+// lit builtins overloa
@@ -3249,166 +3249,204 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl
*VD) {
}
}
}
-
-static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E,
-llvm::SmallVectorImpl &List,
-llvm::SmallVectorImpl &Des
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/133508
>From 6234f442adfebaaf73328d2c09ee443facc848b0 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Thu, 27 Mar 2025 09:26:31 -0500
Subject: [PATCH 1/5] [HLSL] Handle incomplete array types
This refactors the
@@ -89,37 +88,178 @@ bool RootSignatureParser::parseDescriptorTableClause() {
CurToken.TokKind == TokenKind::kw_UAV ||
CurToken.TokKind == TokenKind::kw_Sampler) &&
"Expects to only be invoked starting at given keyword");
+ TokenKind ParamKind = Cu
@@ -89,37 +88,178 @@ bool RootSignatureParser::parseDescriptorTableClause() {
CurToken.TokKind == TokenKind::kw_UAV ||
CurToken.TokKind == TokenKind::kw_Sampler) &&
"Expects to only be invoked starting at given keyword");
+ TokenKind ParamKind = Cu
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/133520
___
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/133508
>From 6234f442adfebaaf73328d2c09ee443facc848b0 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Thu, 27 Mar 2025 09:26:31 -0500
Subject: [PATCH 1/2] [HLSL] Handle incomplete array types
This refactors the
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/133508
>From 6234f442adfebaaf73328d2c09ee443facc848b0 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Thu, 27 Mar 2025 09:26:31 -0500
Subject: [PATCH 1/3] [HLSL] Handle incomplete array types
This refactors the
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/133441
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -141,6 +141,8 @@ void Parser::ParseHLSLAnnotations(ParsedAttributes &Attrs,
return;
}
+ II = PP.getIdentifierInfo(II->getName().lower());
llvm-beanz wrote:
Can we keep the original identifier around and use that for the diagnostics so
that the diag
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/129939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,59 @@
+//===--- hlsl_compat_overloads.h - Additional HLSL overload definitions for
+// intrinsics --===//
llvm-beanz wrote:
nit: shorten the summary so this fits on one line.
https://github.com/llvm/llvm-project/pull/129939
___
@@ -54,5 +54,67 @@ clamp(U p0, V p1, W p2) {
return clamp(p0, (U)p1, (U)p2);
}
+//===--===//
+// max builtin overloads
+//===--===//
+
+tem
@@ -280,6 +280,17 @@ constexpr bool4 isinf(double4 V) { return
isinf((float4)V); }
_DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp)
_DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp)
+//===--===//
+// lit builtins overloa
llvm-beanz wrote:
> Given your feedback here it sounds like you want us to drop the template and
> allow for implicit vector truncation so that the error will be ambiguous
> instead of `call to deleted function 'lit'`?
Yes, let's not add compatibility overloads unless we have driving reasons f
@@ -89,37 +88,178 @@ bool RootSignatureParser::parseDescriptorTableClause() {
CurToken.TokKind == TokenKind::kw_UAV ||
CurToken.TokKind == TokenKind::kw_Sampler) &&
"Expects to only be invoked starting at given keyword");
+ TokenKind ParamKind = Cu
@@ -3249,166 +3249,204 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl
*VD) {
}
}
}
-
-static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E,
-llvm::SmallVectorImpl &List,
-llvm::SmallVectorImpl &Des
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/134683
___
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/133508
>From 6234f442adfebaaf73328d2c09ee443facc848b0 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Thu, 27 Mar 2025 09:26:31 -0500
Subject: [PATCH 1/6] [HLSL] Handle incomplete array types
This refactors the
@@ -949,6 +950,23 @@ void SemaHLSL::emitLogicalOperatorFixIt(Expr *LHS, Expr
*RHS,
<< NewFnName << FixItHint::CreateReplacement(FullRange, OS.str());
}
+void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) {
+ if (AL.getNumArgs() != 1) {
+Diag(AL.g
@@ -3037,6 +3037,11 @@ void TextNodeDumper::VisitHLSLBufferDecl(const
HLSLBufferDecl *D) {
dumpName(D);
}
+void TextNodeDumper::VisitHLSLRootSignatureDecl(
+const HLSLRootSignatureDecl *D) {
+ dumpName(D);
llvm-beanz wrote:
We should think through how
801 - 900 of 998 matches
Mail list logo