[clang] [llvm] [x86][AVX-VNNI] Fix VPDPBUSD Argument Types (PR #155194)

2025-08-28 Thread Phoebe Wang via cfe-commits
@@ -4148,6 +4148,34 @@ static Value *upgradeX86IntrinsicCall(StringRef Name, CallBase *CI, Function *F, Value *Args[] = {CI->getArgOperand(0), CI->getArgOperand(1), CI->getArgOperand(2)}; + +// Input arguments types were incorrectly set to vectors

[clang] [clang][bytecode] Handle negative array sizes in constexpr `new` instead of asserting (PR #155737)

2025-08-28 Thread Samarth Narang via cfe-commits
@@ -0,0 +1,15 @@ +// RUN: not %clang_cc1 -std=c++20 -fsyntax-only %s 2>&1 \ +// RUN: | FileCheck %s --implicit-check-not='Assertion `NumElements.isPositive()` failed' + +// In C++20, constexpr dynamic allocation is permitted *only* if valid. +// A negative element count must be

[clang] [clang][bytecode] Handle negative array sizes in constexpr `new` instead of asserting (PR #155737)

2025-08-28 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/155737 >From 0b13b0e77e184666d46450b264e1237e6c41a1de Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Wed, 27 Aug 2025 22:45:25 -0400 Subject: [PATCH 1/4] Enable nullptr handle with negative elemsize in a dynami

[clang] [NFC][Clang][OpenMP] Add helper functions/utils for finding/comparing attach base-ptrs. (PR #155625)

2025-08-28 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: Having these functions without actual use is meaningless; better to split the patch by the supported types or other criteria, but with the actual uses https://github.com/llvm/llvm-project/pull/155625 ___ cfe-commits mailing list c

[clang] [clang-format] Fix TableGen nested DAGArg format (PR #155837)

2025-08-28 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 created https://github.com/llvm/llvm-project/pull/155837 Fixes https://github.com/llvm/llvm-project/issues/154634. Allow inserting space before DAGArg's opener paren when nested. >From 2cc33a8a0d2cb266a52483c6bb5bcc2e95564db9 Mon Sep 17 00:00:00 2001 From: hnakamu

[clang] [clang-format] Fix TableGen nested DAGArg format (PR #155837)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Hirofumi Nakamura (hnakamura5) Changes Fixes https://github.com/llvm/llvm-project/issues/154634. Allow inserting space before DAGArg's opener paren when nested. --- Full diff: https://github.com/llvm/llvm-project/pull/155837.diff

[libclc] libclc: CMake: include GetClangResourceDir (PR #155836)

2025-08-28 Thread Romaric Jodin via cfe-commits
rjodinchr wrote: @frasercrmck please take a look https://github.com/llvm/llvm-project/pull/155836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Morris Hafner via cfe-commits
@@ -130,6 +132,44 @@ void CIRGenBuilderTy::computeGlobalViewIndicesFromFlatOffset( computeGlobalViewIndicesFromFlatOffset(offset, subType, layout, indices); } +static mlir::Type getAttributeType(mlir::Attribute attr) { + return mlir::cast(attr).getType(); +} + +cir::Record

[clang] [llvm] Reland: [OpenMP][clang] 6.0: num_threads strict (part 3: codegen) (PR #155839)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Robert Imschweiler (ro-i) Changes OpenMP 6.0 12.1.2 specifies the behavior of the strict modifier for the num_threads clause on parallel directives, along with the message and severity clauses. This commit implements necessary codegen chang

[clang-tools-extra] [clang-tidy] New bugprone-method-hiding check (PR #154746)

2025-08-28 Thread via cfe-commits
@@ -0,0 +1,30 @@ +.. title:: clang-tidy - bugprone-method-hiding + +bugprone-method-hiding += + +Finds derived class methods that hide a (non-virtual) base class method. + +In order to be considered "hiding", methods must have the same signature +(i.e. the

[clang] [HLSL][SPIRV] Add -fspv-use-unknown-image-format option (PR #155664)

2025-08-28 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/155664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] clang_cmake_builddir (PR #155844)

2025-08-28 Thread Romaric Jodin via cfe-commits
rjodinchr wrote: @frasercrmck please take a look https://github.com/llvm/llvm-project/pull/155844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix clang_cmake_builddir (PR #155844)

2025-08-28 Thread Romaric Jodin via cfe-commits
https://github.com/rjodinchr edited https://github.com/llvm/llvm-project/pull/155844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] New bugprone-method-hiding check (PR #154746)

2025-08-28 Thread via cfe-commits
https://github.com/t-a-james updated https://github.com/llvm/llvm-project/pull/154746 >From 39ad4945d05f3e88fd32dfdea585aa99c6ba985f Mon Sep 17 00:00:00 2001 From: Tom James Date: Thu, 21 Aug 2025 13:14:24 +0100 Subject: [PATCH 01/15] [clang-tidy] New bugprone-method-hiding check --- .../bugp

[clang] [llvm] [ARM] enable FENV_ACCESS pragma support for hard-float targets (PR #137101)

2025-08-28 Thread Erik Enikeev via cfe-commits
Varnike wrote: Fix test failures reported by CI. https://github.com/llvm/llvm-project/pull/137101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] New bugprone-method-hiding check (PR #154746)

2025-08-28 Thread via cfe-commits
https://github.com/t-a-james updated https://github.com/llvm/llvm-project/pull/154746 >From 39ad4945d05f3e88fd32dfdea585aa99c6ba985f Mon Sep 17 00:00:00 2001 From: Tom James Date: Thu, 21 Aug 2025 13:14:24 +0100 Subject: [PATCH 01/16] [clang-tidy] New bugprone-method-hiding check --- .../bugp

[libclc] libclc: CMake: include GetClangResourceDir (PR #155836)

2025-08-28 Thread Romaric Jodin via cfe-commits
https://github.com/rjodinchr created https://github.com/llvm/llvm-project/pull/155836 `get_clang_resource_dir` is not guarantee to be there. Make sure of it by including `GetClangResourceDir`. >From 8ddc066ba0a3138becac427fcc61ce08fe557226 Mon Sep 17 00:00:00 2001 From: Romaric Jodin Date: Th

[clang-tools-extra] [clang-tidy] New bugprone-method-hiding check (PR #154746)

2025-08-28 Thread via cfe-commits
t-a-james wrote: > > The check name is a bit too vague/general, I would call it > > `bugprone-derived-method-shadowing-base-method` or similar. You can easily > > apply the renaming with the `rename_check.py`. But let's wait until there's > > some consensus on this. > > Agree, initially I was

[clang-tools-extra] [clang-tidy] New bugprone-method-hiding check (PR #154746)

2025-08-28 Thread via cfe-commits
@@ -0,0 +1,35 @@ +//===--===// +// +// 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: Apac

[clang-tools-extra] [clang-tidy] New bugprone-method-hiding check (PR #154746)

2025-08-28 Thread via cfe-commits
https://github.com/t-a-james updated https://github.com/llvm/llvm-project/pull/154746 >From 39ad4945d05f3e88fd32dfdea585aa99c6ba985f Mon Sep 17 00:00:00 2001 From: Tom James Date: Thu, 21 Aug 2025 13:14:24 +0100 Subject: [PATCH 01/17] [clang-tidy] New bugprone-method-hiding check --- .../bugp

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Morris Hafner via cfe-commits
@@ -21,20 +20,571 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Morris Hafner via cfe-commits
@@ -130,6 +132,44 @@ void CIRGenBuilderTy::computeGlobalViewIndicesFromFlatOffset( computeGlobalViewIndicesFromFlatOffset(offset, subType, layout, indices); } +static mlir::Type getAttributeType(mlir::Attribute attr) { + return mlir::cast(attr).getType(); +} + +cir::Record

[clang] [llvm] Reland: [OpenMP][clang] 6.0: num_threads strict (part 3: codegen) (PR #155839)

2025-08-28 Thread Alexey Bataev via cfe-commits
@@ -1506,8 +1506,10 @@ def err_omp_unexpected_directive : Error< "unexpected OpenMP directive %select{|'#pragma omp %1'}0">; def err_omp_expected_punc : Error< "expected ',' or ')' in '%0' %select{clause|directive}1">; -def warn_clause_expected_string : Warning< +def warn_c

[clang] [clang] clang_cmake_builddir (PR #155844)

2025-08-28 Thread Romaric Jodin via cfe-commits
https://github.com/rjodinchr created https://github.com/llvm/llvm-project/pull/155844 When building llvm from a subdirectory (like clspv does) `CMAKE_BINARY_DIR` is at the top of the build directory. When building runtimes (libclc for example), the build fails looking for clang (through `find

[clang] [clang][bytecode] Handle negative array sizes in constexpr `new` instead of asserting (PR #155737)

2025-08-28 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/155737 >From 0b13b0e77e184666d46450b264e1237e6c41a1de Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Wed, 27 Aug 2025 22:45:25 -0400 Subject: [PATCH 1/4] Enable nullptr handle with negative elemsize in a dynami

[clang] [OpenACC] Partial Reduction recipe Lowering (PR #155635)

2025-08-28 Thread Erich Keane via cfe-commits
erichkeane wrote: > lgtm, but some of the tests are going to fail after #155697 so we need to > coordinate the merge order for these. I'll merge this now, then pull that patch into my local repo and update the tests on that (or send it to you). https://github.com/llvm/llvm-project/pull/15563

[clang] [clang] Optimize EmbedExpr child iterator callback (PR #155803)

2025-08-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/155803 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 82ada73 - [clang] Optimize EmbedExpr child iterator callback (#155803)

2025-08-28 Thread via cfe-commits
Author: Timm Baeder Date: 2025-08-28T16:46:09+02:00 New Revision: 82ada737b1cd05d69f15283415691e8411c0789a URL: https://github.com/llvm/llvm-project/commit/82ada737b1cd05d69f15283415691e8411c0789a DIFF: https://github.com/llvm/llvm-project/commit/82ada737b1cd05d69f15283415691e8411c0789a.diff L

[clang] [clang] Fix crash when `__builtin_function_start` is given an invalid first parameter (PR #155506)

2025-08-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/155506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISC-V] Added the mips extension instructions like ehb,ihb and pause etc for MIPS RV64 P8700. (PR #155747)

2025-08-28 Thread Craig Topper via cfe-commits
@@ -125,10 +125,25 @@ class Mips_prefetch_ri let Inst{6-0} = OPC_CUSTOM_0.Value; } +// MIPS Ext Insns Fromat. +let hasSideEffects = 1, mayLoad = 0, +mayStore = 0 in class MIPSExtInst_ri shimm5, string opcodestr> topperc wrote: ```suggestion let hasSideE

[clang] [HLSL] Reorder arguments of __builtin_hlsl_resource_handlefromimplicitbinding (PR #155861)

2025-08-28 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/155861 Reorder the arguments of `__builtin_hlsl_resource_handlefromimplicitbinding` builtins to match the order of the `llvm.dx.resource.handlefromimplicitbinding` intrinsics, and also to match the arguments on the sta

[clang] 111844a - [LTO] Enhance unified/nonunified LTO checks. (#148229)

2025-08-28 Thread via cfe-commits
Author: Ying Yi Date: 2025-08-28T16:49:16+01:00 New Revision: 111844a873b5d931fb72a53b16ba6bd2702a03d8 URL: https://github.com/llvm/llvm-project/commit/111844a873b5d931fb72a53b16ba6bd2702a03d8 DIFF: https://github.com/llvm/llvm-project/commit/111844a873b5d931fb72a53b16ba6bd2702a03d8.diff LOG:

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,1493 @@ +//===- X86.cpp ===// +// +// 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,244 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [clang-tools-extra] [clang] AST: fix getAs canonicalization of leaf types (PR #155028)

2025-08-28 Thread James Y Knight via cfe-commits
jyknight wrote: Minimized test-case: ``` cat > test.h < using __underlying_type_t = __underlying_type(_Tp); enum __legacy_memory_order { __mo_relaxed }; using __memory_order_underlying_t = __underlying_type_t<__legacy_memory_order>; enum class memory_order : __memory_order_underlying_t { relaxed

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,560 @@ +//== QualTypeMapper.cpp - Maps Clang QualType to LLVMABI Types -==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-28 Thread Nico Weber via cfe-commits
nico wrote: FWIW, clang has a warning like that too, it's `-Wmismatched-tags` (part of `-Wmost`, which is part of `-Wall`). https://github.com/llvm/llvm-project/pull/147835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [Headers][X86] Use `__builtin_elementwise_ctlz` instead of avx512cd intrinsics. (PR #155089)

2025-08-28 Thread via cfe-commits
https://github.com/moorabbit updated https://github.com/llvm/llvm-project/pull/155089 >From b7b38d35769855b15c0fe6f0f5411d24aeeab9b6 Mon Sep 17 00:00:00 2001 From: moorabbit Date: Fri, 22 Aug 2025 09:52:01 -0400 Subject: [PATCH 1/4] [Headers][X86] Use `__builtin_elementwise_ctlz` rather avx512

[clang-tools-extra] Add WarnOnModificationOfCopiedLoopVariable to performance-for-range-c… (PR #155731)

2025-08-28 Thread via cfe-commits
https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/155731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Allow zero-size allocations for -Walloc-size (PR #155793)

2025-08-28 Thread via cfe-commits
earnol wrote: Your change will prevent diagnostics for all functions: malloc, calloc, realloc. I think only realloc is unjustified. https://github.com/llvm/llvm-project/pull/155793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang][NFC] Rename OMPLoopTransformationDirective to OMPCanonicalLoopNestTransformationDirective (PR #155848)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Roger Ferrer Ibáñez (rofirrim) Changes This is preparatory work for the implementation of `#pragma omp fuse` in https://github.com/llvm/llvm-project/pull/139293 Not all OpenMP loop transformations makes sense to make them inherit

[clang] [Clang][NFC] Rename OMPLoopTransformationDirective to OMPCanonicalLoopNestTransformationDirective (PR #155848)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Roger Ferrer Ibáñez (rofirrim) Changes This is preparatory work for the implementation of `#pragma omp fuse` in https://github.com/llvm/llvm-project/pull/139293 Not all OpenMP loop transformations makes sense to make them inherit

[clang-tools-extra] [clang-tidy] Add detection in container's method except `empty` in `readability-container-size-empty` (PR #154017)

2025-08-28 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/154017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 1f67b94 - [clang-tidy] Add detection in container's method except `empty` in `readability-container-size-empty` (#154017)

2025-08-28 Thread via cfe-commits
Author: flovent Date: 2025-08-28T17:58:10+03:00 New Revision: 1f67b945ab2164f8f489eca636ccae5f0e58fc8b URL: https://github.com/llvm/llvm-project/commit/1f67b945ab2164f8f489eca636ccae5f0e58fc8b DIFF: https://github.com/llvm/llvm-project/commit/1f67b945ab2164f8f489eca636ccae5f0e58fc8b.diff LOG:

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-08-28 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/155663 >From c2ba9037496f23e22e43b2f4a2bfcddb3aaad535 Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Wed, 27 Aug 2025 19:36:34 +0200 Subject: [PATCH 1/4] [CIR] Add constant record ILE support This patch adds basic sup

[clang] [Clang][OpenMP] Add an additional class to hold data that will be shared between all loop transformations (PR #155849)

2025-08-28 Thread Roger Ferrer Ibáñez via cfe-commits
https://github.com/rofirrim created https://github.com/llvm/llvm-project/pull/155849 This is preparatory work for the implementation of `#pragma omp fuse` in https://github.com/llvm/llvm-project/pull/139293 **Note**: this change builds on top of https://github.com/llvm/llvm-project/pull/15584

[clang] [llvm] [RISC-V] Added the mips extension instructions like ehb,ihb and pause etc for MIPS RV64 P8700. (PR #155747)

2025-08-28 Thread Craig Topper via cfe-commits
@@ -121,7 +121,8 @@ def MIPS_P8700 : RISCVProcessorModel<"mips-p8700", FeatureStdExtZicsr, FeatureVendorXMIPSCMov, FeatureVendorXMIPSLSP, -

[clang] [llvm] [RISC-V] Added the mips extension instructions like ehb,ihb and pause etc for MIPS RV64 P8700. (PR #155747)

2025-08-28 Thread Craig Topper via cfe-commits
@@ -125,10 +125,25 @@ class Mips_prefetch_ri let Inst{6-0} = OPC_CUSTOM_0.Value; } +// MIPS Ext Insns Fromat. +let hasSideEffects = 1, mayLoad = 0, +mayStore = 0 in class MIPSExtInst_ri shimm5, string opcodestr> +: RVInstIShift<0b0, 0b001, OPC_OP_IMM, (outs), (in

[clang] [llvm] [RISC-V] Added the mips extension instructions like ehb,ihb and pause etc for MIPS RV64 P8700. (PR #155747)

2025-08-28 Thread Craig Topper via cfe-commits
@@ -125,10 +125,25 @@ class Mips_prefetch_ri let Inst{6-0} = OPC_CUSTOM_0.Value; } +// MIPS Ext Insns Fromat. topperc wrote: What does "Ext" mean here? https://github.com/llvm/llvm-project/pull/155747 ___ cfe-com

[clang] [llvm] [RISC-V] Added the mips extension instructions like ehb,ihb and pause etc for MIPS RV64 P8700. (PR #155747)

2025-08-28 Thread Craig Topper via cfe-commits
@@ -125,10 +125,25 @@ class Mips_prefetch_ri let Inst{6-0} = OPC_CUSTOM_0.Value; } +// MIPS Ext Insns Fromat. topperc wrote: ```suggestion // MIPS Ext Insns Format. ``` https://github.com/llvm/llvm-project/pull/155747 __

[clang] [llvm] [RISC-V] Added the mips extension instructions like ehb,ihb and pause etc for MIPS RV64 P8700. (PR #155747)

2025-08-28 Thread Craig Topper via cfe-commits
@@ -1,9 +1,27 @@ -# RUN: llvm-mc %s -triple=riscv64 -mattr=+xmipslsp,+xmipscmov,+xmipscbop -M no-aliases -show-encoding \ +# RUN: llvm-mc %s -triple=riscv64 -mattr=+xmipslsp,+Xmipscmov,+xmipscbop,+xmipsexectl -M no-aliases -show-encoding \ topperc wrote: ```s

[clang] [Clang][OpenMP] Add an additional class to hold data that will be shared between all loop transformations (PR #155849)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Roger Ferrer Ibáñez (rofirrim) Changes This is preparatory work for the implementation of `#pragma omp fuse` in https://github.com/llvm/llvm-project/pull/139293 **Note**: this change builds on top of https://github.com/llvm/llvm-

[clang] [Clang][OpenMP] Add an additional class to hold data that will be shared between all loop transformations (PR #155849)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Roger Ferrer Ibáñez (rofirrim) Changes This is preparatory work for the implementation of `#pragma omp fuse` in https://github.com/llvm/llvm-project/pull/139293 **Note**: this change builds on top of https://github.com/llvm/llvm-

[clang] Update SSE/AVX integer comparison intrinsics to be used in constexpr (PR #155656)

2025-08-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM - cheers https://github.com/llvm/llvm-project/pull/155656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland: [OpenMP][clang] 6.0: num_threads strict (part 3: codegen) (PR #155839)

2025-08-28 Thread Robert Imschweiler via cfe-commits
@@ -1506,8 +1506,10 @@ def err_omp_unexpected_directive : Error< "unexpected OpenMP directive %select{|'#pragma omp %1'}0">; def err_omp_expected_punc : Error< "expected ',' or ')' in '%0' %select{clause|directive}1">; -def warn_clause_expected_string : Warning< +def warn_c

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-08-28 Thread Sean McBride via cfe-commits
seanm wrote: Should this warn about `wchar_t` in C? ```c #include int main (void) { wchar_t foo; (void)foo; return 0; } ``` ``` % xcrun /Users/builder/llvm/llvm-install/bin/clang -fsyntax-only -Weverything ~/Desktop/test.c /Users/builder/Desktop/test.c:5:3: warning: identifier 'wchar_

[libclc] 4a7205f - libclc: CMake: include GetClangResourceDir (#155836)

2025-08-28 Thread via cfe-commits
Author: Romaric Jodin Date: 2025-08-28T17:56:33+01:00 New Revision: 4a7205f892761bedf5208f30c8d30144c84fdd9f URL: https://github.com/llvm/llvm-project/commit/4a7205f892761bedf5208f30c8d30144c84fdd9f DIFF: https://github.com/llvm/llvm-project/commit/4a7205f892761bedf5208f30c8d30144c84fdd9f.diff

[clang] [flang] [llvm] Introduce -fexperimental-loop-fuse to clang and flang (PR #142686)

2025-08-28 Thread Madhur Amilkanthwar via cfe-commits
@@ -6870,6 +6870,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, options::OPT_fno_unroll_loops); Args.AddLastArg(CmdArgs, options::OPT_floop_interchange, options::OPT_fno_loop_interchange); + Args.AddLastArg(CmdArgs, op

[clang-tools-extra] [clang-doc] markdown parser (PR #155887)

2025-08-28 Thread Erick Velez via cfe-commits
https://github.com/evelez7 created https://github.com/llvm/llvm-project/pull/155887 None >From c9e91c7681af8801235ab741b6e68966ecc3690c Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Mon, 11 Aug 2025 10:21:35 -0700 Subject: [PATCH] [clang-doc] markdown parser --- clang-tools-extra/clang-do

[clang] [flang] [llvm] Introduce -fexperimental-loop-fuse to clang and flang (PR #142686)

2025-08-28 Thread Madhur Amilkanthwar via cfe-commits
https://github.com/madhur13490 edited https://github.com/llvm/llvm-project/pull/142686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] Introduce -fexperimental-loop-fuse to clang and flang (PR #142686)

2025-08-28 Thread Madhur Amilkanthwar via cfe-commits
https://github.com/madhur13490 updated https://github.com/llvm/llvm-project/pull/142686 >From be9eb6a39906fac945ea206eec80f4cc18bd4896 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Thu, 22 May 2025 13:50:38 + Subject: [PATCH 1/7] add -floop-fuse to clang and flang --- clang/include/c

[clang] 5dfc4f7 - [docs][OpenMP] Add docs section for OpenMP 6.1 implementation status (#155651)

2025-08-28 Thread via cfe-commits
Author: Kevin Sala Penades Date: 2025-08-28T10:06:23-07:00 New Revision: 5dfc4f79655d6e36088aaac5c702b5034731a754 URL: https://github.com/llvm/llvm-project/commit/5dfc4f79655d6e36088aaac5c702b5034731a754 DIFF: https://github.com/llvm/llvm-project/commit/5dfc4f79655d6e36088aaac5c702b5034731a754.

[clang] [docs][OpenMP] Add docs section for OpenMP 6.1 implementation status (PR #155651)

2025-08-28 Thread Kevin Sala Penades via cfe-commits
https://github.com/kevinsala closed https://github.com/llvm/llvm-project/pull/155651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] markdown parser (PR #155887)

2025-08-28 Thread Erick Velez via cfe-commits
evelez7 wrote: * **#155887** https://app.graphite.dev/github/pr/llvm/llvm-project/155887?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/1558

[clang] [docs][OpenMP] Claim C/C++ implementation of dyn_groupprivate clause (PR #155653)

2025-08-28 Thread Kevin Sala Penades via cfe-commits
https://github.com/kevinsala edited https://github.com/llvm/llvm-project/pull/155653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Use `__builtin_elementwise_ctlz` instead of avx512cd intrinsics. (PR #155089)

2025-08-28 Thread via cfe-commits
https://github.com/moorabbit updated https://github.com/llvm/llvm-project/pull/155089 >From b7b38d35769855b15c0fe6f0f5411d24aeeab9b6 Mon Sep 17 00:00:00 2001 From: moorabbit Date: Fri, 22 Aug 2025 09:52:01 -0400 Subject: [PATCH 1/5] [Headers][X86] Use `__builtin_elementwise_ctlz` rather avx512

[clang] [analyzer] Improve handling of placement new in `PointerArith` (PR #155855)

2025-08-28 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -165,3 +165,124 @@ void LValueToRValueBitCast_dumps(void *p, char (*array)[8]) { unsigned long ptr_arithmetic(void *p) { return __builtin_bit_cast(unsigned long, p) + 1; // no-crash } + + +void escape(int*); +

[clang] [analyzer] Improve handling of placement new in `PointerArith` (PR #155855)

2025-08-28 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -165,3 +165,124 @@ void LValueToRValueBitCast_dumps(void *p, char (*array)[8]) { unsigned long ptr_arithmetic(void *p) { return __builtin_bit_cast(unsigned long, p) + 1; // no-crash } + + +void escape(int*); +

[clang] [analyzer] Improve handling of placement new in `PointerArith` (PR #155855)

2025-08-28 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -165,3 +165,124 @@ void LValueToRValueBitCast_dumps(void *p, char (*array)[8]) { unsigned long ptr_arithmetic(void *p) { return __builtin_bit_cast(unsigned long, p) + 1; // no-crash } + + +void escape(int*); +

[clang] [analyzer] Improve handling of placement new in `PointerArith` (PR #155855)

2025-08-28 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -74,6 +74,26 @@ class PointerArithChecker REGISTER_MAP_WITH_PROGRAMSTATE(RegionState, const MemRegion *, AllocKind) +namespace { steakhal wrote: We follow the LLVM style guide, which promotes t

[clang] [analyzer] Improve handling of placement new in `PointerArith` (PR #155855)

2025-08-28 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/155855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [analyzer] Improve handling of placement new in `PointerArith` (PR #155855)

2025-08-28 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: https://github.com/steakhal requested changes to this pull request. Looks sweet. I did the first round, I'll let others to finish the rest while I'm on vacation https://github.com/llvm/llvm-project/pull/155855 ___

[clang] [analyzer] Improve handling of placement new in `PointerArith` (PR #155855)

2025-08-28 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -165,3 +165,124 @@ void LValueToRValueBitCast_dumps(void *p, char (*array)[8]) { unsigned long ptr_arithmetic(void *p) { return __builtin_bit_cast(unsigned long, p) + 1; // no-crash } + + +void escape(int*); +

[clang] [Sema] Allow zero-size allocations for -Walloc-size (PR #155793)

2025-08-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/155793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Shard out SemaTests into their own binary (PR #155548)

2025-08-28 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. PTAL, I edited the comment. The fact that the number of tests is small doesn't really relate to the costs of having a distinct test target, it has more to do with the size of the dependency graph. https://github.com/llvm/llvm-project/pull/1555

[clang] [Headers][X86] Use `__builtin_elementwise_ctlz` instead of avx512cd intrinsics. (PR #155089)

2025-08-28 Thread via cfe-commits
moorabbit wrote: Thx for the fast review + suggestions. https://github.com/llvm/llvm-project/pull/155089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Shard out SemaTests into their own binary (PR #155548)

2025-08-28 Thread Reid Kleckner via cfe-commits
rnk wrote: > I do my local build with -DBUILD_SHARED_LIBS=ON, so these are probably not > the numbers you're looking for, but for the record, in my local build (which > is a debug build), SemaTests is 6.7 MB, and clang is 2.1 MB. By comparison, > AllClangUnitTests is 199.3 MB. Yeah, the BUILD

[clang] [Sema] Allow zero-size allocations for -Walloc-size (PR #155793)

2025-08-28 Thread via cfe-commits
earnol wrote: I think this functionality is quite useful and created https://github.com/llvm/llvm-project/issues/155636 to expand it. If nobody will be picking it up, i'll probably implement it myself to make it even more useful. https://github.com/llvm/llvm-project/pull/155793 ___

[clang] [clang][Sema] Shard out SemaTests into their own binary (PR #155548)

2025-08-28 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/155548 >From 893813ce1e131f5a2948f0ab9745c87b67baf33e Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Wed, 27 Aug 2025 00:28:40 -0400 Subject: [PATCH 1/2] [clang][Sema] Shard out SemaTests into their own binary --- clan

[libclc] libclc: CMake: include GetClangResourceDir (PR #155836)

2025-08-28 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/155836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Use `__builtin_elementwise_ctlz` instead of avx512cd intrinsics. (PR #155089)

2025-08-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon auto_merge_enabled https://github.com/llvm/llvm-project/pull/155089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 73cf62b - [Headers][X86] Use `__builtin_elementwise_ctlz` instead of avx512cd intrinsics. (#155089)

2025-08-28 Thread via cfe-commits
Author: moorabbit Date: 2025-08-28T17:07:47Z New Revision: 73cf62b25497b594312146a11cd9790e6c6e1384 URL: https://github.com/llvm/llvm-project/commit/73cf62b25497b594312146a11cd9790e6c6e1384 DIFF: https://github.com/llvm/llvm-project/commit/73cf62b25497b594312146a11cd9790e6c6e1384.diff LOG: [He

[clang-tools-extra] [clang-doc] markdown parser (PR #155887)

2025-08-28 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/155887 >From 5a66d8962440f61848dd5d7b4054b6c7f4a97a6b Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Mon, 11 Aug 2025 10:21:35 -0700 Subject: [PATCH] [clang-doc] markdown parser --- clang-tools-extra/clang-doc/CMak

[clang] [Headers][X86] Use `__builtin_elementwise_ctlz` instead of avx512cd intrinsics. (PR #155089)

2025-08-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/155089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Interp] interp__builtin_elementwise_int_binop - use APSInt callback instead of repeated switch statement (PR #155891)

2025-08-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/155891 Users of interp__builtin_elementwise_int_binop are going to be very well defined, we can use a simple callback mechanism (including existing llvm::APIntOps static methods) to perform the evaluation and avoid a

[clang] [docs][OpenMP] Claim C/C++ implementation of dyn_groupprivate clause (PR #155653)

2025-08-28 Thread Kevin Sala Penades via cfe-commits
https://github.com/kevinsala updated https://github.com/llvm/llvm-project/pull/155653 >From 3cf3c63bdfd3b518ad824f51b2501e0599415881 Mon Sep 17 00:00:00 2001 From: Kevin Sala Date: Wed, 27 Aug 2025 09:55:31 -0700 Subject: [PATCH] [docs][OpenMP] Claim C/C++ implementation of dyn_groupprivate cl

[clang] [Clang][Interp] interp__builtin_elementwise_int_binop - use APSInt callback instead of repeated switch statement (PR #155891)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Simon Pilgrim (RKSimon) Changes Users of interp__builtin_elementwise_int_binop are going to be very well defined, we can use a simple callback mechanism (including existing llvm::APIntOps static methods) to perform the evaluation and avoi

[clang] [clang-tools-extra] [clang] NFC: change more places to use Type::getAsTagDecl and friends (PR #155313)

2025-08-28 Thread Shafik Yaghmour via cfe-commits
shafik wrote: I am not sure it makes sense to label such larger changes NFC, anything this large should have at least one review if not more. https://github.com/llvm/llvm-project/pull/155313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [Headers][X86] Use `__builtin_elementwise_ctlz` instead of avx512cd intrinsics. (PR #155089)

2025-08-28 Thread via cfe-commits
@@ -42,35 +43,41 @@ __m512i test_mm512_maskz_conflict_epi32(__mmask16 __U, __m512i __A) { } __m512i test_mm512_lzcnt_epi32(__m512i __A) { // CHECK-LABEL: test_mm512_lzcnt_epi32 - // CHECK: call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %{{.*}}, i1 false) + // CHECK: call <16

[clang] [clang-tools-extra] [clang] NFC: change more places to use Type::getAsTagDecl and friends (PR #155313)

2025-08-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: It was split off from another PR, which had reviewers. https://github.com/llvm/llvm-project/pull/155313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add GNU make jobserver support (PR #145131)

2025-08-28 Thread Andrew Ng via cfe-commits
@@ -119,7 +130,24 @@ class ThreadPoolExecutor : public Executor { auto Task = std::move(WorkStack.back()); WorkStack.pop_back(); Lock.unlock(); - Task(); + + if (TheJobserver) { +JobSlot Slot = TheJobserver->tryAcquire(); nga

[clang] [llvm] [Driver][AMDGPU][HIP][SPIRV] Disable optimizations for AMDGCN SPIR-V (PR #154765)

2025-08-28 Thread Sameer Sahasrabuddhe via cfe-commits
ssahasra wrote: For the record, I don't mean to hold up this patch with just my opinions, since clearly I am not the one spending time making SPIRV work for AMDGCN. Will defer to other people's review about the actual mechanics of the patch. https://github.com/llvm/llvm-project/pull/154765 ___

[clang] [llvm] [NVPTX] Change the alloca address space in NVPTXLowerAlloca (PR #154814)

2025-08-28 Thread Artem Belevich via cfe-commits
@@ -1444,15 +1444,16 @@ void clang::emitBackendOutput(CompilerInstance &CI, CodeGenOptions &CGOpts, // Verify clang's TargetInfo DataLayout against the LLVM TargetMachine's // DataLayout. - if (AsmHelper.TM) { -std::string DLDesc = M->getDataLayout().getStringReprese

[clang] [Clang](NFC) Add coverage for VTable debug info (PR #151818)

2025-08-28 Thread Jeremy Morse via cfe-commits
@@ -1,5 +1,3 @@ -// REQUIRES: target={{x86_64.*-linux.*}} jmorse wrote: Do the RUN lines need updating to not hard-code the x86_64 triple too? Otherwise buildbots that don't build for x86 might trip up on this? Broadening out this test coverage to not be fixed

[clang] [llvm] Reland: [OpenMP][clang] 6.0: num_threads strict (part 3: codegen) (PR #155839)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Robert Imschweiler (ro-i) Changes OpenMP 6.0 12.1.2 specifies the behavior of the strict modifier for the num_threads clause on parallel directives, along with the message and severity clauses. This commit implements necessary codeg

[clang] [Clang](NFC) Add coverage for VTable debug info (PR #151818)

2025-08-28 Thread Jeremy Morse via cfe-commits
@@ -35,26 +33,29 @@ struct CDerived : NSP_1::CLeft, NSP_2::CRight { int fooDerived() { return 3; }; }; +void use(void *, ...); + int main() { NSP::CBase Base; NSP_1::CLeft Left; NSP_2::CRight Right; CDerived Derived; + use(&Base, &Left, &Right, &Derived);

[clang] [clang] MicrosoftMangle: pick correct tagdecl for mangling tagkind (PR #155662)

2025-08-28 Thread Reid Kleckner via cfe-commits
@@ -3246,13 +3246,17 @@ void MicrosoftCXXNameMangler::mangleTagTypeKind(TagTypeKind TTK) { } void MicrosoftCXXNameMangler::mangleType(const EnumType *T, Qualifiers, SourceRange) { - mangleType(cast(T)->getOriginalDecl()->getDefinitionO

[clang] [llvm] [NVPTX] Change the alloca address space in NVPTXLowerAlloca (PR #154814)

2025-08-28 Thread Artem Belevich via cfe-commits
@@ -502,3 +497,27 @@ void NVPTXPassConfig::addMachineSSAOptimization() { addPass(&PeepholeOptimizerLegacyID); printAndVerify("After codegen peephole optimization pass"); } + +bool NVPTXTargetMachine::isCompatibleDataLayout( +const DataLayout &Candidate) const { + // XX

[clang] [clang] MicrosoftMangle: pick correct tagdecl for mangling tagkind (PR #155662)

2025-08-28 Thread Matheus Izvekov via cfe-commits
@@ -3246,13 +3246,17 @@ void MicrosoftCXXNameMangler::mangleTagTypeKind(TagTypeKind TTK) { } void MicrosoftCXXNameMangler::mangleType(const EnumType *T, Qualifiers, SourceRange) { - mangleType(cast(T)->getOriginalDecl()->getDefinitionO

[clang] [clang][bytecode] Handle negative array sizes in constexpr `new` instead of asserting (PR #155737)

2025-08-28 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/155737 >From 0b13b0e77e184666d46450b264e1237e6c41a1de Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Wed, 27 Aug 2025 22:45:25 -0400 Subject: [PATCH 1/7] Enable nullptr handle with negative elemsize in a dynami

<    1   2   3   4   5   6   >