[clang] [nfc][clang] Fix test in new-array-init.cpp (PR #79225)

2024-01-23 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 closed https://github.com/llvm/llvm-project/pull/79225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 25e1916 - [nfc][clang] Fix test in new-array-init.cpp (#79225)

2024-01-23 Thread via cfe-commits
Author: Alan Zhao Date: 2024-01-23T15:42:49-08:00 New Revision: 25e1916d88ebeef786956b678a4eb9a757e219d9 URL: https://github.com/llvm/llvm-project/commit/25e1916d88ebeef786956b678a4eb9a757e219d9 DIFF: https://github.com/llvm/llvm-project/commit/25e1916d88ebeef786956b678a4eb9a757e219d9.diff

[libcxxabi] [flang] [mlir] [clang-tools-extra] [clang] [libcxx] [compiler-rt] [llvm] [openmp] [libc] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)

2024-01-23 Thread Eli Friedman via cfe-commits
@@ -281,23 +279,19 @@ entry: define void @store_trunc_add_from_64bits(ptr %src, ptr %dst) { ; CHECK-LABEL: store_trunc_add_from_64bits: ; CHECK: ; %bb.0: ; %entry -; CHECK-NEXT:sub sp, sp, #16 -; CHECK-NEXT:.cfi_def_cfa_offset 16 ; CHECK-NEXT:ldr s0, [x0] ;

[llvm] [clang] [clang-tools-extra] [libc] [libcxxabi] [openmp] [libcxx] [compiler-rt] [flang] [mlir] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)

2024-01-23 Thread Eli Friedman via cfe-commits
@@ -21471,6 +21471,57 @@ bool isHalvingTruncateOfLegalScalableType(EVT SrcVT, EVT DstVT) { (SrcVT == MVT::nxv2i64 && DstVT == MVT::nxv2i32); } +// Combine store (trunc X to <3 x i8>) to sequence of ST1.b. +static SDValue combineI8TruncStore(StoreSDNode *ST,

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

2024-01-23 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 deleted 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

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

2024-01-23 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 requested changes to this pull request. Looks good! I was able run your code on llvm's project and I'm happy with the changes that I see. There is maybe one more use case that we should check before I am ready to approve (Except what Piotr has already highlighted)

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

2024-01-23 Thread Félix-Antoine Constantin via cfe-commits
@@ -0,0 +1,137 @@ +//===--- 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] [clang-tools-extra] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-23 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 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] [nfc][clang] Fix test in new-array-init.cpp (PR #79225)

2024-01-23 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. https://github.com/llvm/llvm-project/pull/79225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [nfc][clang] Fix test in new-array-init.cpp (PR #79225)

2024-01-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alan Zhao (alanzhao1) Changes This test was originally introduced in https://github.com/llvm/llvm-project/pull/76976, but it incorrectly tests braced-list initialization instead of parenthesized initialization. --- Full diff:

