[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

[libclc] [libclc] Move atan2/atan2pi to the CLC library (PR #133226)

2025-03-27 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/133226 As with other work in this area, these builtins are now vectorized. A further table has been split into two. There was discrepancy between comments above the table describing the values as "lead" and "tail"

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -14926,6 +14926,42 @@ bool IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr( return false; } + case UETT_CountOf: { +QualType Ty = E->getTypeOfArgument(); +assert(Ty->isArrayType()); + +// We don't need to worry about array element qualifiers, so getting t

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > There is weak consensus to add `stdcountof.h` which supplies a `countof` > > macro. However, there's no changes to the standard which add one (yet), so > > I figured that can be done in a follow-up. > > Then I'd really like a feature. We already have a bunch, It makes s

[libclc] [libclc] Move atan2/atan2pi to the CLC library (PR #133226)

2025-03-27 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/133226 >From 497781f9fe1d1750d37a36948be285cdb6c14b04 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 25 Mar 2025 18:19:38 + Subject: [PATCH 1/2] [libclc] Move atan2/atan2pi to the CLC library --- li

[libclc] [libclc] Pass -fapprox-func when compiling 'native' builtins (PR #133119)

2025-03-27 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: I've pushed an update with uses the `COMPILE_OPTIONS` property. It's definitely better, thanks for the suggestion. It would be best if there were `CMakeLists.txt` in each sub-directory which added the properties. However, because we currently have this system where targets

[libclc] [libclc] Move __clc_(remainder|fmod|remquo) to the CLC library (PR #132054)

2025-03-27 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/132054 >From e480113652a1a371e296192d4e1460af26a8a436 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Wed, 19 Mar 2025 14:52:09 + Subject: [PATCH 1/3] [libclc] Move __clc_remainder to CLC library It was al

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -14926,6 +14926,42 @@ bool IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr( return false; } + case UETT_CountOf: { AaronBallman wrote: I'll add support for this there. https://github.com/llvm/llvm-project/pull/133125 ___

[clang] [llvm] [RISCV] Add MC layer support for XSfmm*. (PR #133031)

2025-03-27 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: > > but won't merge them until they are ratified just like Zvzip/Zvabd/Zibimm > > I think this patch is supported to be the vendor instruction set of `SiFive > Xsfmm* Attached Matrix Extensions` if I understand correctly of this PR. > > AME is another issue that we don’t have

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-27 Thread Henrich Lauko via cfe-commits
@@ -710,6 +710,89 @@ class ScalarExprEmitter : public StmtVisitor { HANDLEBINOP(Xor) HANDLEBINOP(Or) #undef HANDLEBINOP + + mlir::Value emitCmp(const BinaryOperator *e) { +mlir::Value result; +QualType lhsTy = e->getLHS()->getType(); +QualType rhsTy = e->getRH

[clang] [llvm] [RISCV] Add MC layer support for XSfmm*. (PR #133031)

2025-03-27 Thread Jiuyang Liu via cfe-commits
sequencer wrote: > SiFive's AME proposal locates in OP-V/OP-VE category Yes, this is a good point. I do think we should also remove other vendor instruction sets which abused the standard op fields. https://github.com/llvm/llvm-project/pull/133031 _

[clang] [llvm] Revert "[MIPS] Define SubTargetFeature for i6500 cpu" (PR #133215)

2025-03-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Djordje Todorovic (djtodoro) Changes Reverts llvm/llvm-project#132907 due to some test failures. --- Full diff: https://github.com/llvm/llvm-project/pull/133215.diff 3 Files Affected: - (removed) clang/test/CodeGen/Mips/subtarget-featur

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,68 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c2y -pedantic -Wall -Wno-comment -verify %s + +/* WG14 N3369: Clang 21 + * _Lengthof operator + * + * Adds an operator to get the length of an array. Note that WG14 N3469 renamed + * this operator to _Countof. + */ -

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -141,6 +141,12 @@ C2y Feature Support paper also introduced octal and hexadecimal delimited escape sequences (e.g., ``"\x{12}\o{12}"``) which are also supported as an extension in older C language modes. +- Implemented `WG14 N3369

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread via cfe-commits
cor3ntin wrote: > So you want this to be a FEATURE in C2y and an EXTENSION in older language > modes? Presumably yes. > And when we get the countof macro in a few months, this becomes unnecessary? Are most users going to include `stdcountof.h` ? My assumption is that they would not, so havi

[clang] [RFC][clang] Handle friend function that was a definition but became only a declaration during AST deserialization (PR #132214)

2025-03-27 Thread Dmitry Polukhin via cfe-commits
@@ -2572,7 +2572,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl( // Friend function defined withing class template may stop being function // definition during AST merges from different modules, in this case decl // with function body should be used for instantiat

[clang] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

2025-03-27 Thread Jean-Didier PAILLEUX via cfe-commits
https://github.com/JDPailleux updated https://github.com/llvm/llvm-project/pull/132409 >From 9522fe01070c44cdb5562b048aa94d68a8117fd1 Mon Sep 17 00:00:00 2001 From: Jean-Didier Pailleux Date: Tue, 18 Mar 2025 14:51:05 +0100 Subject: [PATCH] [flang] Expose -m64 option --- clang/include/clang/D

[clang] [libc] [Clang] Make `--lto-partitions` only default for HIP (PR #133164)

2025-03-27 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/133164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [libcxx] [llvm] [llvm-reduce]: print short form, actionable names in the log (PR #132813)

2025-03-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: None (YLChenZ) Changes Closes #132696. before the patch like this: ``` *** Reducing GlobalObjects... *** Reducing GV Initializers... *** Reducin

[clang] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

2025-03-27 Thread Jean-Didier PAILLEUX via cfe-commits
https://github.com/JDPailleux updated https://github.com/llvm/llvm-project/pull/132409 >From 10add8793e15a4767c772556763a8c063c0eb667 Mon Sep 17 00:00:00 2001 From: Jean-Didier Pailleux Date: Tue, 18 Mar 2025 14:51:05 +0100 Subject: [PATCH] [flang] Expose -m64 option --- clang/include/clang/D

[clang] Fix complex long division with -mno-x87. (PR #133152)

2025-03-27 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/133152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-27 Thread Martin Uecker via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

[clang-tools-extra] [clang-tidy][misc-const-correctness] fix fp when using const array type. (PR #133018)

2025-03-27 Thread Carlos Galvez via cfe-commits
@@ -1007,3 +1007,11 @@ template void f() { x[T{}] = 3; } } // namespace gh127776_false_positive + +namespace gh132931_false_positive { +using T = const int; +void valid(int i) { + const int arr0[] = {1, 2, 3}; + T arr1[] = {1, 2, 3}; carlosgalvezp wrote:

[clang] [PATCH] [clang][frontend] Fix AllocKind retrieving for `CXXConstructorDecl` refs #132794 (PR #133077)

2025-03-27 Thread via cfe-commits
@@ -316,6 +316,7 @@ Bug Fixes in This Version - Fixed a modules crash where exception specifications were not propagated properly (#GH121245, relanded in #GH129982) - Fixed a problematic case with recursive deserialization within ``FinishedDeserializing()`` where ``PassInte

[clang-tools-extra] [clang-tidy][misc-const-correctness] fix fp when using const array type. (PR #133018)

2025-03-27 Thread Carlos Galvez via cfe-commits
@@ -1007,3 +1007,11 @@ template void f() { x[T{}] = 3; } } // namespace gh127776_false_positive + +namespace gh132931_false_positive { +using T = const int; +void valid(int i) { + const int arr0[] = {1, 2, 3}; + T arr1[] = {1, 2, 3}; carlosgalvezp wrote:

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,68 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c2y -pedantic -Wall -Wno-comment -verify %s + +/* WG14 N3369: Clang 21 + * _Lengthof operator + * + * Adds an operator to get the length of an array. Note that WG14 N3469 renamed + * this operator to _Countof. + */ -

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -4338,6 +4338,21 @@ bool Sema::CheckUnaryExprOrTypeTraitOperand(Expr *E, E->getSourceRange(), ExprKind)) return true; + if (ExprKind == UETT_CountOf) { +// The type has to be an array type. We already checked for incomplete +

[clang-tools-extra] [clang-tidy][misc-const-correctness] fix fp when using const array type. (PR #133018)

2025-03-27 Thread Carlos Galvez via cfe-commits
@@ -89,6 +89,8 @@ void ConstCorrectnessCheck::registerMatchers(MatchFinder *Finder) { const auto ConstReference = hasType(references(isConstQualified())); carlosgalvezp wrote: All the tests (including the FP at hand) pass if you remove `unless(arrayType()` f

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -14926,6 +14926,42 @@ bool IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr( return false; } + case UETT_CountOf: { +QualType Ty = E->getTypeOfArgument(); +assert(Ty->isArrayType()); + +// We don't need to worry about array element qualifiers, so getting t

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-27 Thread Ryotaro Kasuga via cfe-commits
https://github.com/kasuga-fj closed https://github.com/llvm/llvm-project/pull/131985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (PR #133212)

2025-03-27 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks https://github.com/llvm/llvm-project/pull/133212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a967251 - [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (#133212)

2025-03-27 Thread via cfe-commits
Author: Younan Zhang Date: 2025-03-27T19:40:02+08:00 New Revision: a9672515ce6b8b1bc6976ed1225f4fb4d53fa381 URL: https://github.com/llvm/llvm-project/commit/a9672515ce6b8b1bc6976ed1225f4fb4d53fa381 DIFF: https://github.com/llvm/llvm-project/commit/a9672515ce6b8b1bc6976ed1225f4fb4d53fa381.diff

[clang] [RFC][clang] Fix for regression #130917 (PR #132214)

2025-03-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dmitry Polukhin (dmpolukhin) Changes Changes in #111992 was too broad. This change reduces scope of previous fix. Unfortunately in clang there is no way to know when redeclaration was craeted artificially due to AST mergse and when it was

[clang] [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (PR #133212)

2025-03-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/133212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move atan2/atan2pi to the CLC library (PR #133226)

2025-03-27 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/133226 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] 3284559 - [libclc] Move atan2/atan2pi to the CLC library (#133226)

2025-03-27 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-03-27T10:59:09Z New Revision: 3284559cca4bc64e78e8243bb34195216e8979ee URL: https://github.com/llvm/llvm-project/commit/3284559cca4bc64e78e8243bb34195216e8979ee DIFF: https://github.com/llvm/llvm-project/commit/3284559cca4bc64e78e8243bb34195216e8979ee.diff LOG

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/133125 >From 75ef42d644da9136fb07014ade18b6be137426a1 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 26 Mar 2025 12:54:29 -0400 Subject: [PATCH 1/7] [C2y] Implement WG14 N3369 and N3469 (_Countof) C2y ad

[clang] [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (PR #133212)

2025-03-27 Thread via cfe-commits
@@ -19849,11 +19849,14 @@ static void DoMarkVarDeclReferenced( SemaRef.InstantiateVariableDefinition(PointOfInstantiation, Var); }); -// Re-set the member to trigger a recomputation of the dependence bits -// for the expression. -if (a

[clang] [NFC][clang] Remove superfluous header files after refactor in #132252 (PR #132495)

2025-03-27 Thread Jonathan Thackray via cfe-commits
jthackray wrote: > How'd you manage to find the right ones? IMO we should be using > include-what-you-use on these to make sure we get it right (if you have > already, disregard this). Yes, I used iwyu. > Also, can you share before-split/after-split/after-this build time > benchmarks? Does

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-03-27 Thread via cfe-commits
cor3ntin wrote: > > If split stacks are negatively impacting profiling, debugging, or other > > compiler development tasks, I have to ask, have we considered optimizing > > clang stack usage? > > Strong +1 to this. I removed a few uses of ParsedAttributes recently, it helped https://github.c

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2025-03-27 Thread via cfe-commits
no92 wrote: Rebased on main, pinging @MaskRay for re-review. https://github.com/llvm/llvm-project/pull/87845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Pass -fapprox-func when compiling 'native' builtins (PR #133119)

2025-03-27 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > set_source_files_properties That's true but since we're compiling with custom commands (I think) the properties won't automatically get picked up. That said, we could perhaps set the properties as you suggest and retrieve them with `get_source_file_property`. We'd still n

[clang] [Clang] Improve subsumption. (PR #132849)

2025-03-27 Thread via cfe-commits
@@ -170,102 +132,112 @@ struct alignas(ConstraintAlignment) FoldExpandedConstraint { const Expr *Pattern) : Kind(K), Constraint(std::move(C)), Pattern(Pattern) {}; - template - bool subsumes(const FoldExpandedConstraint &Other, -

[libclc] [libclc] Move fmod, remainder & remquo to the CLC library (PR #132054)

2025-03-27 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/132054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][SPIR-V] Add hlsl_private address space for HLSL/SPIR-V (PR #122103)

2025-03-27 Thread Nathan Gauër via cfe-commits
@@ -5386,6 +5386,23 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; } + + if (LangOpts.HLSL) { +if (D == nullptr) + return LangAS::hlsl_private; + +// Except

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread via cfe-commits
@@ -14926,6 +14926,42 @@ bool IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr( return false; } + case UETT_CountOf: { +QualType Ty = E->getTypeOfArgument(); +assert(Ty->isArrayType()); + +// We don't need to worry about array element qualifiers, so getting t

[clang] [HLSL][SPIR-V] Add hlsl_private address space for HLSL/SPIR-V (PR #122103)

2025-03-27 Thread Nathan Gauër via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -std=hlsl202x -emit-llvm -o - -disable-llvm-passes %s | FileCheck %s --check-prefixes=CHECK +// RUN: %clang_cc1 -triple spirv-pc-vulkan1.3-compute -std=hlsl202x -emit-llvm -o - -disable-llvm-passes %s |

[clang] [HLSL][SPIR-V] Add hlsl_private address space for HLSL/SPIR-V (PR #122103)

2025-03-27 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts updated https://github.com/llvm/llvm-project/pull/122103 From c11ace708fab316f422e12cf9785a5a362d7250c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Thu, 28 Nov 2024 15:00:56 +0100 Subject: [PATCH 1/3] [SPIR-V] Add hlsl_private address space for

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-03-27 Thread Fraser Cormack via cfe-commits
@@ -229,6 +229,12 @@ class CodeGenTypes { const CGFunctionInfo &arrangeBuiltinFunctionCall(QualType resultType, const CallArgList &args); + /// A SYCL device kernel function is a free standing function with + /// spir_kern

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in Nested Objects (PR #131969)

2025-03-27 Thread David Rivera via cfe-commits
RiverDave wrote: Ping https://github.com/llvm/llvm-project/pull/131969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-27 Thread Michael Kruse via cfe-commits
@@ -44,23 +44,19 @@ MDNode *LoopInfo::createPipeliningMetadata(const LoopAttributes &Attrs, else if (Attrs.PipelineInitiationInterval != 0) Enabled = true; + SmallVector Args; + Args.append(LoopProperties.begin(), LoopProperties.end()); + if (Enabled != true) { -

[clang] [analyzer] Add metrics tracking time spent in Z3 solver (PR #133236)

2025-03-27 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource created https://github.com/llvm/llvm-project/pull/133236 These metrics would turn out to be useful for verifying an upgrade of Z3. From 5fe04bcbb3eaf5682037ada6ab64fd7e021f787e Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 27 Mar 2025 12:1

[clang] [analyzer] Add metrics tracking time spent in Z3 solver (PR #133236)

2025-03-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Benics (balazs-benics-sonarsource) Changes These metrics would turn out to be useful for verifying an upgrade of Z3. --- Full diff: https://github.com/llvm/llvm-project/pull/133236.diff 2 Files Affected: - (modi

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/133037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/133125 >From 75ef42d644da9136fb07014ade18b6be137426a1 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 26 Mar 2025 12:54:29 -0400 Subject: [PATCH 1/8] [C2y] Implement WG14 N3369 and N3469 (_Countof) C2y ad

[clang] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

2025-03-27 Thread Jean-Didier PAILLEUX via cfe-commits
@@ -0,0 +1,4 @@ +! Check support of -m64. +! RUN: %flang -target i386-pc-win32 -m64 -### - %s 2>&1 | FileCheck -check-prefix=M64 %s + +! M64: "-triple" "{{[^-]+}}64-{{.*}}" JDPailleux wrote: Ok :-) https://github.com/llvm/llvm-project/pull/132409 __

[clang] [llvm] [RISCV] Add MC layer support for XSfmm*. (PR #133031)

2025-03-27 Thread Jiuyang Liu via cfe-commits
sequencer wrote: > but won't merge them until they are ratified just like Zvzip/Zvabd/Zibimm I think this patch is supported to be the vendor instruction set of `SiFive Xsfmm* Attached Matrix Extensions` if I understand correctly of this PR. AME is another issue that we don’t have ratified AM

[clang] [flang] [flang] Expose -m64 option (PR #132409)

2025-03-27 Thread Jean-Didier PAILLEUX via cfe-commits
https://github.com/JDPailleux edited https://github.com/llvm/llvm-project/pull/132409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/133125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [libcxx] [llvm] [llvm-reduce]: print short form, actionable names in the log (PR #132813)

2025-03-27 Thread via cfe-commits
YLChenZ wrote: I'm having some problems with my code branch, I guess I should resubmit a PR, I apologize for that! https://github.com/llvm/llvm-project/pull/132813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-27 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/131280 >From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001 From: hulxv Date: Fri, 14 Mar 2025 07:39:15 +0200 Subject: [PATCH 01/14] [clang-doc] [feat] add `--repository-line-prefix` argument (fix #59

[clang] [flang] [llvm] [AMDGPU] Add "lds-buffer-load-insts" attribute for all targets < gfx11 (PR #133055)

2025-03-27 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/133055 From 70fbaa4e4f2334cf6134adf02b4af2bcc0bf9847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 20 Mar 2025 13:23:25 +0100 Subject: [PATCH 1/3] [AMDGPU] Add "lds-bu

[clang] [Driver] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #132821)

2025-03-27 Thread Daniel Chen via cfe-commits
DanielCChen wrote: Thanks to @MaskRay for reviewing the PR and @ldionne for the comments that led us to find another issue. Would the reviewers please let me know if you are still reviewing the change? I am planning to merge it if you have no further comments. https://github.com/llvm/llvm-pro

[clang] Remove duplicate API (PR #132776)

2025-03-27 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/132776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-03-27 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez edited https://github.com/llvm/llvm-project/pull/133055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove duplicate API (PR #132776)

2025-03-27 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. Oh wow, what an oversight. Thank you for this PR! Looks good to me for the most part, it just needs a release note (especially for the breaking change). I'd also like @Endilll to sign off on this as well https://github.com/llvm/llvm-pr

[clang] [Clang] Improve subsumption. (PR #132849)

2025-03-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/132849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve subsumption. (PR #132849)

2025-03-27 Thread Younan Zhang via cfe-commits
@@ -170,102 +132,112 @@ struct alignas(ConstraintAlignment) FoldExpandedConstraint { const Expr *Pattern) : Kind(K), Constraint(std::move(C)), Pattern(Pattern) {}; - template - bool subsumes(const FoldExpandedConstraint &Other, -

[clang] [Clang] Improve subsumption. (PR #132849)

2025-03-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. One small nit Otherwise looks great, thanks! https://github.com/llvm/llvm-project/pull/132849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-03-27 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez edited https://github.com/llvm/llvm-project/pull/133055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][HLSL] Move emitter out of AMDGPU.cpp (PR #133251)

2025-03-27 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/133251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

[clang] [Clang] Improve subsumption. (PR #132849)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -170,102 +132,112 @@ struct alignas(ConstraintAlignment) FoldExpandedConstraint { const Expr *Pattern) : Kind(K), Constraint(std::move(C)), Pattern(Pattern) {}; - template - bool subsumes(const FoldExpandedConstraint &Other, -

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-27 Thread Farzon Lotfi via cfe-commits
farzonl wrote: Would it be ok if we prefixed all of these files in `TargetBuiltins` with CG? https://github.com/llvm/llvm-project/issues/133199 Building using AppleClang seems to be upset that a cpp file with this name already exists. I'm assuming its talking about all the files in `clang/lib

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/133100 >From b4aafe8bdb2754597d440e256c33b9f8b9a92a91 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 26 Mar 2025 05:52:17 -0700 Subject: [PATCH 1/2] [CIR] Upstream zero init for global variables --- .../

[clang] [llvm] [NFC][HLSL] Move emitter out of AMDGPU.cpp (PR #133251)

2025-03-27 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/133251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-27 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Would it be ok if we prefixed all of these files in `TargetBuiltins` with CG? > #133199 > > Building using AppleClang seems to be upset that a cpp file with this name > already exists. I'm assuming its talking about all the files in > `clang/lib/Basic/Targets/`. For example t

[clang] [llvm] [NFC][HLSL] Move emitter out of AMDGPU.cpp (PR #133251)

2025-03-27 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/133251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove duplicate API (PR #132776)

2025-03-27 Thread Jannick Kremer via cfe-commits
@@ -423,12 +423,6 @@ LLVM_17 { clang_getCursorUnaryOperatorKind; }; -LLVM_19 { - global: -clang_Cursor_getBinaryOpcode; -clang_Cursor_getBinaryOpcodeStr; -}; - DeinAlptraum wrote: I don't think we should touch sections of this file from older ver

[clang] [llvm] [NFC][HLSL] Move emitter out of AMDGPU.cpp (PR #133251)

2025-03-27 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/133251 >From b7cca5e5606382ba8b9e971f0554036c03b22c60 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 27 Mar 2025 09:44:44 -0400 Subject: [PATCH 1/2] [NFC][HLSL] Move emitter out of AMDGPU.cpp - Create a home f

[clang] [llvm] [NFC][HLSL] Move emitter out of AMDGPU.cpp (PR #133251)

2025-03-27 Thread Farzon Lotfi via cfe-commits
@@ -115,6 +115,7 @@ add_clang_library(clangCodeGen PatternInit.cpp SanitizerMetadata.cpp SwiftCallingConv.cpp + LangBuiltins/CGHLSLBuiltins.cpp farzonl wrote: done! https://github.com/llvm/llvm-project/pull/133251 __

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 1/6] [CIR] [Upstream local initialization for ArrayType ---

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 1/6] [CIR] [Upstream local initialization for ArrayType ---

[clang] [llvm] [NFC][HLSL] Move emitter out of AMDGPU.cpp (PR #133251)

2025-03-27 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/133251 - Create a home for LangBuiltins - Move all HLSL code out of AMDGPU.cpp to CGHLSLBuiltins.cpp >From b7cca5e5606382ba8b9e971f0554036c03b22c60 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 27 Mar 2025 09

[clang] [llvm] [RISCV] Implement the implications of C extension (PR #132259)

2025-03-27 Thread Kito Cheng via cfe-commits
@@ -25,8 +25,8 @@ addi a0, a1, 0 # CHECK: # encoding: [0xe0,0x1f] addi s0, sp, 1020 -# CHECK: .option arch, -c -.option arch, -c +# CHECK: .option arch, -c, -zca +.option arch, -c, -zca kito-cheng wrote: I guess `.opt arch, -zca` won't work because C will im

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-27 Thread CHANDRA GHALE via cfe-commits
@@ -18933,12 +18945,35 @@ static bool actOnOMPReductionKindClause( reportOriginalDsa(S, Stack, D, DVar); continue; } + // OpenMP 6.0 [ 7.6.10 ] + // Support Reduction over private variables with reduction clause. + // A list item in a reduct

[clang] Fileequality bugfix (PR #133253)

2025-03-27 Thread via cfe-commits
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 a27da0a20cbfb9f0c600d53bf2520f068b222f59 f0951dd4e78e7fee55b9ad90ee3fb5b892070dac --e

[clang] [llvm] [NFC][HLSL] Move emitter out of AMDGPU.cpp (PR #133251)

2025-03-27 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray approved this pull request. Thanks for creating this PR, LGTM (I wasn't able to do it earlier as one of my kids was ill, so away from laptop) https://github.com/llvm/llvm-project/pull/133251 ___ cfe-commits mailing list cf

[clang] [llvm] [NFC][HLSL] Move emitter out of AMDGPU.cpp (PR #133251)

2025-03-27 Thread Farzon Lotfi via cfe-commits
farzonl wrote: > Thanks for creating this PR, LGTM (I wasn't able to do it earlier as one of > my kids was ill, so away from laptop) No worries. Thanks for the approval! https://github.com/llvm/llvm-project/pull/133251 ___ cfe-commits mailing list cf

[clang] Fileequality bugfix (PR #133253)

2025-03-27 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/133253 Test PR for now, waiting for CI results >From e8bf3b6f08f0e0030ea36fe8c42fcde166ad27e3 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 1/9] [libclang/pyt

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > So you want this to be a FEATURE in C2y and an EXTENSION in older > > > language modes? > > > > > > Presumably yes. > > > And when we get the countof macro in a few months, this becomes > > > unnecessary? > > > > > > Are most users going to include `stdcountof.h` ?

[clang-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)

2025-03-27 Thread Yoann Congal via cfe-commits
https://github.com/ycongal-smile updated https://github.com/llvm/llvm-project/pull/133124 >From 895bf3da0236bc6bf9f814ab3e00d1a4f52a9397 Mon Sep 17 00:00:00 2001 From: Yoann Congal Date: Tue, 25 Mar 2025 22:25:55 +0100 Subject: [PATCH] clangd: Add a build option to disable building dexp Buildi

[clang-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)

2025-03-27 Thread Yoann Congal via cfe-commits
https://github.com/ycongal-smile updated https://github.com/llvm/llvm-project/pull/133124 >From 8001f900e602c0a8abcf118bda5869a2eb0d5ee9 Mon Sep 17 00:00:00 2001 From: Yoann Congal Date: Tue, 25 Mar 2025 22:25:55 +0100 Subject: [PATCH] clangd: Add a build option to disable building dexp Buildi

[libclc] [libclc] Move fmod, remainder & remquo to the CLC library (PR #132054)

2025-03-27 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/132054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-03-27 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/133055 From bf3f06cc99a1ac2460ffea741c0fe495f0778e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 20 Mar 2025 13:23:25 +0100 Subject: [PATCH 1/3] [AMDGPU] Add "lds-bu

<    1   2   3   4   5