[clang] [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (PR #69133)

2024-01-22 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: I think the libc buildbots are now failing as a result of this change. @aaupov can you PTAL? - https://lab.llvm.org/buildbot/#/builders/223/builds/34823 - https://lab.llvm.org/buildbot/#/builders/225/builds/29950 https://github.com/llvm/llvm-project/pull/69133

[clang-tools-extra] [llvm] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-22 Thread Félix-Antoine Constantin via cfe-commits
felix642 wrote: @11happy I've compiled your code to test it on llvm's project and clang-tidy seems to sometimes crash. Would you be able to have a look before we merge this PR ? ``` PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.

[clang] [Clang][AArch64] Define __USER_LABEL_PREFIX__ to # for ARM64EC (PR #78913)

2024-01-22 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I can sort of see how a define could be useful, but this doesn't match any existing usage of __USER_LABEL_PREFIX__ given the relevant rules. I think reusing the name is more likely to cause confusion, rather than help anyone.

[clang] [clang] Use LazyDetector for all toolchains. (PR #79073)

2024-01-22 Thread via cfe-commits
https://github.com/cooperp approved this pull request. Not code i'm familiar with, but looks like a mechanical change. LGTM https://github.com/llvm/llvm-project/pull/79073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[llvm] [clang] Arm64EC entry/exit thunks, consolidated. (PR #79067)

2024-01-22 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello approved this pull request. https://github.com/llvm/llvm-project/pull/79067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Add experimental support of Zaamo and Zalrsc (PR #78970)

2024-01-22 Thread Craig Topper via cfe-commits
topperc wrote: Please add "MC" to the title to distinquish from the other patch. https://github.com/llvm/llvm-project/pull/78970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b83b8d3 - Reland [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (#69133)

2024-01-22 Thread Amir Ayupov via cfe-commits
Author: Amir Ayupov Date: 2024-01-22T14:47:42-08:00 New Revision: b83b8d3fd17885438b0ea154e07088d877d293a8 URL: https://github.com/llvm/llvm-project/commit/b83b8d3fd17885438b0ea154e07088d877d293a8 DIFF: https://github.com/llvm/llvm-project/commit/b83b8d3fd17885438b0ea154e07088d877d293a8.diff

[llvm] [clang] [RISCV] Add experimental support of Zaamo and Zalrsc (PR #78970)

2024-01-22 Thread Craig Topper via cfe-commits
@@ -100,6 +100,8 @@ on support follow. ``V``Supported ``Za128rs`` Supported (`See note <#riscv-profiles-extensions-note>`__) ``Za64rs`` Supported (`See note <#riscv-profiles-extensions-note>`__) + ``Zaamo``Supported

[llvm] [clang] [RISCV] Add experimental support of Zaamo and Zalrsc (PR #78970)

2024-01-22 Thread Craig Topper via cfe-commits
@@ -0,0 +1,11 @@ +# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-zaamo < %s 2>&1 | FileCheck %s topperc wrote: Is this duplicating existing A test cases? If so can we split the A extension tests into 2 files as a pre-commit and add these the new Zaamo

[clang] [llvm] [RISCV] Add experimental support of Zaamo and Zalrsc (PR #78970)

2024-01-22 Thread Craig Topper via cfe-commits
@@ -1105,7 +1129,7 @@ def FeatureForcedAtomics : SubtargetFeature< "forced-atomics", "HasForcedAtomics", "true", "Assume that lock-free native-width atomics are available">; def HasAtomicLdSt -: Predicate<"Subtarget->hasStdExtA() || Subtarget->hasForcedAtomics()">;

[clang] [llvm] [RISCV] Add experimental support of Zaamo and Zalrsc (PR #78970)

2024-01-22 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/78970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Add experimental support of Zaamo and Zalrsc (PR #78970)

2024-01-22 Thread Craig Topper via cfe-commits
https://github.com/topperc requested changes to this pull request. https://github.com/llvm/llvm-project/pull/78970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libunwind] [libc] [libcxx] [clang-tools-extra] [lld] [lldb] [libclc] [flang] [llvm] [libcxxabi] [compiler-rt] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)

2024-01-22 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/66915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [libc] [lld] [llvm] [mlir] [compiler-rt] [clang-tools-extra] [flang] [libc++][hardening] Don't trigger redundant checks in the fast mode. (PR #77176)

2024-01-22 Thread Louis Dionne via cfe-commits
https://github.com/ldionne demilestoned https://github.com/llvm/llvm-project/pull/77176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][hardening] Categorize assertions related to strict weak ordering (PR #77405)

2024-01-22 Thread Louis Dionne via cfe-commits
@@ -360,11 +365,13 @@ _LIBCPP_HARDENING_MODE_DEBUG #define _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(expression, message) _LIBCPP_ASSERT(expression, message) #define _LIBCPP_ASSERT_NON_NULL(expression, message) _LIBCPP_ASSERT(expression, message) #

[libcxx] [clang] [llvm] [clang-tools-extra] [libc++][hardening] Categorize assertions related to strict weak ordering (PR #77405)

2024-01-22 Thread Louis Dionne via cfe-commits
@@ -52,204 +51,234 @@ class ComparisonResults { ldionne wrote: We need to take the parts of this test that would reproduce an OOB access inside `std::sort` & friends to a new test file. And that one should be enabled whenever the valid-element-access checks

[llvm] [clang] [clang][FatLTO] Avoid UnifiedLTO until it can support WPD/CFI (PR #79061)

2024-01-22 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/79061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][FatLTO] Avoid UnifiedLTO until it can support (PR #79061)

2024-01-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Paul Kirth (ilovepi) Changes Currently, the UnifiedLTO pipeline seems to have trouble with several LTO features, like SplitLTO units, which means we cannot use important optimizations like Whole Program Devirtualization or security

[clang] [llvm] [clang][FatLTO] Avoid UnifiedLTO until it can support (PR #79061)

2024-01-22 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/79061 Currently, the UnifiedLTO pipeline seems to have trouble with several LTO features, like SplitLTO units, which means we cannot use important optimizations like Whole Program Devirtualization or security hardening

[clang] [clang-format] Add options to set number of empty lines after includes (PR #78957)

2024-01-22 Thread via cfe-commits
https://github.com/seranu edited https://github.com/llvm/llvm-project/pull/78957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2024-01-22 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr closed https://github.com/llvm/llvm-project/pull/76571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fa4780f - [OpenMP][USM] Introduces -fopenmp-force-usm flag (#76571)

2024-01-22 Thread via cfe-commits
Author: Jan Patrick Lehr Date: 2024-01-22T21:59:26+01:00 New Revision: fa4780fa6cc36188b84b2a977ac15351c39d45dd URL: https://github.com/llvm/llvm-project/commit/fa4780fa6cc36188b84b2a977ac15351c39d45dd DIFF:

[libcxx] [clang-tools-extra] [clang] [llvm] [libc++][hardening] Categorize assertions related to strict weak ordering (PR #77405)

2024-01-22 Thread Konstantin Varlamov via cfe-commits
@@ -283,9 +283,20 @@ // - `_LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR` -- checks any operations that exchange nodes between containers to make sure // the containers have compatible allocators. // +// - `_LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN` -- checks that the given argument is

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-22 Thread Sean McBride via cfe-commits
seanm wrote: @bwendling thanks for your reply. No idea how representative it is of other projects, but 3 of the 6 flexible arrays in [libusb](https://github.com/libusb/libusb) structures have these kinds of non-trivial counts. The GCC folks seem to have

[lldb] [clang-tools-extra] [libunwind] [compiler-rt] [lld] [flang] [libc] [llvm] [libclc] [libcxxabi] [libcxx] [clang] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)

2024-01-22 Thread Paul Kirth via cfe-commits
ilovepi wrote: @topperc Is there anything else you think needs to be done for the code generation? https://github.com/llvm/llvm-project/pull/66915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [llvm] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,151 @@ +//===--- UseStdMinMaxCheck.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:

[clang-tools-extra] [clang] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,151 @@ +//===--- UseStdMinMaxCheck.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:

[llvm] [clang-tools-extra] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Except reported nits, looks fine. https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,151 @@ +//===--- UseStdMinMaxCheck.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:

[llvm] [clang] [clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,151 @@ +//===--- UseStdMinMaxCheck.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:

[clang-tools-extra] [llvm] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,151 @@ +//===--- UseStdMinMaxCheck.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:

[llvm] [clang-tools-extra] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,151 @@ +//===--- UseStdMinMaxCheck.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:

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-01-22 Thread Artem Belevich via cfe-commits
Artem-B wrote: > * Address space cast of nullptr in local_space into a generic_space for the > CUDA backend. I think you mean "NVPTX back-end". CUDA is a front-end entity (C++ w/ GPU extensions) https://github.com/llvm/llvm-project/pull/78759 ___

[clang-tools-extra] [clang] [clang-tidy] fix misc-const-correctnes false-positive for fold expressions (PR #78320)

2024-01-22 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti closed https://github.com/llvm/llvm-project/pull/78320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9f8ccf5 - [clang-tidy] fix misc-const-correctnes false-positive for fold expressions (#78320)

2024-01-22 Thread via cfe-commits
Author: Julian Schmidt Date: 2024-01-22T21:51:39+01:00 New Revision: 9f8ccf50dde17adae1368a0cf41edadc8327aaf4 URL: https://github.com/llvm/llvm-project/commit/9f8ccf50dde17adae1368a0cf41edadc8327aaf4 DIFF:

[clang-tools-extra] [clang] [clang-tidy] fix misc-const-correctnes false-positive for fold expressions (PR #78320)

2024-01-22 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/78320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-01-22 Thread Artem Belevich via cfe-commits
@@ -285,6 +289,20 @@ void NVPTXTargetCodeGenInfo::addNVVMMetadata(llvm::GlobalValue *GV, bool NVPTXTargetCodeGenInfo::shouldEmitStaticExternCAliases() const { return false; } + +llvm::Constant * +NVPTXTargetCodeGenInfo::getNullPointer(const CodeGen::CodeGenModule , +

[llvm] [clang-tools-extra] [clang] [lld] [compiler-rt] [libunwind] [libcxx] [flang] [lldb] [libc] [libcxxabi] Fix a bug in implementation of Smith's algorithm used in complex div. (PR #78330)

2024-01-22 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam closed https://github.com/llvm/llvm-project/pull/78330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 364a5b5 - Fix a bug in implementation of Smith's algorithm used in complex div. (#78330)

2024-01-22 Thread via cfe-commits
Author: Zahira Ammarguellat Date: 2024-01-22T15:50:24-05:00 New Revision: 364a5b5b850a4f3e564da4bde080567a5d1e14d2 URL: https://github.com/llvm/llvm-project/commit/364a5b5b850a4f3e564da4bde080567a5d1e14d2 DIFF:

[llvm] [clang-tools-extra] [clang] [lld] [compiler-rt] [libunwind] [libcxx] [flang] [lldb] [libc] [libcxxabi] Fix a bug in implementation of Smith's algorithm used in complex div. (PR #78330)

2024-01-22 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/78330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Format] Fix detection of languages when reading from stdin (PR #79051)

2024-01-22 Thread Ben Hamilton via cfe-commits
@@ -547,18 +547,20 @@ static void PrintVersion(raw_ostream ) { // Dump the configuration. static int dumpConfig(bool IsSTDIN) { std::unique_ptr Code; - // We can't read the code to detect the language if there's no file name. - if (!IsSTDIN) { -// Read in the code in

[clang] [Format] Fix detection of languages when reading from stdin (PR #79051)

2024-01-22 Thread Ben Hamilton via cfe-commits
https://github.com/bhamiltoncx updated https://github.com/llvm/llvm-project/pull/79051 >From 893c295ea7ff5fda9953420068fae2af7457c5c1 Mon Sep 17 00:00:00 2001 From: Ben Hamilton Date: Mon, 22 Jan 2024 11:33:18 -0700 Subject: [PATCH] [Format] Fix detection of languages when reading from stdin

[clang] [Format] Fix detection of languages when reading from stdin (PR #79051)

2024-01-22 Thread via cfe-commits
https://github.com/gulfemsavrun updated https://github.com/llvm/llvm-project/pull/79051 >From 893c295ea7ff5fda9953420068fae2af7457c5c1 Mon Sep 17 00:00:00 2001 From: Ben Hamilton Date: Mon, 22 Jan 2024 11:33:18 -0700 Subject: [PATCH] [Format] Fix detection of languages when reading from stdin

[clang] [Format] Fix detection of languages when reading from stdin (PR #79051)

2024-01-22 Thread Ben Hamilton via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: clang-format -dump-config - < %s | FileCheck %s bhamiltoncx wrote: In this case, we do want two tests (at least, we do need the integration test in `clang/test/Format/dump-config-objc-stdin.m` to reproduce the issue). The reason is,

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-22 Thread Bill Wendling via cfe-commits
bwendling wrote: > @bwendling is there any plan / possibility for simple expressions (with no > side effects)? Like: > > ```c > struct libusb_bos_dev_capability_descriptor { > uint8_t bLength; > uint8_t bDescriptorType; > uint8_t bDevCapabilityType; > uint8_t

[clang] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (PR #78333)

2024-01-22 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/78333 >From 2fb901b2379290b162647f0b6d152b93df1b1e7f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 22 Jan 2024 15:39:19 -0500 Subject: [PATCH] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation We

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-01-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > couldn't we just use the .clang-format-ignore file to say... hey don't bother > with this file, we can't do it... I think that's a good solution for avoiding the OOM when actually trying to format the file, in combination with this patch for avoiding the OOM in

[clang] [clang-tools-extra] [llvm] [libcxx] [libc++][hardening] Categorize assertions related to strict weak ordering (PR #77405)

2024-01-22 Thread Louis Dionne via cfe-commits
@@ -53,10 +53,9 @@ struct __debug_less { _LIBCPP_CONSTEXPR_SINCE_CXX14 inline _LIBCPP_HIDE_FROM_ABI void __do_compare_assert(long, _LHS&, _RHS&) {} }; -// Pass the comparator by lvalue reference. Or in debug mode, using a -// debugging wrapper that stores a reference. -#if

[clang] [Format] Fix detection of languages when reading from stdin (PR #79051)

2024-01-22 Thread Björn Schäpers via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: clang-format -dump-config - < %s | FileCheck %s HazardyKnusperkeks wrote: I don't think you need this, right? The unit tests does the same, or not? https://github.com/llvm/llvm-project/pull/79051

[clang] [Format] Fix detection of languages when reading from stdin (PR #79051)

2024-01-22 Thread Björn Schäpers via cfe-commits
@@ -547,18 +547,20 @@ static void PrintVersion(raw_ostream ) { // Dump the configuration. static int dumpConfig(bool IsSTDIN) { std::unique_ptr Code; - // We can't read the code to detect the language if there's no file name. - if (!IsSTDIN) { -// Read in the code in

[flang] [lldb] [libcxx] [lld] [clang-tools-extra] [clang] [llvm] [libclc] [compiler-rt] [libc] [libcxxabi] [Thumb,ELF] Fix access to dso_preemptable __stack_chk_guard with static relocation model (PR

2024-01-22 Thread Nick Desaulniers via cfe-commits
@@ -135,14 +135,14 @@ void Thumb1InstrInfo::loadRegFromStackSlot(MachineBasicBlock , void Thumb1InstrInfo::expandLoadStackGuard( MachineBasicBlock::iterator MI) const { MachineFunction = *MI->getParent()->getParent(); - const TargetMachine = MF.getTarget(); const

[clang] [clang-format][NFC] Clean up the driver and getStyle() in Format.cpp (PR #74794)

2024-01-22 Thread Ben Hamilton via cfe-commits
@@ -544,28 +544,23 @@ static void PrintVersion(raw_ostream ) { } // Dump the configuration. -static int dumpConfig() { - StringRef FileName; +static int dumpConfig(bool IsSTDIN) { std::unique_ptr Code; - if (FileNames.empty()) { -// We can't read the code to detect

[clang] [Format] Fix detection of languages when reading from stdin (PR #79051)

2024-01-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Ben Hamilton (Ben Gertzfield) (bhamiltoncx) Changes The code cleanup in #74794 accidentally broke detection of languages by reading file content from stdin, e.g. via `clang-format -dump-config - /path/to/filename`. This PR adds

[clang-tools-extra] [llvm] [clang] [libcxx] [libc++][hardening] Categorize assertions related to strict weak ordering (PR #77405)

2024-01-22 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/77405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Format] Fix detection of languages when reading from stdin (PR #79051)

2024-01-22 Thread Ben Hamilton via cfe-commits
https://github.com/bhamiltoncx created https://github.com/llvm/llvm-project/pull/79051 The code cleanup in #74794 accidentally broke detection of languages by reading file content from stdin, e.g. via `clang-format -dump-config - < /path/to/filename`. This PR adds unit and integration tests

[clang] [clang-format] Add options to set number of empty lines after includes (PR #78957)

2024-01-22 Thread Björn Schäpers via cfe-commits
@@ -0,0 +1,159 @@ +//===--- IncludesSeparator.cpp ---*- C++ -*-===// HazardyKnusperkeks wrote: Does this have to be done in a separate pass? Couldn't it be done in the normal formatting? https://github.com/llvm/llvm-project/pull/78957

[clang] [clang-format] Add options to set number of empty lines after includes (PR #78957)

2024-01-22 Thread Björn Schäpers via cfe-commits
@@ -4831,6 +4848,7 @@ struct FormatStyle { DerivePointerAlignment == R.DerivePointerAlignment && DisableFormat == R.DisableFormat && EmptyLineAfterAccessModifier == R.EmptyLineAfterAccessModifier && + EmptyLinesAfterIncludes ==

[clang] [clang] Improved isSimpleTypeSpecifier (PR #79037)

2024-01-22 Thread Carl Peto via cfe-commits
carlos4242 wrote: @owenca ... is this better for you? https://github.com/llvm/llvm-project/pull/79037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-01-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Can we write a unit test for this? I'm open to trying but there are a few open questions in my mind: * Is it fine if the failure mode of a testcase is triggering an OOM? * Triggering the problematic codepath requires a combination of a large file (thousands of lines)

[clang] [clang-format] Add options to set number of empty lines after includes (PR #78957)

2024-01-22 Thread Björn Schäpers via cfe-commits
@@ -3220,6 +3220,25 @@ the configuration (without a prefix: ``Auto``). +.. _EmptyLinesAfterIncludes: + +**EmptyLinesAfterIncludes** (``Unsigned``) :versionbadge:`clang-format 18` :ref:`¶ ` HazardyKnusperkeks wrote: Where do I have to sign up for that

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-01-22 Thread via cfe-commits
mmoadeli wrote: > It would be great to add some tests for local AS null pointers for NVPTX and > AMDGPU back-ends. They already have it [here](https://github.com/llvm/llvm-project/blob/286ac8f3ea6aec711827ccab9608b010e78b18cf/clang/test/CodeGenSYCL/amd-address-space-conversions.cpp#L24)

[llvm] [clang] [lld] [libc] [mlir] [libcxx] [clang-tools-extra] [flang] [compiler-rt] [libc++][hardening] Don't trigger redundant checks in the fast mode. (PR #77176)

2024-01-22 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. @philnik777 > Does this actually improve the performance anywhere? AFAICT all we gain is > avoiding the messages being generated in the binary, but I'm not convinced > that's much of a problem. e.g. in the `std::next` case, there doesn't

[lld] [flang] [compiler-rt] [clang] [libcxx] [libc] [clang-tools-extra] [mlir] [llvm] [libc++][hardening] Don't trigger redundant checks in the fast mode. (PR #77176)

2024-01-22 Thread Louis Dionne via cfe-commits
@@ -350,6 +363,9 @@ _LIBCPP_HARDENING_MODE_DEBUG #define _LIBCPP_ASSERT_PEDANTIC(expression, message) _LIBCPP_ASSUME(expression) #define _LIBCPP_ASSERT_INTERNAL(expression, message) _LIBCPP_ASSUME(expression) #define

[lld] [clang-tools-extra] [clang] [compiler-rt] [libc] [llvm] [libcxx] [flang] [mlir] [libc++][hardening] Don't trigger redundant checks in the fast mode. (PR #77176)

2024-01-22 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/77176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-01-22 Thread via cfe-commits
mydeveloperday wrote: While I get this fixes the guessLanguage limitation, if its OOM the I guess isn't it going to be OOM for any format? (as you mention above), couldn't we just use the .clang-format-ignore file to say... hey don't bother with this file, we can't do it... I feel like this

[clang-tools-extra] [lld] [llvm] [compiler-rt] [clang] [libc] [libcxx] [flang] [lldb] [AMDGPU][GFX12] VOP encoding and codegen - add support for v_cvt fp8/… (PR #78414)

2024-01-22 Thread Joe Nash via cfe-commits
Mirko =?utf-8?q?Brkušanin?= , Mirko =?utf-8?q?Brkušanin?= Message-ID: In-Reply-To: @@ -305,6 +305,11 @@ class VOP3OpSel_gfx10 op, VOPProfile p> : VOP3e_gfx10 { class VOP3OpSel_gfx11_gfx12 op, VOPProfile p> : VOP3OpSel_gfx10; +class VOP3FP8OpSel_gfx11_gfx12 op, VOPProfile

[clang] [Headers][X86] Add macro descriptions to bmiintrin.h (PR #79048)

2024-01-22 Thread Paul T Robinson via cfe-commits
pogo59 wrote: I note that these macros are just name substitutions, unlike the function-style macros in ia32intrin.h. I didn't change the definitions. https://github.com/llvm/llvm-project/pull/79048 ___ cfe-commits mailing list

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-01-22 Thread Nathan Ridge via cfe-commits
@@ -243,6 +247,14 @@ void UnwrappedLineParser::parse() { Callback.consumeUnwrappedLine(Line); } Callback.finishRun(); +TotalLinesProcessed += Lines.size(); +if ((TotalLinesProcessed / 1) > LastReport) { HighCommander4 wrote: My bad,

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-01-22 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/78925 >From 47ebe97c199ade54a9538eaed02171d78e6a5a46 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 21 Jan 2024 02:45:16 -0500 Subject: [PATCH] [clang-format] Limit how much work guessLanguage() can do

[clang] [FatLTO] output of -ffat-lto-objects -S should be assembly. (PR #79041)

2024-01-22 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. Thanks for the patch. This is a great catch! https://github.com/llvm/llvm-project/pull/79041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Update feature test macros for Clang 18 (PR #78991)

2024-01-22 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/78991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 02a28ee - [Clang] Update feature test macros for Clang 18 (#78991)

2024-01-22 Thread via cfe-commits
Author: cor3ntin Date: 2024-01-22T21:19:29+01:00 New Revision: 02a28ee8d981b2a8416c50e41c74cb21e73b8340 URL: https://github.com/llvm/llvm-project/commit/02a28ee8d981b2a8416c50e41c74cb21e73b8340 DIFF: https://github.com/llvm/llvm-project/commit/02a28ee8d981b2a8416c50e41c74cb21e73b8340.diff

[clang] [clang-format] Fix a bug in ContinuationIndenter (PR #78921)

2024-01-22 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/78921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-01-22 Thread via cfe-commits
https://github.com/mydeveloperday commented: Can we write a unit test for this? https://github.com/llvm/llvm-project/pull/78925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add macro descriptions to bmiintrin.h (PR #79048)

2024-01-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-x86 Author: Paul T Robinson (pogo59) Changes These are largely copy-pasted from the corresponding function descriptions. Added \see cross-references. Also changed c tags to \c. --- Full diff:

[clang] [llvm] [RISCV] Add Zic64b, Ziccamoa, Ziccif, Zicclsm, Ziccrse, and Za64rs to sifive-p450. (PR #79030)

2024-01-22 Thread Alex Bradbury via cfe-commits
https://github.com/asb approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/79030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Allow decltype in requires clause (PR #78847)

2024-01-22 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/78847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add macro descriptions to bmiintrin.h (PR #79048)

2024-01-22 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/79048 These are largely copy-pasted from the corresponding function descriptions. Added \see cross-references. Also changed tags to \c. >From 5a3f36a9276e0919d72cb48a7d30c2951b542c79 Mon Sep 17 00:00:00 2001 From:

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-01-22 Thread via cfe-commits
@@ -243,6 +247,14 @@ void UnwrappedLineParser::parse() { Callback.consumeUnwrappedLine(Line); } Callback.finishRun(); +TotalLinesProcessed += Lines.size(); +if ((TotalLinesProcessed / 1) > LastReport) { mydeveloperday wrote: Do we

[clang] [clang-format] Add MainIncludeChar option. (PR #78752)

2024-01-22 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/78752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [lld] [flang] [mlir] [compiler-rt] [clang] [libcxx] [clang-tools-extra] [llvm] [libc++][hardening] Classify assertions related to leaks and syscalls. (PR #77164)

2024-01-22 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/77164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Fix CodeGen options that can affect the AST. (PR #78816)

2024-01-22 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka updated https://github.com/llvm/llvm-project/pull/78816 >From 968941561e08424ecb4fb15615ee46fe8356405e Mon Sep 17 00:00:00 2001 From: Juergen Ributzka Date: Fri, 19 Jan 2024 16:10:03 -0800 Subject: [PATCH 1/2] [clang][modules] Fix CodeGen options that can affect the

[clang] [clang] Improved isSimpleTypeSpecifier (PR #79037)

2024-01-22 Thread Carl Peto via cfe-commits
https://github.com/carlos4242 updated https://github.com/llvm/llvm-project/pull/79037 >From 61a06b77e8e6f2b5c5a9a2aa0b7f46260545f5b4 Mon Sep 17 00:00:00 2001 From: Carl Peto Date: Mon, 22 Jan 2024 18:52:46 + Subject: [PATCH] [clang] - Sema::isSimpleTypeSpecifier return true for _Bool in

[clang] [clang-format] Add options to set number of empty lines after includes (PR #78957)

2024-01-22 Thread via cfe-commits
@@ -3220,6 +3220,25 @@ the configuration (without a prefix: ``Auto``). +.. _EmptyLinesAfterIncludes: + +**EmptyLinesAfterIncludes** (``Unsigned``) :versionbadge:`clang-format 18` :ref:`¶ ` mydeveloperday wrote: 18 will be correct today, but it won't be

[clang] [Clang][C++23] Core language changes from P1467R9 extended floating-point types and standard names. (PR #78503)

2024-01-22 Thread Zahira Ammarguellat via cfe-commits
@@ -7007,27 +7090,69 @@ static FloatingRank getFloatingRank(QualType T) { } } +/// C++23 6.8.5 [conv.rank] /// getFloatingTypeOrder - Compare the rank of the two specified floating /// point types, ignoring the domain of the type (i.e. 'double' == -/// '_Complex double').

[clang] [clang-format] Support of TableGen tokens with unary operator like form, bang operators and numeric literals. (PR #78996)

2024-01-22 Thread via cfe-commits
https://github.com/mydeveloperday edited https://github.com/llvm/llvm-project/pull/78996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Support of TableGen tokens with unary operator like form, bang operators and numeric literals. (PR #78996)

2024-01-22 Thread via cfe-commits
@@ -276,13 +276,44 @@ void FormatTokenLexer::tryMergePreviousTokens() { return; } } - // TableGen's Multi line string starts with [{ - if (Style.isTableGen() && tryMergeTokens({tok::l_square, tok::l_brace}, -

[clang] [clang-format] Support of TableGen tokens with unary operator like form, bang operators and numeric literals. (PR #78996)

2024-01-22 Thread via cfe-commits
@@ -276,13 +276,44 @@ void FormatTokenLexer::tryMergePreviousTokens() { return; } } - // TableGen's Multi line string starts with [{ - if (Style.isTableGen() && tryMergeTokens({tok::l_square, tok::l_brace}, -

[clang] [clang-format] Support of TableGen tokens with unary operator like form, bang operators and numeric literals. (PR #78996)

2024-01-22 Thread via cfe-commits
https://github.com/mydeveloperday commented: I don't use TableGen myself so I can't really say if this is quite the correct thing to do, I feel it needs a TableGenTest.cpp example of real TableGen code for every example you give here. Then we should try and cover the other use cases. That we

[clang] [Clang][C++23] Core language changes from P1467R9 extended floating-point types and standard names. (PR #78503)

2024-01-22 Thread Zahira Ammarguellat via cfe-commits
@@ -112,6 +112,85 @@ enum FloatingRank { Ibm128Rank }; +constexpr unsigned CXX23FloatRankToIndex(clang::BuiltinType::Kind Kind) { + switch (Kind) { + case clang::BuiltinType::Float16: +return 0; + case clang::BuiltinType::BFloat16: +return 1; + case

[clang] [clang][driver] Add -mtls-dialect option (PR #79031)

2024-01-22 Thread Paul Kirth via cfe-commits
@@ -401,6 +401,8 @@ static bool initTargetOptions(DiagnosticsEngine , Options.UniqueBasicBlockSectionNames = CodeGenOpts.UniqueBasicBlockSectionNames; Options.TLSSize = CodeGenOpts.TLSSize; + // TODO: Add correct codegen options in LLVM + // Options.TLSDesc =

[clang] [FatLTO] output of -ffat-lto-objects -S should be assembly. (PR #79041)

2024-01-22 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/79041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AIX] Only export libclang.map symbols from libclang (PR #78748)

2024-01-22 Thread Jake Egan via cfe-commits
jakeegan wrote: @jansvoboda11 Thanks again for investigating! https://github.com/llvm/llvm-project/pull/78748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang-tools-extra] [clang] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-22 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/78285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4f21fb8 - [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (#78285)

2024-01-22 Thread via cfe-commits
Author: Qiongsi Wu Date: 2024-01-22T14:54:58-05:00 New Revision: 4f21fb84479286ddc781d73f8df152f81a8264e7 URL: https://github.com/llvm/llvm-project/commit/4f21fb84479286ddc781d73f8df152f81a8264e7 DIFF: https://github.com/llvm/llvm-project/commit/4f21fb84479286ddc781d73f8df152f81a8264e7.diff

[clang-tools-extra] 4f21fb8 - [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (#78285)

2024-01-22 Thread via cfe-commits
Author: Qiongsi Wu Date: 2024-01-22T14:54:58-05:00 New Revision: 4f21fb84479286ddc781d73f8df152f81a8264e7 URL: https://github.com/llvm/llvm-project/commit/4f21fb84479286ddc781d73f8df152f81a8264e7 DIFF: https://github.com/llvm/llvm-project/commit/4f21fb84479286ddc781d73f8df152f81a8264e7.diff

[compiler-rt] [clang-tools-extra] [clang] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-22 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Hi @vitalybuka ! I am landing this PR. The precommit CI failures do not seem to related to changes in this PR. Please let me know if you see failures and I will revert. Thanks so much! https://github.com/llvm/llvm-project/pull/78285

[clang] [clang][AIX] Only export libclang.map symbols from libclang (PR #78748)

2024-01-22 Thread Jake Egan via cfe-commits
https://github.com/jakeegan closed https://github.com/llvm/llvm-project/pull/78748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 02aa695 - [clang][AIX] Only export libclang.map symbols from libclang (#78748)

2024-01-22 Thread via cfe-commits
Author: Jake Egan Date: 2024-01-22T14:53:35-05:00 New Revision: 02aa6956b5b6c92f3d4aea0aa466ed0d33343335 URL: https://github.com/llvm/llvm-project/commit/02aa6956b5b6c92f3d4aea0aa466ed0d33343335 DIFF: https://github.com/llvm/llvm-project/commit/02aa6956b5b6c92f3d4aea0aa466ed0d33343335.diff

<    1   2   3   4   5   6   7   >