[clang] [llvm] Introduce a new WebKit checker for a unchecked local variable (PR #113708)

2024-10-31 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/113708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 61a6439 - Introduce a new WebKit checker for a unchecked local variable (#113708)

2024-10-31 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-10-31T23:53:07-07:00 New Revision: 61a6439f35b6de28ff4aff4450d6fca970292fd5 URL: https://github.com/llvm/llvm-project/commit/61a6439f35b6de28ff4aff4450d6fca970292fd5 DIFF: https://github.com/llvm/llvm-project/commit/61a6439f35b6de28ff4aff4450d6fca970292fd5.diff

[clang] [libcxx] [libcxxabi] [Fuchsia][cmake] Allow using FatLTO when building runtimes (PR #112277)

2024-10-31 Thread Petr Hosek via cfe-commits
petrhosek wrote: I think this is due to https://github.com/llvm/llvm-project/blob/c3edeaa61bf0e7faed6c26f693b4fcd9102ba1ec/compiler-rt/lib/builtins/cpu_model/aarch64/lse_atomics/fuchsia.inc#L7 which I believe is yet another instance of #56070. https://github.com/llvm/llvm-project/pull/112277 _

[clang] [LoongArch][clang] Use `signed char` vectors instead of `char` vectors for LSX and LASX builtins (PR #114510)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 edited https://github.com/llvm/llvm-project/pull/114510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LoongArch][clang] Use `signed char` vectors instead of `char` vectors for L SX and LASX builtins (PR #114510)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114510 `-flax-vector-conversions=none` does not allow an implicit conversion from `signed char` vector to `char` vector, and we cannot remove `signed` from `v16i8` or `v32i8` because doing so will break our expectation w

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vxor.v builti ns `unsigned char` vectors (PR #114513)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114513 The lsxintrin.h and and lasxintrin.h headers uses `unsigned char` vectors instead of `signed char` vectors. GCC also uses `unsigned char` for them, so align their definition with the headers and GCC. Fixes #

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vorn.v builti ns `unsigned char` vectors (PR #114514)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-loongarch @llvm/pr-subscribers-backend-x86 Author: Xi Ruoyao (xry111) Changes All other bitwise vector builtins use `unsigned char` vector operands, so it does not make too much sense to use `signed char` for the orn operation alone. The sam

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vorn.v builti ns `unsigned char` vectors (PR #114514)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114514 All other bitwise vector builtins use `unsigned char` vector operands, so it does not make too much sense to use `signed char` for the orn operation alone. The same change has been also proposed for GCC: http

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vxor.v builti ns `unsigned char` vectors (PR #114513)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Xi Ruoyao (xry111) Changes The lsxintrin.h and and lasxintrin.h headers uses `unsigned char` vectors instead of `signed char` vectors. GCC also uses `unsigned char` for them, so align their definition with the headers and GCC. Fixes #

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vshuf.b builtins `signed char` vectors (PR #114512)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Xi Ruoyao (xry111) Changes The lsxintrin.h and and lasxintrin.h headers uses `signed char` vectors instead of `unsigned char` vectors. GCC also uses `signed char` for them, so align their definition with the headers and GCC. Depends on #1

[clang] [LoongArch][Clang] Make the parameter and return value of {x,}vmsknz.b builtins `signed char` vector (PR #114511)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Xi Ruoyao (xry111) Changes These builtins operate on int8 vectors, not int16 vectors. So the old definition does not make any sense. Depends on #114510. Part of #110834 fix. --- Patch is 58.14 KiB, truncated to 20.00 KiB below, full ve

[clang] [LoongArch][Clang] Make the parameter and return value of {x,}vmsknz.b builtins `signed char` vector (PR #114511)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-loongarch Author: Xi Ruoyao (xry111) Changes These builtins operate on int8 vectors, not int16 vectors. So the old definition does not make any sense. Depends on #114510. Part of #110834 fix. --- Patch is 58.14 KiB, truncated to 20.00 KiB be

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vshuf.b builtins `signed char` vectors (PR #114512)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114512 The lsxintrin.h and and lasxintrin.h headers uses `signed char` vectors instead of `unsigned char` vectors. GCC also uses `signed char` for them, so align their definition with the headers and GCC. Depends on #1

[clang] [LoongArch][Clang] Make the parameter and return value of {x,}vmsknz.b builtins `signed char` vector (PR #114511)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114511 These builtins operate on int8 vectors, not int16 vectors. So the old definition does not make any sense. Depends on #114510. Part of #110834 fix. >From 1bbbc1c38715f42e6014ee319d76af9a4015e4d5 Mon Sep 17 00:0

[clang] [LoongArch][clang] Use `signed char` vectors instead of `char` vectors for L SX and LASX builtins (PR #114510)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Xi Ruoyao (xry111) Changes `-flax-vector-conversions=none` does not allow an implicit conversion from `signed char` vector to `char` vector, and we cannot remove `signed` from `v16i8` or `v32i8` because doing so will break our expectation w

[clang] [LoongArch][Clang] Add tests for #110834 (PR #114509)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Xi Ruoyao (xry111) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/114509.diff 2 Files Affected: - (added) clang/test/Headers/lasxintrin.c (+6) - (added) clang/test/Headers/lsxintrin.c (+6) ``diff diff --gi

[clang] [LoongArch][Clang] Add tests for #110834 (PR #114509)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114509 None >From 1bbbc1c38715f42e6014ee319d76af9a4015e4d5 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:00:14 +0800 Subject: [PATCH] [LoongArch][Clang] Add tests for #110834 --- clang/test/Header

[clang-tools-extra] Extend call hierarchy for field and non-local variables (PR #113900)

2024-10-31 Thread Nathan Ridge via cfe-commits
@@ -2238,7 +2238,10 @@ prepareCallHierarchy(ParsedAST &AST, Position Pos, PathRef TUPath) { for (const NamedDecl *Decl : getDeclAtPosition(AST, *Loc, {})) { if (!(isa(Decl) && cast(Decl)->isFunctionOrMethod()) && -Decl->getKind() != Decl::Kind::Function

[clang-tools-extra] Extend call hierarchy for field and non-local variables (PR #113900)

2024-10-31 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks for the patch! https://github.com/llvm/llvm-project/pull/113900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang-tools-extra] Extend call hierarchy for field and non-local variables (PR #113900)

2024-10-31 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/113900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Introduce a new WebKit checker for a unchecked local variable (PR #113708)

2024-10-31 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/113708 >From cf5ca301bc9ed2c65eed92e7299bf598d5f88103 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 14 Sep 2024 01:46:23 -0700 Subject: [PATCH 1/2] Introduce a new WebKit checker for a unchecked local variable

[clang] [llvm] Introduce a new WebKit checker for a unchecked local variable (PR #113708)

2024-10-31 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: > LGTM! Thanks for the review! https://github.com/llvm/llvm-project/pull/113708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Introduce a new WebKit checker for a unchecked local variable (PR #113708)

2024-10-31 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/113708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] df9769e - [Clang] prevent setting default lexical access specifier for missing primary declarations (#112424)

2024-10-31 Thread via cfe-commits
Author: Oleksandr T. Date: 2024-11-01T13:13:33+08:00 New Revision: df9769e14b79048331c33deeda1a93acc9a4a73e URL: https://github.com/llvm/llvm-project/commit/df9769e14b79048331c33deeda1a93acc9a4a73e DIFF: https://github.com/llvm/llvm-project/commit/df9769e14b79048331c33deeda1a93acc9a4a73e.diff

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-31 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Thanks! https://github.com/llvm/llvm-project/pull/112424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/112424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][CMake] Generate formatting options docs during build (PR #113739)

2024-10-31 Thread Owen Pan via cfe-commits
owenca wrote: @boomanaiden154 can we have `clang-format-style-options` rebuilt only when it's outdated, i.e. only if at least one of the following has been updated? ``` clang/include/clang/Format/Format.h clang/include/clang/Tooling/Inclusions/IncludeStyle.h clang/docs/ClangFormatStyleOptions.rs

[clang] [clang-format][CMake] Generate formatting options docs during build (PR #113739)

2024-10-31 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: > can we have clang-format-style-options rebuilt only when it's outdated, i.e. > only if at least one of the following has been updated? We can, but it requires more changes that I'm not sure are worth doing given that this step takes essentially zero time compared to reg

[clang] bef3b54 - [InstrPGO] Avoid using global variable to fix potential data race (#114364)

2024-10-31 Thread via cfe-commits
Author: Lei Wang Date: 2024-10-31T21:28:13-07:00 New Revision: bef3b54ea10a564a2de72f658f2efd64f537c079 URL: https://github.com/llvm/llvm-project/commit/bef3b54ea10a564a2de72f658f2efd64f537c079 DIFF: https://github.com/llvm/llvm-project/commit/bef3b54ea10a564a2de72f658f2efd64f537c079.diff LOG:

[clang] [clang-format] Fix a regression in parsing `switch` in macro call (PR #114506)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #114408. --- Full diff: https://github.com/llvm/llvm-project/pull/114506.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+6-2) - (modified) clang/unittests/Format/Tok

[clang] [clang-format] Fix a regression in parsing `switch` in macro call (PR #114506)

2024-10-31 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/114506 Fixes #114408. >From 4702c777252678bf3633fd72a0470d135a54c4ba Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 31 Oct 2024 21:40:17 -0700 Subject: [PATCH] [clang-format] Fix a regression in parsing `switch` in

[clang] [clang-format] Add ConfigFile option (PR #113864)

2024-10-31 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/113864 >From 85f78a4879a37fb367dccd5299b35d1c75c2b46f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 27 Oct 2024 22:22:11 -0700 Subject: [PATCH 1/2] [clang-format] Add ConfigFile option Closes #107808. --- clang/d

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-10-31 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/114148 >From 8c76f28c8a0ba3d087361141366968071fa3af6e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 29 Oct 2024 16:02:26 -0700 Subject: [PATCH 1/2] [HLSL] Add Increment/DecrementCounter methods to structured b

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-31 Thread Oleksandr T. via cfe-commits
@@ -585,10 +585,11 @@ Bug Fixes to C++ Support - Clang incorrectly considered a class with an anonymous union member to not be const-default-constructible even if a union member has a default member initializer. (#GH95854). -- Fixed an assertion failure when evaluating an

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-31 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/112424 >From a22c6bae4f42f42e67f8e0c2b1f914e50d140099 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Tue, 15 Oct 2024 22:43:24 +0300 Subject: [PATCH 1/4] [Clang] prevent setting default lexical access specifier f

[clang] [llvm] [InstrPGO] Avoid using global variable to fix potential data race (PR #114364)

2024-10-31 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm closed https://github.com/llvm/llvm-project/pull/114364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > Mechanically, this pass can be replaced with trivial handling of the > intrinsic in AMDGPUInstCombineIntrinsic; we don't need a new module pass. As > inserted into the pipeline here, this does not have any advantage over > handling it directly in instcombine. Perhaps, except

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-10-31 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/114148 >From 8c76f28c8a0ba3d087361141366968071fa3af6e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 29 Oct 2024 16:02:26 -0700 Subject: [PATCH 1/2] [HLSL] Add Increment/DecrementCounter methods to structured b

[clang] [PS5][Driver] Pass layout metrics to the linker (PR #114435)

2024-10-31 Thread Paul T Robinson via cfe-commits
@@ -21,6 +21,22 @@ // CHECK-NO-PIE-NOT: "-pie" // CHECK-SHARED: "--shared" +// Test the driver supplies an --image-base to the linker only for non-pie +// executables. + +// RUN: %clang --target=x86_64-sie-ps5 -static %s -### 2>&1 | FileCheck --check-prefixes=CHECK-BASE %s +/

[clang] [PS5][Driver] Pass layout metrics to the linker (PR #114435)

2024-10-31 Thread Paul T Robinson via cfe-commits
@@ -295,6 +302,9 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (Shared) CmdArgs.push_back("--shared"); + if (!Relocatable && !Shared && !PIE) pogo59 wrote: Does this want to consider `Static` as well? Just wonderi

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > The toothpaste is out of the tube once the IR is produced. If some toolchain > were relying on the global target machine features, there are opportunities > for error on each tool invocation. The absence of the attribute does not tell > you what the final compilation context w

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-31 Thread Younan Zhang via cfe-commits
@@ -585,10 +585,11 @@ Bug Fixes to C++ Support - Clang incorrectly considered a class with an anonymous union member to not be const-default-constructible even if a union member has a default member initializer. (#GH95854). -- Fixed an assertion failure when evaluating an

[clang] [Clang] prevent assertion failure from an invalid template instantiation pattern when adding instantiated params to the scope in friend functions with defaulted params (PR #113777)

2024-10-31 Thread Younan Zhang via cfe-commits
@@ -3437,10 +3437,10 @@ bool Sema::SubstDefaultArgument( // template void f(T a, int = decltype(a)()); // void g() { f(0); } LIS = std::make_unique(*this); - FunctionDecl *PatternFD = FD->getTemplateInstantiationPattern( - /*ForDefinition*/ f

[clang] [llvm] [InstrPGO] Avoid using global variable to fix potential data race (PR #114364)

2024-10-31 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm updated https://github.com/llvm/llvm-project/pull/114364 >From a7b444bd75d6f83ed0f5692783990a59f36e8459 Mon Sep 17 00:00:00 2001 From: wlei Date: Thu, 31 Oct 2024 09:58:27 -0700 Subject: [PATCH 1/4] Reapply "[InstrPGO] Support cold function coverage instrumentation

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Matt Arsenault via cfe-commits
arsenm wrote: Mechanically, this pass can be replaced with trivial handling of the intrinsic in AMDGPUInstCombineIntrinsic; we don't need a new module pass. As inserted into the pipeline here, this does not have any advantage over handling it directly in instcombine. > We could just turn this

[clang] [flang] [flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv (PR #110063)

2024-10-31 Thread Yusuke MINATO via cfe-commits
yus3710-fj wrote: I confirmed the performance regression on both Graviton3 and Grace when the value of `copies` is set to 1. The result of the measurement on Graviton3: ||max|min|avg| |---|---|---|---| |before this patch|52.56|52.44|52.518| |after this patch|48.90 (-7.48%)|48.79 (-7.48%)|48.86

[clang] [Clang] prevent assertion failure from an invalid template instantiation pattern when adding instantiated params to the scope in friend functions with defaulted params (PR #113777)

2024-10-31 Thread Younan Zhang via cfe-commits
@@ -3437,10 +3437,10 @@ bool Sema::SubstDefaultArgument( // template void f(T a, int = decltype(a)()); // void g() { f(0); } LIS = std::make_unique(*this); - FunctionDecl *PatternFD = FD->getTemplateInstantiationPattern( - /*ForDefinition*/ f

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-10-31 Thread Helena Kotas via cfe-commits
@@ -359,6 +356,176 @@ struct TemplateParameterListBuilder { return Builder; } }; + +// Builder for methods of builtin types. Allows adding methods to builtin types +// using the builder pattern like this: +// +// BuiltinTypeMethodBuilder(Sema, RecordBuilder, "MethodName

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114481 >From 3ba88ce598aaab269169f0a5db5981c9a9ac8603 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 31 Oct 2024 22:38:36 + Subject: [PATCH 1/4] Add pass to handle AMDGCN pseudo-intrinsics (abstract placehol

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/114457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/114457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,192 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// 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] [llvm] [LoongArch] Support amcas[_db].{b/h/w/d} instructions. (PR #114189)

2024-10-31 Thread via cfe-commits
@@ -5743,6 +5747,14 @@ LoongArchTargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *AI) const { } unsigned Size = AI->getType()->getPrimitiveSizeInBits(); + if (Subtarget.hasLAMCAS()) { +if (AI->getOperation() == AtomicRMWInst::Nand || +(Size < 32 /*&& (

[clang] [clang][Driver] Allow -fuse-lld=lld-link when lto is enabled on *windows-msvc targets (PR #113966)

2024-10-31 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 approved this pull request. LGTM! Would like a final look over from @MaskRay before merging :). https://github.com/llvm/llvm-project/pull/113966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114481 >From 3ba88ce598aaab269169f0a5db5981c9a9ac8603 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 31 Oct 2024 22:38:36 + Subject: [PATCH 1/3] Add pass to handle AMDGCN pseudo-intrinsics (abstract placehol

[clang] [llvm] [LoongArch] Support amcas[_db].{b/h/w/d} instructions. (PR #114189)

2024-10-31 Thread via cfe-commits
@@ -1562,7 +1562,9 @@ unsigned LoongArchAsmParser::checkTargetMatchPredicate(MCInst &Inst) { unsigned Opc = Inst.getOpcode(); switch (Opc) { default: -if (Opc >= LoongArch::AMADD_D && Opc <= LoongArch::AMXOR_W) { +// amcas[_db].{b/h/w/d} didn't need this judgemen

[clang] [Clang][SYCL] Fix use of uninitalized memory in temp files (PR #114488)

2024-10-31 Thread Alexey Bader via cfe-commits
bader wrote: PR title: "[Clang][SYCL] Fix use of uninitalized memory in temp files" tag: [Clang][SYCL] -> [clang-sycl-linker] typo: uninitalized -> uninitialized https://github.com/llvm/llvm-project/pull/114488 ___ cfe-commits mailing list cfe-commit

[clang] [Clang][SYCL] Fix use of uninitalized memory in temp files (PR #114488)

2024-10-31 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Good catch, thanks. https://github.com/llvm/llvm-project/pull/114488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Sanitizer test failures should be resolved by https://github.com/llvm/llvm-project/pull/114488 (under review). Thanks to @sarnex for the timely fix. Sincerely https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing li

[clang] Initialize SmallVector variable (PR #114434)

2024-10-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: This is not the correct fix. Closing it. Thanks https://github.com/llvm/llvm-project/pull/114434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Initialize SmallVector variable (PR #114434)

2024-10-31 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa closed https://github.com/llvm/llvm-project/pull/114434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-10-31 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 51a4f319f022b99f231e52fab97de28b6f1db591 a5245e5d6e026f389e64245a8ce4df643abec4a5 --e

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-10-31 Thread Bill Wendling via cfe-commits
bwendling wrote: This is a new PR, because GitHub messed up. Here's the original: https://github.com/llvm/llvm-project/pull/102549 https://github.com/llvm/llvm-project/pull/114495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > As per my other reply, this is not an invalid use case, but somewhat niche. > We can have a control value for disabling this early fold, for such builds, > to avoid the need to do two builds (which might also be fine for `libc`). I > don't think ROCDL uses the intrinsic at all

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114481 >From 3ba88ce598aaab269169f0a5db5981c9a9ac8603 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 31 Oct 2024 22:38:36 + Subject: [PATCH 1/2] Add pass to handle AMDGCN pseudo-intrinsics (abstract placehol

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
@@ -0,0 +1,49 @@ +//===- AMDGPUExpandPseudoIntrinsics.cpp - Pseudo Intrinsic Expander Pass --===// +// +// 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

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
@@ -0,0 +1,49 @@ +//===- AMDGPUExpandPseudoIntrinsics.cpp - Pseudo Intrinsic Expander Pass --===// +// +// 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

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > > Faux "generic" IR sounds like a problematic concept, do you have an example? > > It's what `libc` and the ROCm DeviceLibs do, compile or IR without `-mcpu` > and don't use any target specific attributes or intrinsics, then link it into > a TU later when the target is known.

[clang] [HLSL] add IsTypedResourceElementCompatible type trait (PR #113730)

2024-10-31 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! Please remove the whitespace-only change in clang/include/clang/AST/Type.h. https://github.com/llvm/llvm-project/pull/113730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > Just adding this to the pass pipeline where it is is no better than just > doing it in instcombine, which is the natural place to do this. This patch, > like instcombine, still has the problem that we don't know if we're producing > the final code. We could just turn this off

[clang] [clang] constexpr built-in fma function. (PR #113020)

2024-10-31 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: A problem with the current patch is that it does not evaluate, even in constant expression contexts, cases that require rounding: ```cpp extern constexpr float onepluszeroeps = __builtin_fmaf(__FLT_EPSILON__, .0f, 1.f); extern constexpr float oneplushalfeps = __bui

[clang] [clang][driver] Improve warning message for target AVR (PR #114394)

2024-10-31 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/114394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] da97883 - [clang][driver] Improve warning message for target AVR (#114394)

2024-10-31 Thread via cfe-commits
Author: Ben Shi Date: 2024-11-01T08:51:24+08:00 New Revision: da9788359d35f4294bc6ec5323751e40981cdbe0 URL: https://github.com/llvm/llvm-project/commit/da9788359d35f4294bc6ec5323751e40981cdbe0 DIFF: https://github.com/llvm/llvm-project/commit/da9788359d35f4294bc6ec5323751e40981cdbe0.diff LOG:

[clang] [clang] constexpr built-in fma function. (PR #113020)

2024-10-31 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast commented: Needs tests for rounding cases and observance of rounding modes. https://github.com/llvm/llvm-project/pull/113020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Faux "generic" IR sounds like a problematic concept, do you have an example? It's what `libc` and the ROCm DeviceLibs do, compile without `-mcpu` and don't use any target specific attributes or intrinsics, then link it into a TU later when the target is known. It's find in pri

[clang] [clang][driver] Improve warning message for target AVR (PR #114394)

2024-10-31 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/114394 >From eb74d413d2f5e5dcc520282a5c59893d5bf5 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Thu, 31 Oct 2024 20:06:55 +0800 Subject: [PATCH] [clang][driver] Improve warning message for AVR when no '-mmcu' opt

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > We do not want or need a new pass to handle this. This is not a fix to the > structural issue of wavesize. The problem is there is no such thing as a "no > wavesize" IR. There is only wave32 or wave64. Querying the target gives the > wrong answer for faux "generic" IR. Throwin

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -123,10 +123,16 @@ New checks Gives warnings for tagged unions, where the number of tags is different from the number of data members inside the union. +- New :doc:`modernize-use-integer-sign-comparison + ` check. + + Replace comparisons between signed and unsigned in

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,192 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,165 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,165 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,43 @@ +.. title:: clang-tidy - modernize-use-integer-sign-comparison + +modernize-use-integer-sign-comparison += + +Replace comparisons between signed and unsigned integers with their safe +``std::cmp_*`` alternative. + +Examples of f

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,165 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,165 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,46 @@ +//===--- QtTidyModule.cpp - clang-tidy ===// +// +// 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

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,46 @@ +//===--- QtTidyModule.cpp - clang-tidy ===// +// +// 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

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -84,6 +84,7 @@ Name prefixDescription ``performance-`` Checks that target performance-related issues. ``portability-`` Checks that target portability-related issues that don't relate to any particular coding style. +``qt-``

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -136,6 +142,16 @@ New check aliases :doc:`bugprone-sizeof-expression ` was added. +- New alias :doc:`qt-integer-sign-comparison + ` to + :doc:`modernize-use-integer-sign-comparison + ` check. + If C++17 is supported, the fix-it replaces integers comparisons to + ``

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,64 @@ +.. title:: clang-tidy - qt-integer-sign-comparison + +qt-integer-sign-comparison += + +The qt-integer-sign-comparison check is an alias, please see +:doc:`modernize-use-integer-sign-comparison <../modernize/use-integer-sign-comparison

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,192 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,192 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// 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] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-31 Thread Alexey Bader via cfe-commits
@@ -5116,11 +5123,34 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (const Arg *PF = Args.getLastArg(options::OPT_mprintf_kind_EQ)) PF->claim(); - if (Args.hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, false)) { -CmdArgs.push_back("-fsycl-

[clang] [clang][bytecode] Implement bitcasts to floating-point values (PR #114485)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114485 None >From ef34e3ce22103178513db8bb9565dec1511c1463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 1 Nov 2024 00:16:28 +0100 Subject: [PATCH] [clang][bytecode] Implement bitcasts to fl

[clang] [Clang][SYCL] Fix use of uninitalized memory in temp files (PR #114488)

2024-10-31 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/114488 This fixes the current sanitizer CI failures. I manually confirmed the fix with a MemorySanitizer build. >From 51227ad50bff12eff5a4f835686f13d2444848ea Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 3

[clang] [clang][bytecode] Implement bitcasts to floating-point values (PR #114485)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/114485.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.h (+2-1) - (modified) clang/test/AST/ByteCode/builtin-bit-cast.cpp (+55-1

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-10-31 Thread Helena Kotas via cfe-commits
@@ -359,6 +356,176 @@ struct TemplateParameterListBuilder { return Builder; } }; + +// Builder for methods of builtin types. Allows adding methods to builtin types +// using the builder pattern like this: +// +// BuiltinTypeMethodBuilder(Sema, RecordBuilder, "MethodName

[clang] [clang-format] Add ConfigFile option (PR #113864)

2024-10-31 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/113864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 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 cf3464bbb796d492bcd4e764ada945304e0c874f 137659649078fe978fb9d7d262df9b7a512d2770 --e

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm requested changes to this pull request. We do not want or need a new pass to handle this. This is not a fix to the structural issue of wavesize. The problem is there is no such thing as a "no wavesize" IR. There is only wave32 or wave64. Querying the target gives the

[clang] [clang][bytecode] Implement IntegralAP bitcasting (PR #114471)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/114471 >From dcc03dcb4f1fed9fe871c904738a4f49c0716cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 23:14:41 +0100 Subject: [PATCH] [clang][bytecode] Implement IntegralAP bitcasti

  1   2   3   4   5   6   >