llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-ppc64le-rhel`
running on `ppc64le-clang-rhel-test` while building `clang` at step 5
"build-unified-tree".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/145/builds/5160
Here is the relevant pi
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `sanitizer-ppc64le-linux`
running on `ppc64le-sanitizer` while building `clang` at step 2 "annotate".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/72/builds/8263
Here is the relevant piece of the bu
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`ppc64le-lld-multistage-test` running on `ppc64le-lld-multistage-test` while
building `clang` at step 12 "build-stage2-unified-tree".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/168/builds/8747
He
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
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross`
running on `suse-gary-m68k-cross` while building `clang` at step 4 "build stage
1".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/27/builds/6180
Here is the relevant piece o
@@ -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/V-FEXrt approved this pull request.
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
@@ -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
@@ -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/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
@@ -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
@@ -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
@@ -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
@@ -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
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
tex3d 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 exact
sequence of
https://github.com/tex3d commented:
This is interesting.
I wonder though what it looks like in the AST when initializing something with
the result of a function call that return an aggregate that must be split up
across different boundaries? Or what about expressions with side-effects? How
https://github.com/hekota approved this pull request.
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/hekota approved this pull request.
LGTM!
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/farzonl approved this pull request.
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
@@ -3010,3 +3010,183 @@ 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.
@@ -2576,3 +2576,162 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl
*VD) {
}
}
}
+
+static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E,
+llvm::SmallVectorImpl &List,
+llvm::SmallVectorImpl &DestT
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/123141
>From a5d0d86b71ac7d7083295f255b42d991859a62f1 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Wed, 15 Jan 2025 13:40:29 -0600
Subject: [PATCH 1/5] [HLSL] Implement HLSL intialization list support
This P
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/123141
>From 8457635e366f791d03604384c232bc3d270ce0f8 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Wed, 15 Jan 2025 13:40:29 -0600
Subject: [PATCH 1/4] [HLSL] Implement HLSL intialization list support
This P
@@ -0,0 +1,69 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute
-finclude-default-header -verify -Wdouble-promotion -Wconversion %s
+
+struct TwoFloats {
+ float X, Y;
+};
+
+struct TwoInts {
+ int Z, W;
+};
+
+struct Doggo {
+ int4 LegState;
+ int TailState;
+ f
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/123141
>From 8457635e366f791d03604384c232bc3d270ce0f8 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Wed, 15 Jan 2025 13:40:29 -0600
Subject: [PATCH 1/3] [HLSL] Implement HLSL intialization list support
This P
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/123141
>From 8457635e366f791d03604384c232bc3d270ce0f8 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Wed, 15 Jan 2025 13:40:29 -0600
Subject: [PATCH 1/2] [HLSL] Implement HLSL intialization list support
This P
https://github.com/hekota 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
https://github.com/hekota 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
https://github.com/hekota 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
https://github.com/hekota commented:
Few notes and questions, otherwise looks mostly good!
Typos in title na description: intialization, implementaiton
https://github.com/llvm/llvm-project/pull/123141
___
cfe-commits mailing list
cfe-commits@lists.llv
@@ -2576,3 +2576,162 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl
*VD) {
}
}
}
+
+static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E,
+llvm::SmallVectorImpl &List,
+llvm::SmallVectorImpl &DestT
https://github.com/hekota 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
@@ -0,0 +1,714 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -disable-llvm-passes
-emit-llvm -finclude-default-header -o - %s | FileCheck %s
+
+struct TwoFloats {
@@ -2576,3 +2576,162 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl
*VD) {
}
}
}
+
+static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E,
+llvm::SmallVectorImpl &List,
+llvm::SmallVectorImpl &DestT
@@ -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:
note to self: https://hlsl.godbolt.org/z/1Tq59r89W
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
@@ -2576,3 +2576,162 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl
*VD) {
}
}
}
+
+static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E,
+llvm::SmallVectorImpl &List,
+llvm::SmallVectorImpl &DestT
@@ -0,0 +1,69 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute
-finclude-default-header -verify -Wdouble-promotion -Wconversion %s
+
+struct TwoFloats {
+ float X, Y;
+};
+
+struct TwoInts {
+ int Z, W;
+};
+
+struct Doggo {
+ int4 LegState;
+ int TailState;
+ f
@@ -0,0 +1,69 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute
-finclude-default-header -verify -Wdouble-promotion -Wconversion %s
+
+struct TwoFloats {
+ float X, Y;
+};
+
+struct TwoInts {
+ int Z, W;
+};
+
+struct Doggo {
+ int4 LegState;
+ int TailState;
+ f
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
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 6ffc4451037bbae26cce51fb80418f8e9ed2ac84
8457635e366f791d03604384c232bc3d270ce0f8 --e
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
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Chris B (llvm-beanz)
Changes
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 beha
llvmbot wrote:
@llvm/pr-subscribers-hlsl
Author: Chris B (llvm-beanz)
Changes
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 behav
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
49 matches
Mail list logo