https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/103489
>From bb704124a6aa45fa733347ef24b5f9b462567b92 Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Tue, 13 Aug 2024 17:06:28 -0700
Subject: [PATCH 1/2] remove unused var, and unneeded extract element
---
llvm
https://github.com/Xazax-hun updated
https://github.com/llvm/llvm-project/pull/104037
From 3cb5a4539962fbdf11ccc07b9b1a8fa3bf2fec9a Mon Sep 17 00:00:00 2001
From: Gabor Horvath
Date: Wed, 14 Aug 2024 16:17:40 +0100
Subject: [PATCH] Fix -print-target-triple OS version for apple targets
The targ
https://github.com/Xazax-hun ready_for_review
https://github.com/llvm/llvm-project/pull/104037
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/104088
This allows annotating fields of C/C++ structs using API Notes.
Previously API Notes supported Objective-C properties, but not fields.
rdar://131548377
>From cefe51c59177d4c69a1d556408e6a69301c07326 Mon Sep
Author: Malavika Samak
Date: 2024-08-14T10:45:43-07:00
New Revision: 6b652f6edaa84a9e4934885f6f12b973efb1b810
URL:
https://github.com/llvm/llvm-project/commit/6b652f6edaa84a9e4934885f6f12b973efb1b810
DIFF:
https://github.com/llvm/llvm-project/commit/6b652f6edaa84a9e4934885f6f12b973efb1b810.diff
https://github.com/malavikasamak closed
https://github.com/llvm/llvm-project/pull/101585
___
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: Egor Zhdan (egorzhdan)
Changes
This allows annotating fields of C/C++ structs using API Notes.
Previously API Notes supported Objective-C properties, but not fields.
rdar://131548377
---
Patch is 22.46 KiB, truncated to 20.00 KiB below,
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/104088
>From 3e4c23b5cdfba147bf6598822ca4d9174c984a05 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Wed, 14 Aug 2024 18:37:25 +0100
Subject: [PATCH] [APINotes] Support fields of C/C++ structs
This allows annotatin
@@ -858,6 +867,62 @@ void APINotesWriter::Implementation::writeCXXMethodBlock(
}
}
+namespace {
+/// Used to serialize the on-disk C field table.
+class FieldTableInfo
+: public VersionedTableInfo
{
+public:
+ unsigned getKeyLength(key_type_ref) {
+return sizeof(ui
@@ -1252,6 +1282,81 @@ bool APINotesReader::Implementation::readCXXMethodBlock(
return false;
}
+bool APINotesReader::Implementation::readFieldBlock(
+llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl &Scratch) {
+ if (Cursor.EnterSubBlock(FIELD_BLOCK_ID))
+retur
@@ -793,6 +827,16 @@ class YAMLConverter {
SwiftVersion);
}
+ template
+ void convertVariable(const T &Entity, VariableInfo &VI) {
compnerd wrote:
I think that `computeVariableInfo` seems better - we are "hydrating" the
variable
https://github.com/cor3ntin updated
https://github.com/llvm/llvm-project/pull/104046
>From 5c724a55dda16dcf5dfd8e5be8c86001fa6c9fe7 Mon Sep 17 00:00:00 2001
From: Corentin Jabot
Date: Wed, 14 Aug 2024 17:25:29 +0200
Subject: [PATCH 1/2] [Clang] Error on extraneous template headers by default.
Author: cor3ntin
Date: 2024-08-14T19:56:39+02:00
New Revision: 0dedd6fe1409ab02945bb5f903a23335aa79b590
URL:
https://github.com/llvm/llvm-project/commit/0dedd6fe1409ab02945bb5f903a23335aa79b590
DIFF:
https://github.com/llvm/llvm-project/commit/0dedd6fe1409ab02945bb5f903a23335aa79b590.diff
LOG:
https://github.com/cor3ntin closed
https://github.com/llvm/llvm-project/pull/103867
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Joshua Batista
Date: 2024-08-14T11:07:25-07:00
New Revision: eae1d65f3435b1399e1468cb27bfe745f95d4df2
URL:
https://github.com/llvm/llvm-project/commit/eae1d65f3435b1399e1468cb27bfe745f95d4df2
DIFF:
https://github.com/llvm/llvm-project/commit/eae1d65f3435b1399e1468cb27bfe745f95d4df2.diff
https://github.com/bob80905 closed
https://github.com/llvm/llvm-project/pull/102414
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic approved this pull request.
LGTM... but please consider submitting a patch to expand the explanation in
ItaniumCXXABI::canSpeculativelyEmitVTableAsBaseClass.
If I'm following correctly, the function in question is, in fact, odr-used in
the translation unit in q
https://github.com/MaskRay approved this pull request.
https://github.com/llvm/llvm-project/pull/104037
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
MaskRay wrote:
@efriedma-quic Does this work for you?
https://github.com/llvm/llvm-project/pull/98673
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nicovank created
https://github.com/llvm/llvm-project/pull/104148
`hasOperands` does not always execute matchers in the order they are written.
This can cause issue in code using bindings when one operand matcher is relying
on a binding set by the other. With this change, th
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Nicolas van Kempen (nicovank)
Changes
`hasOperands` does not always execute matchers in the order they are written.
This can cause issue in code using bindings when one operand matcher is relying
on a binding set by the other. With this c
Author: Joseph Huber
Date: 2024-08-14T13:39:13-05:00
New Revision: 394162f356069ddccf1f941abf20959809644926
URL:
https://github.com/llvm/llvm-project/commit/394162f356069ddccf1f941abf20959809644926
DIFF:
https://github.com/llvm/llvm-project/commit/394162f356069ddccf1f941abf20959809644926.diff
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/104056
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nicovank updated
https://github.com/llvm/llvm-project/pull/104148
>From 6429dd6935343b343ce3082c13e772425caea15a Mon Sep 17 00:00:00 2001
From: Nicolas van Kempen
Date: Wed, 14 Aug 2024 14:47:52 -0400
Subject: [PATCH 1/2] [clang][ASTMatcher] Fix execution order of hasOperands
https://github.com/nicovank updated
https://github.com/llvm/llvm-project/pull/104148
>From 6429dd6935343b343ce3082c13e772425caea15a Mon Sep 17 00:00:00 2001
From: Nicolas van Kempen
Date: Wed, 14 Aug 2024 14:47:52 -0400
Subject: [PATCH] [clang][ASTMatcher] Fix execution order of hasOperands
su
https://github.com/nicovank updated
https://github.com/llvm/llvm-project/pull/104148
>From 3ee431b27ac1d20cc6446fc6a8c663f33dd17d12 Mon Sep 17 00:00:00 2001
From: Nicolas van Kempen
Date: Wed, 14 Aug 2024 14:48:57 -0400
Subject: [PATCH] [clang][ASTMatcher] Fix execution order of hasOperands
su
carlosgalvezp wrote:
Boost/MPL 1.86.0 is now released!
https://github.com/boostorg/mpl/releases/tag/boost-1.86.0
Thus I'm merging this patch, thanks for the reviews! I will keep an eye in case
there's need for a revert.
https://github.com/llvm/llvm-project/pull/102364
___
Author: Carlos Galvez
Date: 2024-08-14T20:51:45+02:00
New Revision: 2dec83cc8e21a72e8718b5b3f009a19d6634fad3
URL:
https://github.com/llvm/llvm-project/commit/2dec83cc8e21a72e8718b5b3f009a19d6634fad3
DIFF:
https://github.com/llvm/llvm-project/commit/2dec83cc8e21a72e8718b5b3f009a19d6634fad3.diff
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/102364
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nicovank updated
https://github.com/llvm/llvm-project/pull/104148
>From 168f812b5817ea2a9a80e0a6b52b2005e57d327c Mon Sep 17 00:00:00 2001
From: Nicolas van Kempen
Date: Wed, 14 Aug 2024 14:54:20 -0400
Subject: [PATCH] [clang][ASTMatcher] Fix execution order of hasOperands
su
https://github.com/jdoerfert created
https://github.com/llvm/llvm-project/pull/104168
As mentioned in #68706, it is useful to be able to call kernels from the
runtime, e.g., to perform memset. This patch provides a kernel library that can
be invoked from the offload runtime directly and implem
llvmbot wrote:
@llvm/pr-subscribers-clang-driver
Author: Johannes Doerfert (jdoerfert)
Changes
As mentioned in #68706, it is useful to be able to call kernels from
the runtime, e.g., to perform memset. This patch provides a kernel library that
can be invoked from the offload runtime dire
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 d213981c80626698a07b11ce872acba098a863d4
defcf1effca6b441fc687477f406295601806163 --e
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/104088
>From 1f41cef4dfbf19517c67586945ad9885f48a7150 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Wed, 14 Aug 2024 18:37:25 +0100
Subject: [PATCH] [APINotes] Support fields of C/C++ structs
This allows annotatin
@@ -1252,6 +1282,81 @@ bool APINotesReader::Implementation::readCXXMethodBlock(
return false;
}
+bool APINotesReader::Implementation::readFieldBlock(
+llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl &Scratch) {
+ if (Cursor.EnterSubBlock(FIELD_BLOCK_ID))
+retur
@@ -858,6 +867,62 @@ void APINotesWriter::Implementation::writeCXXMethodBlock(
}
}
+namespace {
+/// Used to serialize the on-disk C field table.
+class FieldTableInfo
+: public VersionedTableInfo
{
+public:
+ unsigned getKeyLength(key_type_ref) {
+return sizeof(ui
@@ -793,6 +827,16 @@ class YAMLConverter {
SwiftVersion);
}
+ template
+ void convertVariable(const T &Entity, VariableInfo &VI) {
egorzhdan wrote:
The existing methods that do the same thing for classes, methods, etc. are
calle
https://github.com/haoNoQ edited
https://github.com/llvm/llvm-project/pull/102953
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/haoNoQ edited
https://github.com/llvm/llvm-project/pull/101583
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/102864
>From b0e53b1c8a687165fa28bd21200f83bf1b1a9234 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Mon, 12 Aug 2024 13:56:30 +0300
Subject: [PATCH 1/2] [Clang] handle both gnu and cpp11 attributes to ensure
cor
https://github.com/haoNoQ approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/102953
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/101802
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll requested changes to this pull request.
Thank you, this is moving in the right direction.
You should also add an entry to potentially breaking section of release notes,
because according to Hyrum's law, someone for sure depends on the current
behavior of `SourceLocati
@@ -50,6 +50,18 @@ unsigned clang_equalLocations(CXSourceLocation loc1,
CXSourceLocation loc2) {
loc1.int_data == loc2.int_data);
}
+unsigned clang_lessThanLocations(CXSourceLocation loc1, CXSourceLocation loc2)
{
+ const SourceLocation Loc1 =
SourceLocation::get
https://github.com/mizvekov approved this pull request.
LGTM
As a note, it's helpful to pre-commit on an NFC patch all these test cases, and
then on the main PR we can see just which test cases changed behavior.
Which I see here are the three test cases at lines 76-78, 84-86, and 96-98.
htt
https://github.com/efriedma-quic commented:
I think serialization is missing for the new bit on BinaryOperator. I'm not
sure why we're storing it in the first place, though; it's queried in exactly
one place, so there isn't really any benefit to precomputing it.
https://github.com/llvm/llvm-p
https://github.com/sergey-kozub updated
https://github.com/llvm/llvm-project/pull/102969
>From e74a0de37302baaf89bfe3230f561684ec5777db Mon Sep 17 00:00:00 2001
From: Sergey Kozub
Date: Mon, 12 Aug 2024 12:52:01 -0700
Subject: [PATCH] [NVPTX] Add conversion intrinsics from/to fp8 types (e4m3,
@@ -722,6 +722,37 @@ let hasSideEffects = false in {
defm CVT_f16x2 : CVT_FROM_FLOAT_V2_SM80<"f16x2", Int32Regs>;
defm CVT_bf16x2 : CVT_FROM_FLOAT_V2_SM80<"bf16x2", Int32Regs>;
+
+ // FP8 conversions.
+ multiclass CVT_TO_F8X2 {
+def _f32 :
+ NVPTXInst<(outs Int1
https://github.com/sergey-kozub updated
https://github.com/llvm/llvm-project/pull/102969
>From b74c8bc6009fb2f905089345594b13c8bc75ca36 Mon Sep 17 00:00:00 2001
From: Sergey Kozub
Date: Mon, 12 Aug 2024 12:52:01 -0700
Subject: [PATCH] [NVPTX] Add conversion intrinsics from/to fp8 types (e4m3,
https://github.com/mizvekov closed
https://github.com/llvm/llvm-project/pull/102510
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
Closed as completed elsewhere.
https://github.com/llvm/llvm-project/pull/102510
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,1199 @@
+//=== EffectAnalysis.cpp - Sema warnings for function effects
-===//
+//
+// 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: A
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/98234
>From 902690cdfd3108babf0059098932c6b72c493a07 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Tue, 9 Jul 2024 17:17:39 -0500
Subject: [PATCH] [Clang] Add `__CLANG_GPU_DISABLE_MATH_WRAPPERS` macro for
offloadi
mizvekov wrote:
@zygoloid ping, this is ready for another look.
https://github.com/llvm/llvm-project/pull/100692
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/103714
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/DeinAlptraum updated
https://github.com/llvm/llvm-project/pull/101802
>From 572b1be0b204561fdbb049f0c17f065d17198ac0 Mon Sep 17 00:00:00 2001
From: Jannick Kremer
Date: Sat, 3 Aug 2024 09:28:02 +0100
Subject: [PATCH 1/4] [libclang/python] Fix bug in SourceRange.__contains__,
@@ -50,6 +50,18 @@ unsigned clang_equalLocations(CXSourceLocation loc1,
CXSourceLocation loc2) {
loc1.int_data == loc2.int_data);
}
+unsigned clang_lessThanLocations(CXSourceLocation loc1, CXSourceLocation loc2)
{
+ const SourceLocation Loc1 =
SourceLocation::get
JustinStitt wrote:
> I think serialization is missing for the new bit on BinaryOperator.
How do I add this?
> I'm not sure why we're storing it in the first place, though; it's queried in
> exactly one place, so there isn't really any benefit to precomputing it.
It's queried when we check
https://github.com/bwendling created
https://github.com/llvm/llvm-project/pull/104235
FindCountedByField can be used in more places than CodeGen. Move it into
FieldDecl to avoid layering issues.
>From a87bc65687b687073e8ff37606ca9e783f1edcf9 Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date:
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Bill Wendling (bwendling)
Changes
FindCountedByField can be used in more places than CodeGen. Move it into
FieldDecl to avoid layering issues.
---
Full diff: https://github.com/llvm/llvm-project/pull/104235.diff
4 Files Affected:
- (mo
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
Author: Bill Wendling (bwendling)
Changes
FindCountedByField can be used in more places than CodeGen. Move it into
FieldDecl to avoid layering issues.
---
Full diff: https://github.com/llvm/llvm-project/pull/104235.diff
4 Files Affected
https://github.com/DeinAlptraum updated
https://github.com/llvm/llvm-project/pull/101802
>From 572b1be0b204561fdbb049f0c17f065d17198ac0 Mon Sep 17 00:00:00 2001
From: Jannick Kremer
Date: Sat, 3 Aug 2024 09:28:02 +0100
Subject: [PATCH 1/4] [libclang/python] Fix bug in SourceRange.__contains__,
slinder1 wrote:
Is it best to leave comments on the commit from the PR comment, i.e. currently
https://github.com/llvm/llvm-project/commit/51f72f115b340a092c2c9f8569911b944a4efb6d
?
I can't seem to start a review, so it will be individual comments (I think). Is
there another way to handle thi
https://github.com/bwendling updated
https://github.com/llvm/llvm-project/pull/102549
>From 7ba43ae2b737fbd868848a23b58b3965f8d36ce1 Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date: Tue, 6 Aug 2024 17:49:01 -0700
Subject: [PATCH 01/11] [WIP][Clang] Add __builtin_get_counted_by builtin
The __
@@ -222,6 +222,49 @@ bool Expr::isFlexibleArrayMemberLike(
IgnoreTemplateOrMacroSubstitution);
}
+namespace {
+
+/// MemberExprVisitor - Find the MemberExpr through all of the casts, array
+/// subscripts, and unary ops. This intentiona
@@ -4678,6 +4678,19 @@ void FieldDecl::printName(raw_ostream &OS, const
PrintingPolicy &Policy) const {
DeclaratorDecl::printName(OS, Policy);
}
+const FieldDecl *FieldDecl::FindCountedByField() const {
+ const auto *CAT = getType()->getAs();
+ if (!CAT)
+return nullp
@@ -6590,8 +6590,34 @@ ExprResult Sema::BuildCallExpr(Scope *Scope, Expr *Fn,
SourceLocation LParenLoc,
return CallExpr::Create(Context, Fn, ArgExprs, Context.DependentTy,
VK_PRValue, RParenLoc, CurFPFeatureOverrides());
}
- return BuildResol
https://github.com/bwendling edited
https://github.com/llvm/llvm-project/pull/102549
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -222,6 +222,49 @@ bool Expr::isFlexibleArrayMemberLike(
IgnoreTemplateOrMacroSubstitution);
}
+namespace {
+
+/// MemberExprVisitor - Find the MemberExpr through all of the casts, array
+/// subscripts, and unary ops. This intentiona
https://github.com/bwendling commented:
I made changes to use the CustomTypeChecking for the builtin. PTAL
https://github.com/llvm/llvm-project/pull/102549
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
https://github.com/bob80905 created
https://github.com/llvm/llvm-project/pull/104239
This PR creates a new attribute in HLSL, "TextureDimension", which specifies
the dimension of a specific texture resource.
This PR is another necessary part of completing
https://github.com/llvm/llvm-project/
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Joshua Batista (bob80905)
Changes
This PR creates a new attribute in HLSL, "TextureDimension", which specifies
the dimension of a specific texture resource.
This PR is another necessary part of completing
https://github.com/llvm/llvm-pro
https://github.com/bob80905 updated
https://github.com/llvm/llvm-project/pull/104239
>From aaa455933d3703b84634703fd4fcb5c815aa139e Mon Sep 17 00:00:00 2001
From: Joshua Batista
Date: Wed, 14 Aug 2024 14:02:22 -0700
Subject: [PATCH 1/2] create texture dimension attr
---
clang/include/clang/Ba
JustinStitt wrote:
A good example of a Linux kernel contributor running into an overflow that
should really have its type marked as wrapping :
https://lore.kernel.org/all/zrzk8hiladaj+...@gmail.com/
They could use this feature to mark the suspected field
`percpu_ref->percpu_ref_data->count` a
https://github.com/Artem-B approved this pull request.
https://github.com/llvm/llvm-project/pull/102969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bogner wrote:
What is this attribute supposed to mean? I think we need some design here
before we create the attribute, as it isn't clear to me that a single integer
covers our needs. The texture kinds that need to be representable by this and
whatever other attributes we design are 1D, 2D, 3D
@@ -459,7 +467,506 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -0,0 +1,103 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// TODO: Implement "Buffer", we use a substitute UDT
+// to test the 't' binding type for this test.
+
+template
+struct [[hlsl::resource_class(SRV)]] Buffer {
--
@@ -38,6 +38,14 @@ Decl *SemaHLSL::ActOnStartBuffer(Scope *BufferScope, bool
CBuffer,
HLSLBufferDecl *Result = HLSLBufferDecl::Create(
getASTContext(), LexicalParent, CBuffer, KwLoc, Ident, IdentLoc, LBrace);
+ auto RC = CBuffer ? llvm::hlsl::ResourceClass::CBuffer
+
@@ -459,7 +467,506 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -459,7 +467,506 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -459,7 +467,506 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -459,7 +467,506 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -0,0 +1,103 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// TODO: Implement "Buffer", we use a substitute UDT
+// to test the 't' binding type for this test.
+
+template
+struct [[hlsl::resource_class(SRV)]] Buffer {
+
@@ -459,7 +467,506 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -459,7 +467,506 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -0,0 +1,103 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// TODO: Implement "Buffer"
+struct Eg1 {
+ float f;
+ // Buffer Buf;
+ RWBuffer RWBuf;
+ };
+Eg1 e1 : /* register(t0) :*/ register(u0);
+// Valid: f is skip
@@ -459,7 +467,506 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -459,7 +467,506 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -459,7 +467,506 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -459,7 +467,506 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
@@ -0,0 +1,103 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// TODO: Implement "Buffer", we use a substitute UDT
+// to test the 't' binding type for this test.
+
+template
+struct [[hlsl::resource_class(SRV)]] Buffer {
+
@@ -492,14 +999,21 @@ void SemaHLSL::handleResourceBindingAttr(Decl *D, const
ParsedAttr &AL) {
// Validate.
if (!Slot.empty()) {
switch (Slot[0]) {
damyanp wrote:
Can `getRegisterTypeIndex` be reused here? Seems like there's more than one
table of
@@ -459,7 +467,506 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc));
}
-void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) {
+struct RegisterBindingFlags {
https://github.com/jdoerfert updated
https://github.com/llvm/llvm-project/pull/104168
>From 9e529ede3a97513ec0afee6c4538e7299d2933f0 Mon Sep 17 00:00:00 2001
From: Johannes Doerfert
Date: Mon, 12 Aug 2024 11:53:06 -0700
Subject: [PATCH] [Offload] Provide a kernel library useable by the offload
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/103489
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -392,25 +392,52 @@ EXTERN void *omp_target_memset(void *Ptr, int ByteVal,
size_t NumBytes,
DP("filling memory on host via memset");
memset(Ptr, ByteVal, NumBytes); // ignore return value, memset() cannot
fail
} else {
-// TODO: replace the omp_target_memset()
@@ -0,0 +1,53 @@
+//===-- Kenrels/Memory.cpp - Memory related kernel definitions
===//
+//
+// 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
@@ -1533,6 +1533,55 @@ Error GenericDeviceTy::printInfo() {
return Plugin::success();
}
+Expected
+GenericDeviceTy::getKernel(llvm::StringRef Name, DeviceImageTy *ImagePtr) {
+
+ GenericKernelTy *&KernelPtr = KernelMap[Name];
+ if (!KernelPtr) {
jhuber6 wr
@@ -392,25 +392,52 @@ EXTERN void *omp_target_memset(void *Ptr, int ByteVal,
size_t NumBytes,
DP("filling memory on host via memset");
memset(Ptr, ByteVal, NumBytes); // ignore return value, memset() cannot
fail
} else {
-// TODO: replace the omp_target_memset()
201 - 300 of 409 matches
Mail list logo