@@ -33,6 +41,21 @@ constexpr enable_if_t bit_cast(T
F) {
return __builtin_bit_cast(U, F);
}
+template
+constexpr enable_if_t::value || is_same::value, T>
+length_impl(T X) {
+ return __builtin_elementwise_abs(X);
+}
+
+template
+enable_if_t::value || is_same::value, T>
+
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/121611
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -33,6 +41,23 @@ constexpr enable_if_t bit_cast(T
F) {
return __builtin_bit_cast(U, F);
}
+template
+constexpr enable_if_t::value || is_same::value, T>
+length_impl(T X) {
+ return __builtin_elementwise_abs(X);
+}
+
+template
+enable_if_t::value || is_same::value, T>
+
@@ -0,0 +1,59 @@
+//===- SemaSPIRV.cpp - Semantic Analysis for SPIRV constructs
+//---===//
bogner wrote:
same here
https://github.com/llvm/llvm-project/pull/121598
___
cfe-commits mailing list
cfe-commits@
https://github.com/bogner approved this pull request.
The boilerplate all looks correct to me.
https://github.com/llvm/llvm-project/pull/121598
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
@@ -0,0 +1,29 @@
+//===- SemaSPIRV.h - Semantic Analysis for SPIRV constructs
+//-===//
bogner wrote:
clang-format went wrong here
https://github.com/llvm/llvm-project/pull/121598
___
cfe-commits mailin
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/121598
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/121521
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner commented:
This basically LGTM but th SV_GroupID.ll test could use a fair amount of cleanup
https://github.com/llvm/llvm-project/pull/121521
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
@@ -0,0 +1,82 @@
+; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-vulkan-unknown %s -o - |
FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-unknown %s -o -
-filetype=obj | spirv-val %}
+
+; This file generated from the following command:
+; clang -cc1 -t
bogner wrote:
These tests are failing for me locally on windows now. Why are you removing
this?
https://github.com/llvm/llvm-project/pull/121162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/121280
This reverts #121162, which was a reapply of the previous revert earlier in
#121160 - The change blatantly breaks tests on windows and it isn't clear why
it's being made.
This reverts commit 8e9fda1c1140e067c53
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/121280
>From 650dd5a50a6228124dc40676ea08a963ecdf3bb0 Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Sat, 28 Dec 2024 21:35:03 -0700
Subject: [PATCH 1/2] Revert "[nfc][Driver] Remove {{(.exe)?}} from sanitizer
test
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/121280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bogner wrote:
I've gone ahead and reverted it.
https://github.com/llvm/llvm-project/pull/121162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/121280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,173 @@
+#include "clang/Parse/ParseHLSLRootSignature.h"
+
+namespace clang {
+namespace hlsl {
+
+// Lexer Definitions
+
+static bool IsNumberChar(char C) {
+ // TODO(#120472): extend for float support exponents
+ return isdigit(C); // integer support
+}
+
+bool RootS
@@ -0,0 +1,134 @@
+//=== 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
@@ -0,0 +1,173 @@
+#include "clang/Parse/ParseHLSLRootSignature.h"
+
+namespace clang {
+namespace hlsl {
+
+// Lexer Definitions
+
+static bool IsNumberChar(char C) {
+ // TODO(#120472): extend for float support exponents
+ return isdigit(C); // integer support
+}
+
+bool RootS
bogner wrote:
Sharing the code here makes sense to me, however, this does make the pass run
significantly earlier in the DXIL pipeline. That might be fine but we'll have
to make sure we aren't creating dead functions in any of the other DXIL backend
passes that might have been cleaned up by th
@@ -6358,3 +6359,81 @@ RValue CodeGenFunction::EmitPseudoObjectRValue(const
PseudoObjectExpr *E,
LValue CodeGenFunction::EmitPseudoObjectLValue(const PseudoObjectExpr *E) {
return emitPseudoObjectExpr(*this, E, true, AggValueSlot::ignored()).LV;
}
+
+void CodeGenFunction::Fl
https://github.com/bogner 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/bogner approved this pull request.
This all looks reasonable, though it is kind of a mess of random fixes. It's
generally best to commit unrelated things individually, and it would be nice to
have commit messages that are full sentences of what and why rather than a
bulleted
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/124840
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14183,6 +14183,13 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl) {
if (getLangOpts().OpenCL &&
Var->getType().getAddressSpace() == LangAS::opencl_local)
return;
+
+// In HLSL, objects in the hlsl_constat address space are initialized
+// exte
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/124866
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/125992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/125992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bogner wrote:
I went ahead and merged this for you. Thanks!
https://github.com/llvm/llvm-project/pull/125992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -345,6 +345,9 @@ void clang::CodeGen::CGHLSLRuntime::setHLSLEntryAttributes(
WaveSizeAttr->getPreferred());
Fn->addFnAttr(WaveSizeKindStr, WaveSizeStr);
}
+ if (CGM.getCodeGenOpts().OptimizationLevel == 0) {
+Fn->addFnAttr(llvm::Attribute::Optimize
https://github.com/bogner approved this pull request.
This looks reasonable to me. It would be good to get some feedback from
@pow2clk and @llvm-beanz since they've done a bunch of the work in this area.
https://github.com/llvm/llvm-project/pull/125937
__
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/125937
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2021,28 +2021,10 @@ llvm::DISubroutineType
*CGDebugInfo::getOrCreateInstanceMethodType(
// ThisPtr may be null if the member function has an explicit 'this'
// parameter.
if (!ThisPtr.isNull()) {
-const CXXRecordDecl *RD = ThisPtr->getPointeeCXXRecordDecl();
-
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/119444
___
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";
bogner wrote:
> Don't see a problem with this but could we elaborate on the motivation for
> this? Looks like this is required for #119041? Why is that?
>
> The original change this is based on is:
> [microsoft/DirectXShaderCompiler#6296](https://github.com/microsoft/DirectXShaderCompiler/pull
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/118651
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/117018
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -208,37 +208,44 @@ Examples:
.. code-block:: llvm
- ; RWBuffer Buf : register(u5, space3)
- %buf = call target("dx.TypedBuffer", <4 x float>, 1, 0, 0)
- @llvm.dx.handle.fromBinding.tdx.TypedBuffer_f32_1_0(
- i32 3, i32 5, i32 1, i32 0, i
@@ -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";
https://github.com/bogner commented:
This looks correct, but how much work is it to update all of these tests to
have fast math enabled rather than explicitly disabling it? I worry that (1)
folks looking at these tests in the future will think that disabling fast math
is a meaningful part of t
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/117018
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bogner wrote:
This should really be talking about concepts for structured buffers, not raw
buffers. At the HLSL language level, there is nothing called a RawBuffer -
there is ByteAddressBuffer and various kinds of StructuredBuffer, which are
represented lower in the stack as a "raw" buffer. Gi
https://github.com/bogner 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
bogner wrote:
> Two questions:
>
> 1. Do we foresee any issue adding `afn` (I suspect not)
Adding `afn` should be fine - we don't have library functions per se anyway so
this shouldn't make any difference one way or the other.
> 2. Do we also need to apply `contract`, which I believe was also
bogner wrote:
Note: To see the bitcode writer crash, apply this patch and set up
https://github.com/llvm-beanz/HLSLTest - Basic/simple.test hits an assert:
```
Assertion failed: ((Val & ~(~0U >> (32-NumBits))) == 0 && "High bits set!"),
function Emit, file BitstreamWriter.h, line 284.
...
#7 0
@@ -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/bogner approved this pull request.
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-commits
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/120466
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -12528,6 +12530,10 @@ def warn_attr_min_eq_max: Warning<
def err_hlsl_attribute_number_arguments_insufficient_shader_model: Error<
"attribute %0 with %1 arguments requires shader model %2 or greater">;
+def err_hlsl_expect_arg_const_int_one_or_neg_one: Error<
+ "argumen
@@ -343,27 +343,232 @@ 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/bogner updated
https://github.com/llvm/llvm-project/pull/117303
>From 05f412f47b8d30ff1db9372225001c75289bed44 Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Thu, 21 Nov 2024 23:18:13 -0800
Subject: [PATCH 1/2] [HLSL] Get the index for resource bindings from the slot
Res
@@ -588,7 +588,7 @@ llvm::Function
*CGHLSLRuntime::createResourceBindingInitFn() {
auto *Slot = llvm::ConstantInt::get(CGM.IntTy, RBA->getSlotNumber());
// FIXME: resource arrays are not yet implemented
auto *Range = llvm::ConstantInt::get(CGM.IntTy, 1);
-
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/117303
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/117303
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner 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/bogner approved this pull request.
Just a few nitpicks - this looks great, thanks!
https://github.com/llvm/llvm-project/pull/114148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
@@ -19371,6 +19371,15 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef{Op0},
nullptr, "hlsl.radians");
}
+ case Builtin::BI__builtin_hlsl_buffer_update_counter: {
+Value *ResHandle = EmitScalarExp
@@ -570,3 +780,20 @@ void HLSLExternalSemaSource::CompleteType(TagDecl *Tag) {
return;
It->second(Record);
}
+
+static FunctionDecl *lookupBuiltinFunction(Sema &S, StringRef Name) {
+ IdentifierInfo &II =
+ S.getASTContext().Idents.get(Name, tok::TokenKind::identifi
@@ -343,27 +343,232 @@ struct TemplateParameterListBuilder {
Params.clear();
QualType T = Builder.Template->getInjectedClassNameSpecialization();
-T = S.Context.getInjectedClassNameType(Builder.Record, T);
+T = AST.getInjectedClassNameType(Builder.Record, T);
@@ -37,7 +37,7 @@ def int_dx_typedBufferStore
: DefaultAttrsIntrinsic<[], [llvm_any_ty, llvm_i32_ty, llvm_anyvector_ty],
[IntrWriteMem]>;
-def int_dx_updateCounter
+def int_dx_bufferUpdateCounter
bogner wrote:
We'll need to rev
@@ -323,19 +325,117 @@ struct TemplateParameterListBuilder {
return *this;
}
- BuiltinTypeDeclBuilder &finalizeTemplateArgs() {
+ // The concept specialization expression (CSE) constructed in
+ // constructConceptSpecializationExpr is constructed so that it
+ // matc
@@ -472,10 +571,73 @@ static BuiltinTypeDeclBuilder
setupBufferType(CXXRecordDecl *Decl, Sema &S,
.addDefaultHandleConstructor(S);
}
+Expr *constructTypedBufferConstraintExpr(Sema &S, SourceLocation NameLoc,
+ TemplateTypeParmDecl
@@ -5720,8 +5720,7 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait
UTT,
case UTT_IsTypedResourceElementCompatible:
assert(Self.getLangOpts().HLSL &&
"typed resource element compatible types are an HLSL-only feature");
-if (Self.RequireCompleteT
@@ -472,10 +571,73 @@ static BuiltinTypeDeclBuilder
setupBufferType(CXXRecordDecl *Decl, Sema &S,
.addDefaultHandleConstructor(S);
}
+Expr *constructTypedBufferConstraintExpr(Sema &S, SourceLocation NameLoc,
+ TemplateTypeParmDecl
@@ -289,8 +289,9 @@ struct BuiltinTypeDeclBuilder {
}
TemplateParameterListBuilder addTemplateArgumentList(Sema &S);
- BuiltinTypeDeclBuilder &addSimpleTemplateParams(Sema &S,
- ArrayRef Names);
+ BuiltinTypeDeclBuilder &
@@ -12,44 +12,51 @@
#include "clang/Sema/HLSLExternalSemaSource.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
+#include "clang/AST/Expr.h"
#include "clang/AST/Type.h"
#include "clang/Basic/SourceL
@@ -588,7 +588,7 @@ llvm::Function
*CGHLSLRuntime::createResourceBindingInitFn() {
auto *Slot = llvm::ConstantInt::get(CGM.IntTy, RBA->getSlotNumber());
// FIXME: resource arrays are not yet implemented
auto *Range = llvm::ConstantInt::get(CGM.IntTy, 1);
-
@@ -674,6 +700,34 @@
BuiltinTypeDeclBuilder::addHandleAccessFunction(DeclarationName &Name,
.finalizeMethod();
}
+BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addAppendMethod() {
+ using PH = BuiltinTypeMethodBuilder::PlaceHolder;
+ ASTContext &AST = SemaRef.getAST
@@ -104,6 +104,8 @@ class CGHLSLRuntime {
GENERATE_HLSL_INTRINSIC_FUNCTION(SClamp, sclamp)
GENERATE_HLSL_INTRINSIC_FUNCTION(UClamp, uclamp)
+ GENERATE_HLSL_INTRINSIC_FUNCTION(CreateResourceGetPointer,
bogner wrote:
Why "CreateResourceGetPointer"? Shouldn
https://github.com/bogner approved this pull request.
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/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/122772
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
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
bogner wrote:
> I think the forward fix has been identified, and importantly it will take a
> bit longer to revert than to submit the fix (adding triples to the tests),
> because there are 4 commits that need to be reverted and I need to run a
> quick build to ensure that nothing is broken by
@@ -41,6 +41,14 @@ constexpr enable_if_t bit_cast(T
F) {
return __builtin_bit_cast(U, F);
}
+constexpr vector d3d_color_to_ubyte4_impl(vector V) {
+ // Use the same scaling factor used by FXC (i.e., 255.001953)
+ // Excerpt from stackoverflow discussion:
+ // "Built-in r
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/121521
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -142,6 +145,20 @@ void ModuleShaderFlags::initialize(Module &M,
DXILResourceTypeMap &DRTM) {
// Merge SCCSF with that of F
FunctionFlags[F].merge(SCCSF);
}
+
+ // Set DisableOptimizations flag based on the presence of OptimizeNone
+ // attribute of entry fun
@@ -0,0 +1,53 @@
+; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s
+
+
+; CHECK: ; Combined Shader Flags for Module
+; CHECK-NEXT: ; Shader Flags Value: 0x0001
+
+; CHECK: ; Note: extra DXIL module flags:
+; CHECK-NEXT: ; D3D11_1_SB_GLOBAL_FLAG_SKIP_
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/126813
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,43 @@
+; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s
+
+
+; CHECK: ; Combined Shader Flags for Module
+; CHECK-NEXT: ; Shader Flags Value: 0x0001
+
+; CHECK: ; Note: extra DXIL module flags:
+; CHECK-NEXT: ; D3D11_1_SB_GLOBAL_FLAG_SKIP_
@@ -0,0 +1,43 @@
+; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s
+
+
+; CHECK: ; Combined Shader Flags for Module
+; CHECK-NEXT: ; Shader Flags Value: 0x0001
+
+; CHECK: ; Note: extra DXIL module flags:
+; CHECK-NEXT: ; D3D11_1_SB_GLOBAL_FLAG_SKIP_
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/127262
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/127262
This test was unnecessarily invoking `dxv` if it was in your path since it used
the driver rather than the `-cc1` command.
>From 218469de699d360b70d37a37d55d2b42a2a1e39a Mon Sep 17 00:00:00 2001
From: Justin Bog
@@ -2582,17 +2582,20 @@ static void BuildFlattenedTypeList(QualType BaseTy,
continue;
}
if (const auto *RT = dyn_cast(T)) {
- const RecordDecl *RD = RT->getDecl();
- if (RD->isUnion()) {
+ const CXXRecordDecl *RD = RT->getAsCXXRecordDecl();
+ a
@@ -3010,3 +3013,193 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl
*VD) {
}
}
}
+
+static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E,
+llvm::SmallVectorImpl &List,
+llvm::SmallVectorImpl &DestT
@@ -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
https://github.com/bogner approved this pull request.
This all looks reasonable to me. A couple of nitpicks and a question inline.
https://github.com/llvm/llvm-project/pull/123141
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.ll
https://github.com/bogner 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
bogner wrote:
> 1. If/when we support separate compilation, the user-facing exported
> "resource" object will be the resource wrapper, not the handle, so that
> indicates to me we should probably have the wrappers being public.
Depending on which aspect of separate compilation you mean, there
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/130231
>From bf5e5b4b1060f51d37b05c905b4327a40316f158 Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Thu, 6 Mar 2025 17:50:12 -0800
Subject: [PATCH] [HLSL] Buffer handle globals should not be constants
If these are
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/130231
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/131032
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
This looks sensible to me.
https://github.com/llvm/llvm-project/pull/133619
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/130231
>From bf5e5b4b1060f51d37b05c905b4327a40316f158 Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Thu, 6 Mar 2025 17:50:12 -0800
Subject: [PATCH 1/3] [HLSL] Buffer handle globals should not be constants
If these
@@ -21,20 +21,15 @@ class NamespaceDecl;
class Sema;
class HLSLExternalSemaSource : public ExternalSemaSource {
+private:
bogner wrote:
The default visibility in `class` is private, so this doesn't do anything
https://github.com/llvm/llvm-project/pull/131032
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/134570
The `dx.dot2`, `dot3`, and `dot4` intrinsics exist purely to lower `dx.fdot`,
and they map exactly to the DXIL ops of the same name. Using vectors for their
arguments adds unnecessary complexity and causes us to
@@ -1,13 +1,10 @@
# Including the native target is important because some of LLVM's tests fail if
# you don't.
-set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "")
+set(LLVM_TARGETS_TO_BUILD "Native;SPIRV" CACHE STRING "")
-# Include the DirectX target for DXIL code generation,
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/133287
Since SPIRV is no longer an experimental target this wasn't actually enabling
it any more.
>From 5c4b19d99275440eef8a360f5d8f1affd7869e0e Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Thu, 27 Mar 2025 10:1
https://github.com/bogner commented:
One comment saying you should rename all of the methods in this patch and a few
small suggestions, but this is looking pretty close
https://github.com/llvm/llvm-project/pull/133302
___
cfe-commits mailing list
cfe-
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/133302
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
701 - 800 of 967 matches
Mail list logo