https://github.com/xlauko updated
https://github.com/llvm/llvm-project/pull/136604
>From a715e75eff27a5b37aca95ef7bbe1c217a1f5463 Mon Sep 17 00:00:00 2001
From: xlauko
Date: Mon, 21 Apr 2025 21:51:06 +0200
Subject: [PATCH] [CIR] Make ZeroAttr use AttrBuilderWithInferredContext
---
clang/inclu
llvmbot wrote:
@llvm/pr-subscribers-lld
Author: Feng Zou (fzou1)
Changes
Introduce an option (-mapx-relax-relocations) to control the emission of the
new APX relocations. It's off by default to keep backward compatibility with
old version of ld and other linkers without APX support. And
llvmbot wrote:
@llvm/pr-subscribers-lld-elf
@llvm/pr-subscribers-backend-x86
Author: Feng Zou (fzou1)
Changes
Introduce an option (-mapx-relax-relocations) to control the emission of the
new APX relocations. It's off by default to keep backward compatibility with
old version of ld and ot
https://github.com/fzou1 created
https://github.com/llvm/llvm-project/pull/136660
Introduce an option (-mapx-relax-relocations) to control the emission of the
new APX relocations. It's off by default to keep backward compatibility with
old version of ld and other linkers without APX support. A
https://github.com/xlauko updated
https://github.com/llvm/llvm-project/pull/136604
>From 7790612aabf4a310328b16551620edf0704d5453 Mon Sep 17 00:00:00 2001
From: xlauko
Date: Mon, 21 Apr 2025 21:51:06 +0200
Subject: [PATCH] [CIR] Make ZeroAttr use AttrBuilderWithInferredContext
---
clang/inclu
https://github.com/xlauko updated
https://github.com/llvm/llvm-project/pull/136604
>From 6f59c473e8ecef0aeaa4d9eb02d41d2e97696615 Mon Sep 17 00:00:00 2001
From: xlauko
Date: Mon, 21 Apr 2025 21:51:06 +0200
Subject: [PATCH] [CIR] Make ZeroAttr use AttrBuilderWithInferredContext
---
clang/inclu
xlauko wrote:
### Merge activity
* **Apr 22, 2:26 AM EDT**: A user started a stack merge that includes this pull
request via
[Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/136604).
https://github.com/llvm/llvm-project/pull/136604
_
https://github.com/arsenm edited
https://github.com/llvm/llvm-project/pull/135733
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -429,7 +411,9 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
set( LIBCLC_ARCH_OBJFILE_DIR "${LIBCLC_OBJFILE_DIR}/${arch_suffix}" )
file( MAKE_DIRECTORY ${LIBCLC_ARCH_OBJFILE_DIR} )
-list( APPEND build_flags -cl-std=${opencl_lang_std} )
+# Build for OpenCL 3.0 an
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/136444
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3038,8 +3038,30 @@ static Address EmitX86_64VAArgFromMemory(CodeGenFunction
&CGF,
return Address(Res, LTy, Align);
}
+static RValue EmitMSABIVAArg(CodeGenFunction &CGF, Address VAListAddr,
+ QualType Ty, AggValueSlot Slot,
+
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
> Please add a unit test demonstrating that the related issue is fixed.
Added 👍
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
@@ -122,7 +122,10 @@ void
UseDesignatedInitializersCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
initListExpr(
hasType(cxxRecordDecl(RestrictToPODTypes ? isPOD() : isAggregate(),
-unless(HasBaseWithFields))
@@ -182,6 +182,11 @@ Changes in existing checks
``constexpr`` and ``static``` values on member initialization and by
detecting
explicit casting of built-in types within member list initialization.
+- Improved :doc:`modernize-use-designated-initializers
+ ` check by avoid
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/134774
>From 5dc7aa51c52b2fd31c182af964152765bed72ec7 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Mon, 7 Apr 2025 23:21:50 -0400
Subject: [PATCH] [clang-tidy] Avoid diagnosing std::array initializations for
mo
@@ -0,0 +1,105 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --check-globals all --version 5
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wno-pmf-conversions %s -O3
-emit-llvm -o - | FileCheck %s
+
+struct A {
+ int data;
+//.
+//
https://github.com/ChunyuLiao closed
https://github.com/llvm/llvm-project/pull/136556
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Liao Chunyu
Date: 2025-04-22T12:34:39+08:00
New Revision: 9e26c797ae9699fba8bd62af99ab3ad6f9b16462
URL:
https://github.com/llvm/llvm-project/commit/9e26c797ae9699fba8bd62af99ab3ad6f9b16462
DIFF:
https://github.com/llvm/llvm-project/commit/9e26c797ae9699fba8bd62af99ab3ad6f9b16462.diff
L
https://github.com/topperc approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/136556
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ssahasra edited
https://github.com/llvm/llvm-project/pull/136280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ssahasra edited
https://github.com/llvm/llvm-project/pull/136280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChunyuLiao updated
https://github.com/llvm/llvm-project/pull/136556
>From 43e266b5a8f51ecd79df3156b20b48762699afd4 Mon Sep 17 00:00:00 2001
From: Liao Chunyu
Date: Mon, 21 Apr 2025 04:18:56 -0400
Subject: [PATCH] [RISCV] Add smcntrpmf extension
spec: https://github.com/riscv
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/135733
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14706,6 +14706,8 @@ ExprResult Sema::BuildOverloadedCallExpr(Scope *S, Expr
*Fn,
// the UnresolvedLookupExpr was type-dependent.
if (OverloadResult == OR_Success) {
const FunctionDecl *FDecl = Best->Function;
+if (LangOpts.CUDA)
yxsamliu wrote:
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Yaxun (Sam) Liu (yxsamliu)
Changes
In a lambda function, a call of a function may
resolve to host and device functions with different
signatures. Especially, a constexpr local variable may
be passed by value by the device function and
passe
https://github.com/yxsamliu created
https://github.com/llvm/llvm-project/pull/136645
In a lambda function, a call of a function may
resolve to host and device functions with different
signatures. Especially, a constexpr local variable may
be passed by value by the device function and
passed by r
dtcxzyw wrote:
> > IIRC this feature is orthogonal to GCC bound member functions. `declcall`
> > with a virtual method just returns a pmf, and we still need to perform
> > vtable lookup at the callsite: https://compiler-explorer.com/z/YrT3nPTEz
>
> Try `declcall(p->B::virtual_method())`?:
> h
https://github.com/MythreyaK updated
https://github.com/llvm/llvm-project/pull/136106
>From d03c7afdd497011335590448fef886395cc815d2 Mon Sep 17 00:00:00 2001
From: daiyousei-qz
Date: Tue, 14 Nov 2023 20:42:10 -0800
Subject: [PATCH 1/5] Improve BlockEnd presentation including: 1. Explicitly
sta
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/136295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Younan Zhang
Date: 2025-04-22T10:41:16+08:00
New Revision: b144258b0c0cc63dffba00a911d6539f00ed07bb
URL:
https://github.com/llvm/llvm-project/commit/b144258b0c0cc63dffba00a911d6539f00ed07bb
DIFF:
https://github.com/llvm/llvm-project/commit/b144258b0c0cc63dffba00a911d6539f00ed07bb.diff
rockeet wrote:
> > Yes, I'm very eager for this feature, let me investigate the RFC proposal
> > routine.
>
> I would recommend you also include details about how the extension meets our
> [usual criteria](https://clang.llvm.org/get_involved.html#criteria) when you
> write the RFC.
Thank you
hubert-reinterpretcast wrote:
> IIRC this feature is orthogonal to GCC bound member functions. `declcall`
> with a virtual method just returns a pmf, and we still need to perform vtable
> lookup at the callsite: https://compiler-explorer.com/z/YrT3nPTEz
Try `declcall(p->B::virtual_method())`?:
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/135733
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
wenju-he wrote:
> > LGTM. That means we compile for the last OpenCL version, which is 3.0, and
> > enable all OpenCL extensions/features, right?
>
> Yes. Otherwise you have to still write the code to work with the lowest
> common denominator.
done in commit
https://github.com/llvm/llvm-proje
wenju-he wrote:
> An OpenCL 1.2 module could still call a builtin that makes internal use of
> CLC `ctz`, for example.
Yes, you're right.
https://github.com/llvm/llvm-project/pull/135733
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/135733
>From 64d7bfdceb5a0a6fbf34bb15cd7d6cbeb9214881 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Mon, 14 Apr 2025 19:20:25 -0700
Subject: [PATCH 1/5] [libclc] Set OpenCL version to 3.0
This PR is cherry-pick of ht
AustinSchuh wrote:
@Artem-B , 2 things.
1) Looks like I was too slow and had to fix merge conflicts. Please take
another look.
2) Can you submit? I don't have submit permission yet, and realistically,
unless you've got more requests for improvements to surface support, odds are
low I'll be
@@ -1453,6 +1454,14 @@
// RUN: -o - | FileCheck --check-prefix=CHECK-SMCSRIND-EXT %s
// CHECK-SMCSRIND-EXT: __riscv_smcsrind 100{{$}}
+// RUN: %clang --target=riscv32 \
tclin914 wrote:
Put the test for `smcntrpmf` above for `smcsrind`
https://github.
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/136295
>From 8efadc35d64f2724d5610a7ae66fa70a7c8e3d46 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 18 Apr 2025 19:20:49 +0800
Subject: [PATCH 1/2] [Clang] Improve error recovery for invalid calls
It doesn't
https://github.com/AustinSchuh updated
https://github.com/llvm/llvm-project/pull/134758
>From 1e6367407a4b23b2a85f088ba4b66a0c0afc8faa Mon Sep 17 00:00:00 2001
From: Austin Schuh
Date: Mon, 7 Apr 2025 17:18:38 -0700
Subject: [PATCH 1/2] cuda clang: Move nvptx-surface.cu test to CodeGenCUDA
Sig
dtcxzyw wrote:
> > We used this extension to improve virtual function calling performance,
> > there are simple and small virtual functions which are frequently called
> > and can not be eliminated and it is in a delegation thus compiler can not
> > optimize.
> > [toplingdb](https://github.com
@@ -0,0 +1,175 @@
+//===--- llvm-isel-fuzzer.cpp - Fuzzer for instruction selection
--===//
shiltian wrote:
also, I wonder why do we need an extra binary for this?
https://github.com/llvm/llvm-project/pull/123609
@@ -0,0 +1,175 @@
+//===--- llvm-isel-fuzzer.cpp - Fuzzer for instruction selection
--===//
shiltian wrote:
the file name doesn't match the actual file name
https://github.com/llvm/llvm-project/pull/123609
___
@@ -0,0 +1,175 @@
+#include "llvm/Target/TargetVerify/AMDGPUTargetVerifier.h"
shiltian wrote:
This file doesn't have LLVM copyright header
https://github.com/llvm/llvm-project/pull/123609
___
cfe-commits mailing list
c
@@ -2040,6 +2043,8 @@ void AMDGPUCodeGenPassBuilder::addIRPasses(AddIRPass
&addPass) const {
// but EarlyCSE can do neither of them.
if (isPassEnabled(EnableScalarIRPasses))
addEarlyCSEOrGVNPass(addPass);
+
+ addPass(AMDGPUTargetVerifierPass());
shilt
@@ -1298,6 +1299,8 @@ void AMDGPUPassConfig::addIRPasses() {
addPass(createLICMPass());
}
+ //addPass(AMDGPUTargetVerifierPass());
shiltian wrote:
left over
https://github.com/llvm/llvm-project/pull/123609
___
@@ -0,0 +1,175 @@
+#include "llvm/Target/TargetVerify/AMDGPUTargetVerifier.h"
+
+#include "llvm/Analysis/UniformityAnalysis.h"
+#include "llvm/Analysis/PostDominators.h"
+#include "llvm/Support/Debug.h"
+#include "llvm/IR/Dominators.h"
+#include "llvm/IR/Function.h"
+#include "llv
wenju-he wrote:
> You could just have `cos_fp32.cl` and `cos_fp16.cl`, of course.
Yes. To enable overriding generic implementation of `cos.cl`, the names in
target folder could be `cos.cl` and `cos_fp16.cl`
> I would like to further investigate weak linkage as another means of
> overriding sp
jofrn wrote:
> Does this sound like a viable approach?
Yes, it does sound like a good idea. Just added the implementation of
`registerVerifierCallbacks`.
https://github.com/llvm/llvm-project/pull/123609
___
cfe-commits mailing list
cfe-commits@lists.l
jofrn wrote:
>I don't think it makes sense to have a target-specific "verifier":
>verification sets the limits of what optimizations are allowed to do. And that
>determination needs to be target-independent, or else target-independent
>optimizations can't exist.
This would be run during the b
@@ -2381,25 +2387,38 @@ def INT_PTX_LDG_G_v4i32_ELE : VLDG_G_ELE_V4<"u32",
Int32Regs>;
def INT_PTX_LDG_G_v4f32_ELE : VLDG_G_ELE_V4<"f32", Float32Regs>;
-multiclass NG_TO_G {
- def "" : NVPTXInst<(outs Int32Regs:$result), (ins Int32Regs:$src),
- "cvta." # Str # ".u
https://github.com/jofrn updated
https://github.com/llvm/llvm-project/pull/123609
>From 210b6d80bcfbbcd216f98199df386280724561e2 Mon Sep 17 00:00:00 2001
From: jofernau
Date: Mon, 20 Jan 2025 04:51:26 -0800
Subject: [PATCH 01/11] [TargetVerifier][AMDGPU] Add TargetVerifier.
This pass verifies
tgross35 wrote:
Talked to arsenm on discord, long discussion starting around here
https://discord.com/channels/636084430946959380/636732535434510338/1362207130559578185.
The outcome is that this is effectively a target option and needs to be tied
to the triple rather than per-module. Which mak
@@ -3349,9 +3351,14 @@ ASTReader::ReadControlBlock(ModuleFile &F,
.getModuleCache()
.getInMemoryModuleCache()
.isPCMFinal(F.FileName);
- if (isDiagnosedResult(
zygoloid wrote:
> Not sure if anyone has mentioned this elsewhere, but there's a significant
> problem with the type of the returned function pointer: a normal function
> pointer doesn't necessarily have the correct calling convention. In practice,
> this is likely to cause problems on Windows
@@ -89,12 +89,12 @@ RESOURCE Buffer;
// CHECK-SAME{LITERAL}: [[hlsl::raw_buffer]]
// CHECK-SAME{LITERAL}: [[hlsl::contained_type(element_type)]]
-// CHECK-SUBSCRIPT: CXXMethodDecl {{.*}} operator[] 'const element_type
&(unsigned int) const'
+// CHECK-SUBSCRIPT: CXXMethodDecl
@@ -121,15 +121,15 @@ RESOURCE Buffer;
// CHECK-SUBSCRIPT-NEXT: DeclRefExpr {{.*}} 'unsigned int' ParmVar {{.*}}
'Index' 'unsigned int'
// CHECK-SUBSCRIPT-NEXT: AlwaysInlineAttr {{.*}} Implicit always_inline
-// CHECK-NOSUBSCRIPT-NOT: CXXMethodDecl {{.*}} operator[] 'const el
https://github.com/hekota edited
https://github.com/llvm/llvm-project/pull/127675
___
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! Just a couple of nits. Apologies for the delay, I was on vacation last
week. :)
https://github.com/llvm/llvm-project/pull/127675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`llvm-clang-x86_64-gcc-ubuntu-no-asserts` running on `doug-worker-6` while
building `clang` at step 6 "test-build-unified-tree-check-all".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/202/builds/818
hubert-reinterpretcast wrote:
> We used this extension to improve virtual function calling performance, there
> are simple and small virtual functions which are frequently called and can
> not be eliminated and it is in a delegation thus compiler can not optimize.
>
> [toplingdb](https://githu
@@ -280,8 +282,10 @@ NVPTXTargetMachine::getPredicatedAddrSpace(const Value *V)
const {
case Intrinsic::nvvm_isspacep_local:
return std::make_pair(II->getArgOperand(0), llvm::ADDRESS_SPACE_LOCAL);
case Intrinsic::nvvm_isspacep_shared:
-case Intrinsic::nvvm_is
@@ -3349,9 +3351,14 @@ ASTReader::ReadControlBlock(ModuleFile &F,
.getModuleCache()
.getInMemoryModuleCache()
.isPCMFinal(F.FileName);
- if (isDiagnosedResult(
@@ -3349,9 +3351,14 @@ ASTReader::ReadControlBlock(ModuleFile &F,
.getModuleCache()
.getInMemoryModuleCache()
.isPCMFinal(F.FileName);
- if (isDiagnosedResult(
@@ -0,0 +1,62 @@
+/// This tests the expected error case when there is a mismatch between the
pcm dependencies passed in
+/// the command line with `fmodule-file` and whats encoded in the pcm.
+
+/// The steps are:
+/// 1. Build module (A-1) with no dependencies.
+/// 2. Build
https://github.com/cyndyishida updated
https://github.com/llvm/llvm-project/pull/136612
>From 046b60179ee5eddc6db2193406bfc2ef10fda3df Mon Sep 17 00:00:00 2001
From: Cyndy Ishida
Date: Mon, 21 Apr 2025 13:20:12 -0700
Subject: [PATCH 1/3] [clang][Modules] Report when` lookupModuleFile` fails and
cyndyishida wrote:
> What would happen if both A-1.pcm and A-2.pcm are built for the same files
> (e.g., from Sysroot) but have different file names? Not saying it is a valid
> use case to support, just curious what would happen.
I tried this, where basically `A-1.pcm` is built again but with
@@ -97,11 +97,13 @@ class OpenACCClauseCIREmitter final
// Handle a clause affected by the 'device-type' to the point that they need
// to have the attributes added in the correct/corresponding order, such as
- // 'num_workers' or 'vector_length' on a compute construct.
-
@@ -97,11 +97,13 @@ class OpenACCClauseCIREmitter final
// Handle a clause affected by the 'device-type' to the point that they need
// to have the attributes added in the correct/corresponding order, such as
- // 'num_workers' or 'vector_length' on a compute construct.
-
https://github.com/andykaylor approved this pull request.
Looks good to me. Just a couple of nits regarding the comment block.
https://github.com/llvm/llvm-project/pull/136626
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
https://github.com/andykaylor edited
https://github.com/llvm/llvm-project/pull/136626
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,62 @@
+/// This tests the expected error case when there is a mismatch between the
pcm dependencies passed in
+/// the command line with `fmodule-file` and whats encoded in the pcm.
+
+/// The steps are:
+/// 1. Build module (A-1) with no dependencies.
+/// 2. Build
https://github.com/vsapsai commented:
What would happen if both A-1.pcm and A-2.pcm are built for the same files
(e.g., from Sysroot) but have different file names? Not saying it is a valid
use case to support, just curious what would happen.
https://github.com/llvm/llvm-project/pull/136612
__
https://github.com/vsapsai edited
https://github.com/llvm/llvm-project/pull/136612
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,62 @@
+/// This tests the expected error case when there is a mismatch between the
pcm dependencies passed in
+/// the command line with `fmodule-file` and whats encoded in the pcm.
+
+/// The steps are:
+/// 1. Build module (A-1) with no dependencies.
+/// 2. Build
@@ -0,0 +1,62 @@
+/// This tests the expected error case when there is a mismatch between the
pcm dependencies passed in
+/// the command line with `fmodule-file` and whats encoded in the pcm.
+
+/// The steps are:
+/// 1. Build module (A-1) with no dependencies.
+/// 2. Build
@@ -3311,12 +3314,11 @@ ASTReader::ReadControlBlock(ModuleFile &F,
SignatureBytes.end());
Blob = Blob.substr(ASTFileSignature::size);
-if (ImportedFile.empty()) {
- // Use BaseDirectoryAsWritten to ens
@@ -3228,6 +3228,62 @@ static QualType builtinCommonTypeImpl(Sema &S,
TemplateName BaseTemplate,
}
}
+static bool isInVkNamespace(const RecordType *RT) {
+ DeclContext *DC = RT->getDecl()->getDeclContext();
+ if (!DC)
+return false;
+
+ NamespaceDecl *ND = dyn_cast(D
@@ -5444,6 +5459,31 @@ QualType ASTContext::getHLSLAttributedResourceType(
return QualType(Ty, 0);
}
+
+QualType ASTContext::getHLSLInlineSpirvType(uint32_t Opcode, uint32_t Size,
+uint32_t Alignment,
+
@@ -877,6 +878,11 @@ bool CodeGenTypes::isZeroInitializable(QualType T) {
if (const MemberPointerType *MPT = T->getAs())
return getCXXABI().isZeroInitializable(MPT);
+ // HLSL Inline SPIR-V types are non-zero-initializable.
+ if (T->getAs()) {
+return false;
+ }
-
@@ -6330,6 +6331,140 @@ class HLSLAttributedResourceType : public Type, public
llvm::FoldingSetNode {
findHandleTypeOnResource(const Type *RT);
};
+/// Instances of this class represent operands to a SPIR-V type instruction.
+class SpirvOperand {
+public:
+ enum SpirvOpera
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.0-compute %s \
+// RUN: -fsyntax-only -verify
+
+typedef vk::SpirvType<12, 2, 4, float> InvalidType1; // expected-error {{use
of undeclared identifier 'vk'}}
+vk::Li
llvm-beanz wrote:
Please move to SemaHLSL.
https://github.com/llvm/llvm-project/pull/134034
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3228,6 +3228,62 @@ static QualType builtinCommonTypeImpl(Sema &S,
TemplateName BaseTemplate,
}
}
+static bool isInVkNamespace(const RecordType *RT) {
+ DeclContext *DC = RT->getDecl()->getDeclContext();
+ if (!DC)
+return false;
+
+ NamespaceDecl *ND = dyn_cast(D
@@ -3332,6 +3388,39 @@ checkBuiltinTemplateIdType(Sema &SemaRef,
BuiltinTemplateDecl *BTD,
}
return HasNoTypeMember;
}
+
+ case BTK__hlsl_spirv_type: {
+assert(Converted.size() == 4);
+
+if (!Context.getTargetInfo().getTriple().isSPIRV()) {
+ SemaRef.Di
@@ -3332,6 +3388,39 @@ checkBuiltinTemplateIdType(Sema &SemaRef,
BuiltinTemplateDecl *BTD,
}
return HasNoTypeMember;
}
+
+ case BTK__hlsl_spirv_type: {
+assert(Converted.size() == 4);
+
+if (!Context.getTargetInfo().getTriple().isSPIRV()) {
+ SemaRef.Di
@@ -6330,6 +6331,140 @@ class HLSLAttributedResourceType : public Type, public
llvm::FoldingSetNode {
findHandleTypeOnResource(const Type *RT);
};
+/// Instances of this class represent operands to a SPIR-V type instruction.
+class SpirvOperand {
+public:
+ enum SpirvOpera
@@ -0,0 +1,28 @@
+//===- hlsl_spirv.h - HLSL definitions for SPIR-V target
--===//
+//
+// 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
@@ -6330,6 +6331,140 @@ class HLSLAttributedResourceType : public Type, public
llvm::FoldingSetNode {
findHandleTypeOnResource(const Type *RT);
};
+/// Instances of this class represent operands to a SPIR-V type instruction.
+class SpirvOperand {
+public:
+ enum SpirvOpera
llvm-beanz wrote:
Cool... cool... This is fine, but it looks like #130910 rewrote the line
endings on some test files to CRLF.
@hekota might be worth checking your editor settings and cleaning up the test
files to avoid every edit rewriting every line of the
@@ -369,14 +369,102 @@ llvm::Type
*CommonSPIRTargetCodeGenInfo::getOpenCLType(CodeGenModule &CGM,
return nullptr;
}
+// Gets a spirv.IntegralConstant or spirv.Literal. If IntegralType is present,
+// returns an IntegralConstant, otherwise returns a Literal.
+static llvm::Ty
https://github.com/llvm-beanz commented:
A few substantive comments, but mostly coding standard nits.
https://github.com/llvm/llvm-project/pull/134034
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
@@ -6165,6 +6254,18 @@ bool
UnnamedLocalNoLinkageFinder::VisitHLSLAttributedResourceType(
return Visit(T->getWrappedType());
}
+bool UnnamedLocalNoLinkageFinder::VisitHLSLInlineSpirvType(
+const HLSLInlineSpirvType *T) {
+ for (auto &Operand : T->getOperands()) {
+
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/134034
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=?utf-8?q?Théo?= de Magalhaes
Message-ID:
In-Reply-To:
https://github.com/efriedma-quic closed
https://github.com/llvm/llvm-project/pull/136062
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
Author: Theo de Magalhaes
Date: 2025-04-21T15:25:14-07:00
New Revision: 3ca2fa704e149ca22bd9739101ee7d5c498eb1a6
URL:
https://github.com/llvm/llvm-project/commit/3ca2fa704e149ca22bd9739101ee7d5c498eb1a6
DIFF:
https://github.com/llvm/llvm-project/commit/3ca2fa704e149ca22bd9739101ee7d5c498eb1a6.d
=?utf-8?q?Th=C3=A9o?= de Magalhaes
Message-ID:
In-Reply-To:
https://github.com/efriedma-quic approved this pull request.
Oh, I see, I missed the nesting.
LGTM
https://github.com/llvm/llvm-project/pull/136062
___
cfe-commits mailing list
cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Erich Keane (erichkeane)
Changes
Async acts just like num_workers/vector_length in that it gets a new variant
per device_type and is lowered as an operand.
However, it has one additional complication, in that it can have a variant that
h
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/136626
Async acts just like num_workers/vector_length in that it gets a new variant
per device_type and is lowered as an operand.
However, it has one additional complication, in that it can have a variant that
has
1 - 100 of 390 matches
Mail list logo