[clang] [nfc][clang] Fix test in new-array-init.cpp (PR #79225)

2024-01-23 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 created https://github.com/llvm/llvm-project/pull/79225 This test was originally introduced in https://github.com/llvm/llvm-project/pull/76976, but it incorrectly tests braced-list initialization instead of parenthesized initialization. >From

[clang] [Driver] Test ignored target-specific options for AMDGPU/NVPTX (PR #79222)

2024-01-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Fangrui Song (MaskRay) Changes Fix missing test coverage after #70740 #70760 --- Full diff: https://github.com/llvm/llvm-project/pull/79222.diff 1 Files Affected: - (added) clang/test/Driver/unsupported-option-gpu.c (+7)

[clang] [Driver] Test ignored target-specific options for AMDGPU/NVPTX (PR #79222)

2024-01-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes Fix missing test coverage after #70740 #70760 --- Full diff: https://github.com/llvm/llvm-project/pull/79222.diff 1 Files Affected: - (added) clang/test/Driver/unsupported-option-gpu.c (+7)

[clang] [Driver] Test ignored target-specific options for AMDGPU/NVPTX (PR #79222)

2024-01-23 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/79222 Fix missing test coverage after #70740 #70760 >From 3a2b2a1110e7b3348a12a6476ab014a469891062 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 23 Jan 2024 15:13:49 -0800 Subject: [PATCH]

[clang-tools-extra] [clang] [llvm] [compiler-rt] [mlir] [mlir][bufferization] Fix SimplifyClones with dealloc before cloneOp (PR #79098)

2024-01-23 Thread Kohei Yamaguchi via cfe-commits
https://github.com/sott0n updated https://github.com/llvm/llvm-project/pull/79098 >From cceb921d9bc7e3a4c1efe7050d6bfe6cb2eb49e7 Mon Sep 17 00:00:00 2001 From: Kohei Yamaguchi Date: Tue, 23 Jan 2024 14:30:02 + Subject: [PATCH 1/2] [mlir][bufferization] Fix SimplifyClones with dealloc

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 %t/foo.cpp -I%t -fsyntax-only -verify + +//--- i.h +#ifndef FOO_H +#pragma once +struct S{}; +#endif + +//--- foo.cpp vsapsai wrote: Personally

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 %t/foo.cpp -I%t -fsyntax-only -verify vsapsai wrote: You don't really need `-I%t`, the test works without it. But don't have a strong opinion.

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 %t/foo.cpp -I%t -fsyntax-only -verify + +//--- i.h +#ifndef FOO_H vsapsai wrote: The mismatch between i.h and FOO_H is slightly annoying but

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
@@ -1458,7 +1458,7 @@ bool HeaderSearch::ShouldEnterIncludeFile(Preprocessor , } else { // Otherwise, if this is a #include of a file that was previously #import'd // or if this is the second #include of a #pragma once file, ignore it. -if

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
@@ -1458,7 +1458,7 @@ bool HeaderSearch::ShouldEnterIncludeFile(Preprocessor , } else { // Otherwise, if this is a #include of a file that was previously #import'd // or if this is the second #include of a #pragma once file, ignore it. vsapsai

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai approved this pull request. Overall, the change works fine and it is pretty small. Have a few minor suggestion for the test but nothing blocking. https://github.com/llvm/llvm-project/pull/76119 ___ cfe-commits mailing list

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai edited https://github.com/llvm/llvm-project/pull/76119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Add sifive-p670 processor (PR #79015)

2024-01-23 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/79015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [flang] [mlir] [llvm] [compiler-rt] [clang-tools-extra] [openmp] [libcxxabi] [libc] [clang] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)

2024-01-23 Thread Florian Hahn via cfe-commits
@@ -281,23 +279,19 @@ entry: define void @store_trunc_add_from_64bits(ptr %src, ptr %dst) { ; CHECK-LABEL: store_trunc_add_from_64bits: ; CHECK: ; %bb.0: ; %entry -; CHECK-NEXT:sub sp, sp, #16 -; CHECK-NEXT:.cfi_def_cfa_offset 16 ; CHECK-NEXT:ldr s0, [x0] ;

[clang] [Clang] C++ Templates: Refactor and fix `TransformLambdaExpr`'s mishandling of TypeLocs (PR #78801)

2024-01-23 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/78801 >From 04e085570c03af9f4b877d75cf3cccd33b7b76c5 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Fri, 19 Jan 2024 13:42:46 -0800 Subject: [PATCH] Refactor and fix Lambda prototype instantiation when it's

[libcxx] [flang] [mlir] [llvm] [compiler-rt] [clang-tools-extra] [openmp] [libc] [lldb] [lld] [clang] AMDGPU: Add SourceOfDivergence for int_amdgcn_global_load_tr (PR #79218)

2024-01-23 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng closed https://github.com/llvm/llvm-project/pull/79218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [flang] [mlir] [llvm] [compiler-rt] [clang-tools-extra] [openmp] [libcxxabi] [libc] [clang] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)

2024-01-23 Thread Florian Hahn via cfe-commits
@@ -281,23 +279,19 @@ entry: define void @store_trunc_add_from_64bits(ptr %src, ptr %dst) { ; CHECK-LABEL: store_trunc_add_from_64bits: ; CHECK: ; %bb.0: ; %entry -; CHECK-NEXT:sub sp, sp, #16 -; CHECK-NEXT:.cfi_def_cfa_offset 16 ; CHECK-NEXT:ldr s0, [x0] ;

[libcxxabi] [compiler-rt] [openmp] [libc] [mlir] [clang-tools-extra] [clang] [libcxx] [llvm] [flang] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)

2024-01-23 Thread Florian Hahn via cfe-commits
@@ -21471,6 +21471,57 @@ bool isHalvingTruncateOfLegalScalableType(EVT SrcVT, EVT DstVT) { (SrcVT == MVT::nxv2i64 && DstVT == MVT::nxv2i32); } +// Combine store (trunc X to <3 x i8>) to sequence of ST1.b. +static SDValue combineI8TruncStore(StoreSDNode *ST,

[clang-tools-extra] [clang] [flang] [libcxxabi] [openmp] [libcxx] [mlir] [llvm] [libc] [compiler-rt] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)

2024-01-23 Thread Florian Hahn via cfe-commits
@@ -21471,6 +21471,57 @@ bool isHalvingTruncateOfLegalScalableType(EVT SrcVT, EVT DstVT) { (SrcVT == MVT::nxv2i64 && DstVT == MVT::nxv2i32); } +// Combine store (trunc X to <3 x i8>) to sequence of ST1.b. +static SDValue combineI8TruncStore(StoreSDNode *ST,

[libcxx] [flang] [mlir] [llvm] [compiler-rt] [clang-tools-extra] [openmp] [libc] [lldb] [lld] [clang] AMDGPU: Add SourceOfDivergence for int_amdgcn_global_load_tr (PR #79218)

2024-01-23 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/79218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Add a new warning for uses of std::span two-parameter constructors (PR #77148)

2024-01-23 Thread via cfe-commits
https://github.com/jkorous-apple edited https://github.com/llvm/llvm-project/pull/77148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Add a new warning for uses of std::span two-parameter constructors (PR #77148)

2024-01-23 Thread via cfe-commits
@@ -594,6 +667,44 @@ class PointerArithmeticGadget : public WarningGadget { // FIXME: this gadge will need a fix-it }; +class SpanTwoParamConstructorGadget : public WarningGadget { + static constexpr const char *const SpanTwoParamConstructorTag = +

[clang] [-Wunsafe-buffer-usage] Add a new warning for uses of std::span two-parameter constructors (PR #77148)

2024-01-23 Thread via cfe-commits
https://github.com/jkorous-apple approved this pull request. I will just say that I didn't imagine this warning to be made part of the analysis machine we use to produce fixits and it seems like at couple places the patch struggles with the abstractions the machine uses but overall I don't

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #78526)

2024-01-23 Thread Bill Wendling via cfe-commits
bwendling wrote: It matches my understanding too. There are more issues with `__bdos` that arose due to this discussion and related discussions with the GCC maintainers. I'm exploring some ways of fixing this issue: * As @efriedma-quic mentioned, generating the size calculation in the front

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

2024-01-23 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/78333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-23 Thread via cfe-commits
Author: Shilei Tian Date: 2024-01-23T17:08:04-05:00 New Revision: dc410f94f602390a65c832cf348b9ee6556b1809 URL: https://github.com/llvm/llvm-project/commit/dc410f94f602390a65c832cf348b9ee6556b1809 DIFF: https://github.com/llvm/llvm-project/commit/dc410f94f602390a65c832cf348b9ee6556b1809.diff

[clang-tools-extra] [llvm] [clang] [misc-coroutine-hostile-raii] Use getOperand instead of getCommonExpr. (PR #79206)

2024-01-23 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/79206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 729657d - [misc-coroutine-hostile-raii] Use getOperand instead of getCommonExpr. (#79206)

2024-01-23 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2024-01-23T23:07:00+01:00 New Revision: 729657d6e15d047f35485deb87313ccdde10 URL: https://github.com/llvm/llvm-project/commit/729657d6e15d047f35485deb87313ccdde10 DIFF:

[clang-tools-extra] [llvm] [clang] [misc-coroutine-hostile-raii] Use getOperand instead of getCommonExpr. (PR #79206)

2024-01-23 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: Thanks. This is trivial and might not require another pair of eyes. https://github.com/llvm/llvm-project/pull/79206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [compiler-rt] [libc] [clang-tools-extra] [libcxx] [llvm] [clang][FatLTO] Avoid UnifiedLTO until it can support WPD/CFI (PR #79061)

2024-01-23 Thread Paul Kirth via cfe-commits
ilovepi wrote: Since this has passed Linux premerge checks and I think Windows CI is having some issues I tested this locally on a Windows machine and its passing. I'm going to go ahead and merge. https://github.com/llvm/llvm-project/pull/79061 ___

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-01-23 Thread Arthur Eubanks via cfe-commits
@@ -1127,6 +1134,11 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, if (EnableSyntheticCounts && !PGOOpt) MPM.addPass(SyntheticCountsPropagation()); + if (EnableMarkColdFunctions && PGOOpt && + (PGOOpt->Action == PGOOptions::SampleUse

[clang] [compiler-rt] [llvm] [clang-tools-extra] [libcxx] [libc] [flang] [clang][FatLTO] Avoid UnifiedLTO until it can support WPD/CFI (PR #79061)

2024-01-23 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed 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] 9d476e1 - [clang][FatLTO] Avoid UnifiedLTO until it can support WPD/CFI (#79061)

2024-01-23 Thread via cfe-commits
Author: Paul Kirth Date: 2024-01-23T14:04:52-08:00 New Revision: 9d476e1e1a18af390e3455a6622ee67a69c64103 URL: https://github.com/llvm/llvm-project/commit/9d476e1e1a18af390e3455a6622ee67a69c64103 DIFF: https://github.com/llvm/llvm-project/commit/9d476e1e1a18af390e3455a6622ee67a69c64103.diff

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-01-23 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,65 @@ +//===--===// +// +// 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] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-01-23 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/69030 >From e52a811c3b643548837b4e630e8293a0b6857ad4 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Fri, 13 Oct 2023 14:40:28 -0700 Subject: [PATCH 1/5] [PGO] Add ability to mark cold functions as

[clang] [flang] [compiler-rt] [openmp] [libcxxabi] [libc] [clang-tools-extra] [libcxx] [llvm] [mlir] [AArch64] Add custom lowering for load <3 x i8>. (PR #78632)

2024-01-23 Thread Eli Friedman via cfe-commits
@@ -21248,6 +21248,51 @@ static SDValue foldTruncStoreOfExt(SelectionDAG , SDNode *N) { return SDValue(); } +// A custom combine to lower load <3 x i8> as the more efficient sequence +// below: +//ldrb wX, [x0, #2] +//ldrh wY, [x0] +//orr wX, wY, wX, lsl #16

[clang] [Preprocessor][test] Test ARM64EC definitions (PR #78916)

2024-01-23 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/78916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2227e50 - [Preprocessor][test] Test ARM64EC definitions (#78916)

2024-01-23 Thread via cfe-commits
Author: Billy Laws Date: 2024-01-23T13:57:28-08:00 New Revision: 2227e50c618ecc6f83e8c69286a418ee04750361 URL: https://github.com/llvm/llvm-project/commit/2227e50c618ecc6f83e8c69286a418ee04750361 DIFF: https://github.com/llvm/llvm-project/commit/2227e50c618ecc6f83e8c69286a418ee04750361.diff

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-01-23 Thread Arthur Eubanks via cfe-commits
@@ -1127,6 +1134,11 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, if (EnableSyntheticCounts && !PGOOpt) MPM.addPass(SyntheticCountsPropagation()); + if (EnableMarkColdFunctions && PGOOpt && + (PGOOpt->Action == PGOOptions::SampleUse

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-01-23 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,28 @@ +//===- MarkColdFunctions.h - *- C++ -*-===// +// +// 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] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-01-23 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/69030 >From e52a811c3b643548837b4e630e8293a0b6857ad4 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Fri, 13 Oct 2023 14:40:28 -0700 Subject: [PATCH 1/3] [PGO] Add ability to mark cold functions as

[clang] [clang] Make sure the same UsingType is searched and inserted (PR #79182)

2024-01-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: The change is correct. The problem is subtle though. It comes from the difference in behavior between the member and non-member Profile functions. I think we could do better instead with a change which makes it harder to trip on this. I think a simplification like this should

[lldb] [libclc] [libc] [clang] [compiler-rt] [mlir] [flang] [clang-tools-extra] [libcxx] [lld] [llvm] [libcxxabi] [ELF] Add internal InputFile (PR #78944)

2024-01-23 Thread Fangrui Song via cfe-commits
MaskRay wrote: Hi, do you have more information (like a reproduce tarball) about a `file` that references a file of `InternalKind`? Could it be a patch in your downstream? If `file` references a file of `InternalKind`, we probably should make it `nullptr`

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

2024-01-23 Thread via cfe-commits
https://github.com/lntue updated https://github.com/llvm/llvm-project/pull/78333 >From 5eb2678a0a6a55c2d441b322d4eaaa8fe829a30f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 23 Jan 2024 16:14:48 -0500 Subject: [PATCH] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation We can

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

2024-01-23 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/78333 >From 5eb2678a0a6a55c2d441b322d4eaaa8fe829a30f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 23 Jan 2024 16:14:48 -0500 Subject: [PATCH] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation We

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

2024-01-23 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka closed https://github.com/llvm/llvm-project/pull/79073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4ad4c8e - [clang] Use LazyDetector for all toolchains. (#79073)

2024-01-23 Thread via cfe-commits
Author: Juergen Ributzka Date: 2024-01-23T13:14:17-08:00 New Revision: 4ad4c8e90e120687e768475fecb8cc03d422b3a1 URL: https://github.com/llvm/llvm-project/commit/4ad4c8e90e120687e768475fecb8cc03d422b3a1 DIFF:

[clang-tools-extra] [clang] [llvm] [X86] Use RORX over SHR imm (PR #77964)

2024-01-23 Thread Bryce Wilson via cfe-commits
https://github.com/Bryce-MW updated https://github.com/llvm/llvm-project/pull/77964 >From d4c312b9dbf447d0a53dda0e6cdc482bd908430b Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Fri, 12 Jan 2024 16:01:32 -0600 Subject: [PATCH 01/11] [X86] Use RORX over SHR imm ---

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

2024-01-23 Thread Björn Schäpers via cfe-commits
@@ -0,0 +1,159 @@ +//===--- IncludesSeparator.cpp ---*- C++ -*-===// HazardyKnusperkeks wrote: Maybe you could work something out with the line type?

[flang] [clang] [compiler-rt] [llvm] [libcxx] [openmp] [mlir] [libc] [clang-tools-extra] [lld] [ELF] --save-temps --lto-emit-asm: derive ELF/asm file names from bitcode file names (PR #78835)

2024-01-23 Thread Fangrui Song via cfe-commits
MaskRay wrote: > We're seeing a test failure on our buildbot after this patch landed. Could > you take a look? > > [lab.llvm.org/buildbot/#/builders/216/builds/33382/steps/7/logs/FAIL__lld__defsym_ll](https://lab.llvm.org/buildbot/#/builders/216/builds/33382/steps/7/logs/FAIL__lld__defsym_ll)

[flang] [clang] [compiler-rt] [llvm] [libcxx] [mlir] [libc] [clang-tools-extra] [lld] [libc++][hardening] Categorize assertions that produce incorrect results (PR #77183)

2024-01-23 Thread David Benjamin via cfe-commits
@@ -307,8 +307,11 @@ public: : __data_(__s), __size_(__len) { #if _LIBCPP_STD_VER >= 14 -_LIBCPP_ASSERT_UNCATEGORIZED(__len <= static_cast(numeric_limits::max()), - "string_view::string_view(_CharT *, size_t): length does not

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-23 Thread Björn Schäpers via cfe-commits
@@ -4006,11 +3993,58 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine , } if (Left.is(tok::l_paren) || Right.is(tok::r_paren)) { -return (Right.is(TT_CastRParen) || -(Left.MatchingParen && Left.MatchingParen->is(TT_CastRParen))) -

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-23 Thread Björn Schäpers via cfe-commits
@@ -4006,11 +3993,58 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine , } if (Left.is(tok::l_paren) || Right.is(tok::r_paren)) { -return (Right.is(TT_CastRParen) || -(Left.MatchingParen && Left.MatchingParen->is(TT_CastRParen))) -

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-23 Thread Björn Schäpers via cfe-commits
@@ -4542,18 +4542,51 @@ struct FormatStyle { /// Other: true HazardyKnusperkeks wrote: Add the options here too? https://github.com/llvm/llvm-project/pull/77522 ___ cfe-commits mailing list

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-23 Thread Björn Schäpers via cfe-commits
@@ -4006,11 +3993,58 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine , } if (Left.is(tok::l_paren) || Right.is(tok::r_paren)) { -return (Right.is(TT_CastRParen) || -(Left.MatchingParen && Left.MatchingParen->is(TT_CastRParen))) -

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-23 Thread Björn Schäpers via cfe-commits
@@ -4542,18 +4542,51 @@ struct FormatStyle { /// Other: true /// \endcode struct SpacesInParensCustom { +/// Override any of the following options to prevent addition of space +/// between the first two parentheses in situations where a pair of +///

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

2024-01-23 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy 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

[lld] [compiler-rt] [clang] [clang-tools-extra] [mlir] [flang] [openmp] [libcxx] [libc] [llvm] [ELF] --save-temps --lto-emit-asm: derive ELF/asm file names from bitcode file names (PR #78835)

2024-01-23 Thread Matthew Voss via cfe-commits
ormris wrote: We're seeing a test failure on our buildbot after this patch landed. Could you take a look? https://lab.llvm.org/buildbot/#/builders/216/builds/33382/steps/7/logs/FAIL__lld__defsym_ll ``` # RUN: at line 4 z:\b\llvm-clang-x86_64-sie-win\build\bin\llvm-as.exe

[clang-tools-extra] [clang] [llvm] [misc-coroutine-hostile-raii] Use getOperand instead of getCommonExpr. (PR #79206)

2024-01-23 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM. But please note that I'm not too familiar with coroutines. https://github.com/llvm/llvm-project/pull/79206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[llvm] [clang] [RISCV] Add sifive-p670 processor (PR #79015)

2024-01-23 Thread Michael Maitland via cfe-commits
@@ -2000,6 +2000,14 @@ bool RISCVTargetLowering::shouldSinkOperands( if (!I->getType()->isVectorTy() || !Subtarget.hasVInstructions()) return false; + // Don't sink splat operands if the target prefers it. Some targets requires michaelmaitland wrote:

[llvm] [clang] [RISCV] Add sifive-p670 processor (PR #79015)

2024-01-23 Thread Michael Maitland via cfe-commits
https://github.com/michaelmaitland edited https://github.com/llvm/llvm-project/pull/79015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add sifive-p670 processor (PR #79015)

2024-01-23 Thread Michael Maitland via cfe-commits
https://github.com/michaelmaitland updated https://github.com/llvm/llvm-project/pull/79015 >From 639d404b3b8a8ca7e92160fa8512459be07e631f Mon Sep 17 00:00:00 2001 From: Michael Maitland Date: Mon, 22 Jan 2024 07:53:55 -0800 Subject: [PATCH 1/6] [RISCV] Add sifive-p670 processor This is an OOO

[clang] Try on bot patch from #76218 (PR #78813)

2024-01-23 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Not needed https://github.com/llvm/llvm-project/pull/78813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Try on bot patch from #76218 (PR #78813)

2024-01-23 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/78813 ___ 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-23 Thread Ben Hamilton via cfe-commits
https://github.com/bhamiltoncx closed https://github.com/llvm/llvm-project/pull/79051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-23 Thread via cfe-commits
Author: Ben Hamilton (Ben Gertzfield) Date: 2024-01-23T13:32:41-07:00 New Revision: d813af73f70f6b2fd41621d640cc35e595b9da4c URL: https://github.com/llvm/llvm-project/commit/d813af73f70f6b2fd41621d640cc35e595b9da4c DIFF:

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

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

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #78526)

2024-01-23 Thread Nikita Popov via cfe-commits
nikic wrote: Thanks for summarizing, that matches my understanding. As to how to implement this "properly", that would probably be https://discourse.llvm.org/t/exploring-the-effects-and-uses-of-the-memory-region-declaration-intrinsic/72756. The memory.region.decl intrinsics effectively encode

[clang-tools-extra] [clang] [llvm] [misc-coroutine-hostile-raii] Use getOperand instead of getCommonExpr. (PR #79206)

2024-01-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Utkarsh Saxena (usx95) Changes We were previously allowlisting awaitable types returned by `await_transform` instead of the type of the operand of the `co_await` expression. This previously

[clang] [llvm] [clang-tools-extra] [misc-coroutine-hostile-raii] Use getOperand instead of getCommonExpr. (PR #79206)

2024-01-23 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review https://github.com/llvm/llvm-project/pull/79206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [misc-coroutine-hostile-raii] Use getOperand instead of getCommonExpr. (PR #79206)

2024-01-23 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/79206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [misc-coroutine-hostile-raii] Use getOperand instead of getCommonExpr. (PR #79206)

2024-01-23 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/79206 >From 28d90711ff8e4924135d4bd4e5f252d96ac41b93 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 23 Jan 2024 20:18:25 + Subject: [PATCH] [misc-coroutine-hostile-raii] Use getOperand instead of

[clang-tools-extra] [misc-coroutine-hostile-raii] Use getOperand instead of getCommonExpr. (PR #79206)

2024-01-23 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/79206 We were previously allowlisting awaitable types returned by `await_transform` instead of the type of the operand of the `co_await` expression. >From 28d90711ff8e4924135d4bd4e5f252d96ac41b93 Mon Sep 17 00:00:00

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

2024-01-23 Thread Billy Laws via cfe-commits
bylaws wrote: @efriedma-quic Fair enough, I found this cleaned up things on the compiler-rt side but even then it still needed changes to handle concatenating a #, and I'd imagine that to be the same for any other existing user. It would still be nice to have something equivalent to A64NAME

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

2024-01-23 Thread Billy Laws via cfe-commits
https://github.com/bylaws closed https://github.com/llvm/llvm-project/pull/78913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Add sifive-p670 processor (PR #79015)

2024-01-23 Thread Craig Topper via cfe-commits
@@ -2000,6 +2000,14 @@ bool RISCVTargetLowering::shouldSinkOperands( if (!I->getType()->isVectorTy() || !Subtarget.hasVInstructions()) return false; + // Don't sink splat operands if the target prefers it. Some targets requires topperc wrote: These

[flang] [clang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

2024-01-23 Thread Brad Richardson via cfe-commits
everythingfunctional wrote: > > Not that it's the end of the world if this doesn't get in before the this > > release, but @sscalpone , exactly what feedback are we wanting before > > merging? > > IIUC, this: > https://discourse.llvm.org/t/proposal-rename-flang-new-to-flang/69462/55 ok, but

[flang] [clang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

2024-01-23 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > Not that it's the end of the world if this doesn't get in before the this > release, but @sscalpone , exactly what feedback are we wanting before merging? IIUC, this: https://discourse.llvm.org/t/proposal-rename-flang-new-to-flang/69462/55

[clang] [Preprocessor][test] Test ARM64EC definitions (PR #78916)

2024-01-23 Thread Billy Laws via cfe-commits
https://github.com/bylaws edited https://github.com/llvm/llvm-project/pull/78916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #78526)

2024-01-23 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Trying to summarize my understanding here: - Using the type of an alloca in LLVM IR is wrong, for a variety of reasons. (At this point, the type of an alloca is basically just leftover junk from before the opaque pointer transition; I expect that we'll kill it off

[llvm] [clang] [RISCV] Add sifive-p670 processor (PR #79015)

2024-01-23 Thread Michael Maitland via cfe-commits
@@ -1082,6 +1082,13 @@ def TuneShortForwardBranchOpt def HasShortForwardBranchOpt : Predicate<"Subtarget->hasShortForwardBranchOpt()">; def NoShortForwardBranchOpt : Predicate<"!Subtarget->hasShortForwardBranchOpt()">; +// P670 requires a S2V transfer buffer to move scalars

[clang] [llvm] Use unaligned atomic load and stores on x86 (PR #79191)

2024-01-23 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/79191 >From 9d8ca53e5439f838eea7c8d8531cac6c27df2c47 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:59:05 -0500 Subject: [PATCH] Use unaligned atomic

[llvm] [clang] [RISCV] Add sifive-p670 processor (PR #79015)

2024-01-23 Thread Michael Maitland via cfe-commits
https://github.com/michaelmaitland updated https://github.com/llvm/llvm-project/pull/79015 >From 639d404b3b8a8ca7e92160fa8512459be07e631f Mon Sep 17 00:00:00 2001 From: Michael Maitland Date: Mon, 22 Jan 2024 07:53:55 -0800 Subject: [PATCH 1/5] [RISCV] Add sifive-p670 processor This is an OOO

[llvm] [clang] [RISCV] Add sifive-p670 processor (PR #79015)

2024-01-23 Thread Michael Maitland via cfe-commits
@@ -241,7 +241,17 @@ // MCPU-SIFIVE-P450-SAME: "-target-feature" "+zbb" // MCPU-SIFIVE-P450-SAME: "-target-feature" "+zbs" // MCPU-SIFIVE-P450-SAME: "-target-abi" "lp64d" -// + +// RUN: %clang -target riscv64 -### -c %s 2>&1 -mcpu=sifive-p670 | FileCheck

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

2024-01-23 Thread Félix-Antoine Constantin via cfe-commits
felix642 wrote: @11happy I was testing with `d5b8dc25598` but this seems to be working properly now. I would assume that this has been fixed in your latest commits https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list

[llvm] [clang] Use unaligned atomic load and stores on x86 (PR #79191)

2024-01-23 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/79191 >From 9454e1cc48088508d4df33b7a4de47418de03348 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:59:05 -0500 Subject: [PATCH] Use unaligned atomic

[clang] [Preprocessor][test] Test ARM64EC definitions (PR #78916)

2024-01-23 Thread Billy Laws via cfe-commits
bylaws wrote: @efriedma-quic should be fixed https://github.com/llvm/llvm-project/pull/78916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Preprocessor][test] Test ARM64EC definitions (PR #78916)

2024-01-23 Thread Billy Laws via cfe-commits
https://github.com/bylaws updated https://github.com/llvm/llvm-project/pull/78916 >From 76e6e6fb01868a73c0c35c1a8a04ac34af2ea088 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sun, 21 Jan 2024 22:55:44 + Subject: [PATCH] [Preprocessor][test] Test ARM64EC definitions ---

[llvm] [clang] [CMake][PGO] Add option for using an external project to generate profile data (PR #78879)

2024-01-23 Thread Petr Hosek via cfe-commits
@@ -15,7 +19,7 @@ if(LLVM_BUILD_INSTRUMENTED) ) petrhosek wrote: Looks like I added that in https://reviews.llvm.org/D138974 but I'm not aware of it being used anywhere at the moment. I'd still prefer renaming it to `CLANG_PGO_TRAINING_DEPS` for

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

2024-01-23 Thread Joe Nash via cfe-commits
Mirko =?utf-8?q?Brkušanin?= , Mirko =?utf-8?q?Brkušanin?= ,Mirko Brkusanin ,Mariusz Sikora Message-ID: In-Reply-To: https://github.com/Sisyph commented: DPP changes look good, and functionally I'm fine with the patch. I don't think the tablegen 'bit IsFP8' version of managing the op_sel

<    1   2   3   4   5   >