[clang] [libc] [clang-tools-extra] [llvm] [mlir] [libcxx] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
@@ -343,6 +347,15 @@ public: return __data_[__idx]; } +# if _LIBCPP_STD_VER >= 26 +_LIBCPP_HIDE_FROM_ABI constexpr reference at(size_type __idx) const { H-G-Hristov wrote: @mordante I am not sure what I need to do. My experience with modules

[clang] [libc] [clang-tools-extra] [llvm] [mlir] [libcxx] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/74994 >From 6e26ca239c49e1b7d9ab72217db7339e92df163f Mon Sep 17 00:00:00 2001 From: Zingam Date: Sun, 10 Dec 2023 14:16:02 +0200 Subject: [PATCH 1/7] [libc++][span] P2821R5: span.at() --- libcxx/include/span

[llvm] [clang] [RISCV] Add support for experimental Zimop extension (PR #74824)

2023-12-10 Thread Wang Pengcheng via cfe-commits
wangpc-pp wrote: > Please reorganize the patch as @dtcxzyw suggested. :-) > > I didn't notice this extension before, so I may not be asking the right > question here: These MOPs can be redefined, then, are we able to schedule > them in compiler? Becase we don't know the cost of MOPs if we don'

[llvm] [libcxx] [clang] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov edited https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [libcxx] [clang] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
@@ -343,6 +347,15 @@ public: return __data_[__idx]; } +# if _LIBCPP_STD_VER >= 26 +_LIBCPP_HIDE_FROM_ABI constexpr reference at(size_type __idx) const { + if (__idx >= size()) { +__throw_out_of_range(); + } + return *(data() + __idx); --

[llvm] [libcxx] [clang] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov edited https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-12-10 Thread via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constan

[llvm] [libcxx] [clang] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov edited https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][driver] Add -fno-fortran-main (link time) option to remove Fortran_main from link line (PR #74139)

2023-12-10 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm edited https://github.com/llvm/llvm-project/pull/74139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-12-10 Thread via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constan

[mlir] [flang] [lldb] [openmp] [clang] [libcxxabi] [compiler-rt] [llvm] [libcxx] [clang-tools-extra] [MachineCopyPropagation] When the source of PreviousCopy is undef, we cannot replace sub register (

2023-12-10 Thread via cfe-commits
DianQK wrote: @nikic Would you approve of this? Or do we need to add other codegen participants to review? @davemgreen Any other comments? https://github.com/llvm/llvm-project/pull/74682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-12-10 Thread via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constan

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-12-10 Thread via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constan

[clang] [Cygwin] Reduced number of inline elements of CallArgList. (PR #74977)

2023-12-10 Thread 徐持恒 Xu Chiheng via cfe-commits
xu-chiheng wrote: > NFC, and I have build scripts at https://github.com/xu-chiheng/Note When bootstrapping Clang on Cygwin, there are various weird problems. Reducing the size of CallArgList solve them all. https://github.com/llvm/llvm-project/pull/74977 _

[clang] [Cygwin] Cygwin macro (PR #74973)

2023-12-10 Thread 徐持恒 Xu Chiheng via cfe-commits
https://github.com/xu-chiheng edited https://github.com/llvm/llvm-project/pull/74973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Cygwin] Cygwin macro (PR #74973)

2023-12-10 Thread 徐持恒 Xu Chiheng via cfe-commits
xu-chiheng wrote: > Would you please add some tests about your changes? > > Also maybe it will be more useful to write some detailed descriptions, so > others can understand your code easily. Cheers! Does to solve any problem. https://github.com/llvm/llvm-project/pull/74973 _

[clang] [Cygwin] Cygwin macro (PR #74973)

2023-12-10 Thread 徐持恒 Xu Chiheng via cfe-commits
xu-chiheng wrote: > Would you please add some tests about your changes? > > Also maybe it will be more useful to write some detailed descriptions, so > others can understand your code easily. Cheers! To keep aligned with Cygwin GCC https://github.com/llvm/llvm-project/pull/74973

[clang] [llvm] [llvm] Add support for building on illumos (PR #74930)

2023-12-10 Thread Fangrui Song via cfe-commits
MaskRay wrote: I hope that someone using illumos can test, but if it is hard to find one I can approve this. https://github.com/llvm/llvm-project/pull/74930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [Clang][Sema] Check the number of lambda non-concept tempate parameters (PR #74885)

2023-12-10 Thread via cfe-commits
https://github.com/knightXun updated https://github.com/llvm/llvm-project/pull/74885 >From 12cc1fe332fbab94c1368ea95374d5a1289a22f8 Mon Sep 17 00:00:00 2001 From: knightXun Date: Sat, 9 Dec 2023 04:57:15 +0800 Subject: [PATCH 01/17] [Clang][Sema] Check the number of lambda non-concept tempate

[clang] 9a46518 - Revert "[clang] Remove unused variable 'ExprDependenceBits' in ASTWriterDecl.cpp (NFC)"

2023-12-10 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-11T14:15:16+08:00 New Revision: 9a46518630869e7fcb495e72378abdbedf68d40d URL: https://github.com/llvm/llvm-project/commit/9a46518630869e7fcb495e72378abdbedf68d40d DIFF: https://github.com/llvm/llvm-project/commit/9a46518630869e7fcb495e72378abdbedf68d40d.diff LO

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-10 Thread Felix via cfe-commits
@@ -2645,10 +2653,14 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForTOCEntry( const MCSymbol *Sym, const TargetMachine &TM) const { // Use TE storage-mapping class when large code model is enabled so that // the chance of needing -bbigtoc is decreased. + //

[clang] 8c33462 - Revert "[NFC] [Serialization] Packing more bits"

2023-12-10 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-11T14:06:32+08:00 New Revision: 8c334627818437180176b16b1932b2a26372d8ae URL: https://github.com/llvm/llvm-project/commit/8c334627818437180176b16b1932b2a26372d8ae DIFF: https://github.com/llvm/llvm-project/commit/8c334627818437180176b16b1932b2a26372d8ae.diff LO

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-10 Thread Felix via cfe-commits
@@ -2645,10 +2653,14 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForTOCEntry( const MCSymbol *Sym, const TargetMachine &TM) const { // Use TE storage-mapping class when large code model is enabled so that // the chance of needing -bbigtoc is decreased. + //

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-10 Thread Felix via cfe-commits
@@ -2058,6 +2089,10 @@ void PPCAIXAsmPrinter::emitLinkage(const GlobalValue *GV, } } + // Do not emit the _$TLSML symbol. + if (GVSym->getName() == "_Renamed..5f24__TLSML[TC]") orcguru wrote: Thank you! I will put some flag check before the string com

[clang-tools-extra] [compiler-rt] [llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,97 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect ca

[clang] [compiler-rt] [clang-tools-extra] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Fangrui Song via cfe-commits
@@ -1,39 +0,0 @@ -; Do setup work for all below tests: generate bitcode and combined index MaskRay wrote: Hmm, I think it is still preferred to have a test here as runtime tests are more sensitive to the environment and may be skipped by some contributors. It m

[compiler-rt] [clang] [llvm] [clang-tools-extra] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Fangrui Song via cfe-commits
@@ -41,6 +41,10 @@ namespace Intrinsic { typedef unsigned ID; } // end namespace Intrinsic +// Choose ';' as the delimiter. ':' was used once but it doesn't work well for +// Objective-C functions which commonly have :'s in their names MaskRay wrote: add a fu

[clang] [llvm] [clang-tools-extra] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Fangrui Song via cfe-commits
@@ -147,6 +147,9 @@ def exclude_unsupported_files_for_aix(dirname): config.substitutions.append( ("%clang_pgouse=", build_invocation(clang_cflags) + " -fprofile-use=") ) +config.substitutions.append( +("%clangxx_pgouse=", build_invocation(clang_cxxflags) + " -fprofile-u

[llvm] [compiler-rt] [clang] [clang-tools-extra] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,97 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect ca

[llvm] [clang-tools-extra] [compiler-rt] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,97 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect ca

[clang-tools-extra] [llvm] [compiler-rt] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,97 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect ca

[clang] [llvm] [clang-tools-extra] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [clang-tools-extra] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: Mostly looks good with some nits... https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PGO][nfc] Add `-fdiagnostics-show-profile-count` option to show real loop count from instr-profile (PR #75021)

2023-12-10 Thread Elvis Wang via cfe-commits
https://github.com/ElvisWang123 updated https://github.com/llvm/llvm-project/pull/75021 >From f15627239b333d729fe796e6bbfe9232df30a92e Mon Sep 17 00:00:00 2001 From: Elvis Wang Date: Sun, 10 Dec 2023 18:34:37 -0800 Subject: [PATCH] [PGO][nfc] Add `-fdiagnostics-show-profile-count` option to sh

[clang-tools-extra] [llvm] [compiler-rt] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Fangrui Song via cfe-commits
@@ -144,25 +145,27 @@ void GlobalObject::copyAttributesFrom(const GlobalObject *Src) { std::string GlobalValue::getGlobalIdentifier(StringRef Name, GlobalValue::LinkageTypes Linkage, Stri

[clang] [RISCV] Enable target attribute when invoked through clang driver (PR #74889)

2023-12-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/74889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-10 Thread Fangrui Song via cfe-commits
@@ -1,15 +1,15 @@ -! Test that flang-new OpenMP and OpenMP offload related +! Test that flang OpenMP and OpenMP offload related ! commands forward or expand to the appropriate commands -! for flang-new -fc1 as expected. Assumes a gfx90a, aarch64, +! for flang -fc1 as expected.

[llvm] [clang-tools-extra] [mlir] [clang] Generalize depthwise conv (PR #75017)

2023-12-10 Thread via cfe-commits
https://github.com/srcarroll edited https://github.com/llvm/llvm-project/pull/75017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-10 Thread Fangrui Song via cfe-commits
@@ -27,7 +27,7 @@ ! FULL-LTO: "-fc1" ! FULL-LTO-SAME: "-flto=full" -! THIN-LTO-ALL: flang-new: warning: the option '-flto=thin' is a work in progress +! THIN-LTO-ALL: flang-{{[0-9]+}}: warning: the option '-flto=thin' is a work in progress MaskRay wrote: Fo

[llvm] [clang-tools-extra] [mlir] [clang] Generalize depthwise conv (PR #75017)

2023-12-10 Thread via cfe-commits
https://github.com/srcarroll edited https://github.com/llvm/llvm-project/pull/75017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [mlir] [clang] Generalize depthwise conv (PR #75017)

2023-12-10 Thread via cfe-commits
https://github.com/srcarroll edited https://github.com/llvm/llvm-project/pull/75017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [mlir] [clang] Generalize depthwise conv (PR #75017)

2023-12-10 Thread via cfe-commits
https://github.com/srcarroll edited https://github.com/llvm/llvm-project/pull/75017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Check the number of lambda non-concept tempate parameters (PR #74885)

2023-12-10 Thread via cfe-commits
https://github.com/knightXun updated https://github.com/llvm/llvm-project/pull/74885 >From 12cc1fe332fbab94c1368ea95374d5a1289a22f8 Mon Sep 17 00:00:00 2001 From: knightXun Date: Sat, 9 Dec 2023 04:57:15 +0800 Subject: [PATCH 01/16] [Clang][Sema] Check the number of lambda non-concept tempate

[clang] [RISCV] Enable target attribute when invoked through clang driver (PR #74889)

2023-12-10 Thread Craig Topper via cfe-commits
topperc wrote: > > LGTM > > > > > > Related question. If there is an -mcpu on the command line and target > > attribute changes the march, do we keep the original CPU in the -target-cpu > > attribute or drop it. The reason for all those negative features from the > > driver was to make the

[clang-tools-extra] [llvm] [clang] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 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 0e1a9e3084cd8dffa5d4f2cf6eabf9e7721e1cdd 3409af09aec7f81af7e6e976a774aa945aa7f6ee --

[compiler-rt] [clang-tools-extra] [llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 0e1a9e3084cd8dffa5d4f2cf6eabf9e7721e1cdd...3409af09aec7f81af7e6e976a774aa945aa7f6ee compi

[compiler-rt] [clang-tools-extra] [llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,60 @@ +#!/bin/bash + +if [ $# -lt 1 ]; then + echo "Path to clang required!" + echo "Usage: update_thinlto_indirect_call_promotion_inputs.sh /path/to/updated/clang" + exit 1 +else + CLANG=$1 +fi + +# Allows the script to be invoked from other directories. +OUTDIR=$

[clang-tools-extra] [llvm] [clang] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Mingming Liu via cfe-commits
@@ -144,25 +145,27 @@ void GlobalObject::copyAttributesFrom(const GlobalObject *Src) { std::string GlobalValue::getGlobalIdentifier(StringRef Name, GlobalValue::LinkageTypes Linkage, Stri

[compiler-rt] [clang-tools-extra] [llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > Mach-O (and 32-bit Windows) mangle global symbols with a leading `_`. It's very helpful to know the name differences exist on Mach-O/COFF to construct a test case for issue 74565. https://godbolt.org/z/686Y9vYod shows the name difference (cross comparing IR and machine as

[clang] [DebugInfo] Fix duplicate DIFile when main file is preprocessed (PR #75022)

2023-12-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Fangrui Song (MaskRay) Changes When the main file is preprocessed and we change `MainFileName` to the original source file name (e.g. `a.i => a.c`), the source manager does not contain `a.c`, but we incorrectly associate the DIFile(

[clang] [DebugInfo] Fix duplicate DIFile when main file is preprocessed (PR #75022)

2023-12-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes When the main file is preprocessed and we change `MainFileName` to the original source file name (e.g. `a.i => a.c`), the source manager does not contain `a.c`, but we incorrectly associate the DIFile(a.c) wit

[clang] [DebugInfo] Fix duplicate DIFile when main file is preprocessed (PR #75022)

2023-12-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo Author: Fangrui Song (MaskRay) Changes When the main file is preprocessed and we change `MainFileName` to the original source file name (e.g. `a.i => a.c`), the source manager does not contain `a.c`, but we incorrectly associate the DIFile(a.c)

[clang] [DebugInfo] Fix duplicate DIFile when main file is preprocessed (PR #75022)

2023-12-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/75022 When the main file is preprocessed and we change `MainFileName` to the original source file name (e.g. `a.i => a.c`), the source manager does not contain `a.c`, but we incorrectly associate the DIFile(a.c) with md

[llvm] [clang] [RISCV] Add support for experimental Zimop extension (PR #74824)

2023-12-10 Thread Wang Pengcheng via cfe-commits
wangpc-pp wrote: Please reorginize the patch as @dtcxzyw suggested. :-) I didn't notice this extension before, so I may not be asking the right question here: These MOPs can be redefined, then, are we able to schedule them in compiler? Becase we don't know the cost of MOPs if we don't know how

[llvm] [clang] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-12-10 Thread via cfe-commits
yonghong-song wrote: Hi, @nikic, This patch caused a bpf verifier regression with one of bpf selftests. The details can be found in kernel bpf mailing list. https://lore.kernel.org/bpf/0ff5f011-7524-4550-89eb-bb2c89f69...@linux.dev/ Note that bpf verification failure here does not mean that

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

2023-12-10 Thread via cfe-commits
@@ -15,17 +15,13 @@ local: ``` There are two main drivers in Flang: h-vetinari wrote: It might be worth spending a paragraph or section explaining the historical role of `flang-new`, if only so that people understand why it's (eventually) not available anym

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

2023-12-10 Thread via cfe-commits
@@ -193,26 +190,29 @@ driver, `clang -cc1` and consists of the following classes: This list is not exhaustive and only covers the main classes that implement the driver. The main entry point for the frontend driver, `fc1_main`, is implemented in `flang/tools/flang-driver/drive

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

2023-12-10 Thread via cfe-commits
https://github.com/h-vetinari edited https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-10 Thread via cfe-commits
https://github.com/h-vetinari commented: Some drive-by comments - very happy to see this happening! https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [Clang][Sema] Check the number of lambda non-concept tempate parameters (PR #74885)

2023-12-10 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 44dc1e0baae7c4b8a02ba06dcf396d3d452aa873 a14cfc5f15fcddd4b89155c4f3f58a21c27140c4 --

[clang] [RISCV] Enable target attribute when invoked through clang driver (PR #74889)

2023-12-10 Thread Piyou Chen via cfe-commits
BeMg wrote: > LGTM > > Related question. If there is an -mcpu on the command line and target > attribute changes the march, do we keep the original CPU in the -target-cpu > attribute or drop it. The reason for all those negative features from the > driver was to make the backend not infer any

[clang] [RISCV] Enable target attribute when invoked through clang driver (PR #74889)

2023-12-10 Thread Piyou Chen via cfe-commits
https://github.com/BeMg approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/74889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Check the number of lambda non-concept tempate parameters (PR #74885)

2023-12-10 Thread via cfe-commits
https://github.com/knightXun updated https://github.com/llvm/llvm-project/pull/74885 >From 12cc1fe332fbab94c1368ea95374d5a1289a22f8 Mon Sep 17 00:00:00 2001 From: knightXun Date: Sat, 9 Dec 2023 04:57:15 +0800 Subject: [PATCH 01/15] [Clang][Sema] Check the number of lambda non-concept tempate

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [PGO][nfc] Add `-fdiagnostics-show-profile-count` option to show real loop count from instr-profile (PR #75021)

2023-12-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-llvm-ir Author: Elvis Wang (ElvisWang123) Changes The original `-fdiagnostics-show-hotness` option show the relative number of the loop count which is calculate by the `function_entry_count` and `branch_frequency`. We

[llvm] [clang] [PGO][nfc] Add `-fdiagnostics-show-profile-count` option to show real loop count from instr-profile (PR #75021)

2023-12-10 Thread Elvis Wang via cfe-commits
https://github.com/ElvisWang123 created https://github.com/llvm/llvm-project/pull/75021 The original `-fdiagnostics-show-hotness` option show the relative number of the loop count which is calculate by the `function_entry_count` and `branch_frequency`. We want to know the real loop iteration c

[clang-tools-extra] 9d3ea5a - [clangd] Initialize HighlightingsBuilder::Resolver (#74971)

2023-12-10 Thread via cfe-commits
Author: Nathan Ridge Date: 2023-12-10T22:05:51-05:00 New Revision: 9d3ea5a06abe08fa37053b825b3a1510d96bb7fb URL: https://github.com/llvm/llvm-project/commit/9d3ea5a06abe08fa37053b825b3a1510d96bb7fb DIFF: https://github.com/llvm/llvm-project/commit/9d3ea5a06abe08fa37053b825b3a1510d96bb7fb.diff

[clang-tools-extra] [clangd] Initialize HighlightingsBuilder::Resolver (PR #74971)

2023-12-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/74971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Initialize HighlightingsBuilder::Resolver (PR #74971)

2023-12-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/74971 >From 86d99f7b29a131b949b32f18ff15eb1d1f5e4d3a Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 10 Dec 2023 00:50:54 -0500 Subject: [PATCH] [clangd] Initialize HighlightingsBuilder::Resolver --- cl

[clang-tools-extra] [clang] [mlir] [llvm] Generalize depthwise conv (PR #75017)

2023-12-10 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 10951050b5f371eb3e7cacce1691c4eb2fe2eab5 1ccaf0d034d73145ddfa9e3265f856950628a7f7 --

[clang] 1095105 - [clang] Remove unused variable 'ExprDependenceBits' in ASTWriterDecl.cpp (NFC)

2023-12-10 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2023-12-11T10:45:56+08:00 New Revision: 10951050b5f371eb3e7cacce1691c4eb2fe2eab5 URL: https://github.com/llvm/llvm-project/commit/10951050b5f371eb3e7cacce1691c4eb2fe2eab5 DIFF: https://github.com/llvm/llvm-project/commit/10951050b5f371eb3e7cacce1691c4eb2fe2eab5.diff LOG: [

[clang] 9406ea3 - [NFC] [Serialization] Packing more bits

2023-12-10 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-11T10:18:12+08:00 New Revision: 9406ea3fe32e59a7d28de0dcbd0317b4cdfa4c62 URL: https://github.com/llvm/llvm-project/commit/9406ea3fe32e59a7d28de0dcbd0317b4cdfa4c62 DIFF: https://github.com/llvm/llvm-project/commit/9406ea3fe32e59a7d28de0dcbd0317b4cdfa4c62.diff LO

[llvm] [clang] [NFC][InstrProf] Refactor InstrProfiling lowering pass (PR #74970)

2023-12-10 Thread Mircea Trofin via cfe-commits
https://github.com/mtrofin closed https://github.com/llvm/llvm-project/pull/74970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1d608fc - [NFC][InstrProf] Refactor InstrProfiling lowering pass (#74970)

2023-12-10 Thread via cfe-commits
Author: Mircea Trofin Date: 2023-12-10T18:03:08-08:00 New Revision: 1d608fc755a3e15d0020f61c9535c9b730ab9dec URL: https://github.com/llvm/llvm-project/commit/1d608fc755a3e15d0020f61c9535c9b730ab9dec DIFF: https://github.com/llvm/llvm-project/commit/1d608fc755a3e15d0020f61c9535c9b730ab9dec.diff

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-12-10 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall ping! https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Check the number of lambda non-concept tempate parameters (PR #74885)

2023-12-10 Thread via cfe-commits
knightXun wrote: > This needs at least one test and a Release note. > > I expect the code form the issue to be well-formed: > https://godbolt.org/z/bhdfG34xc > > So I am curious why you are adding the diagnostic for? thanks for the hit! https://github.com/llvm/llvm-project/pull/74885 __

[clang] [llvm] [NFC][InstrProf] Refactor InstrProfiling lowering pass (PR #74970)

2023-12-10 Thread Mircea Trofin via cfe-commits
https://github.com/mtrofin updated https://github.com/llvm/llvm-project/pull/74970 >From 90893a3b3f71524947cb041b2a25d0a02a8956d7 Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Sat, 9 Dec 2023 21:24:35 -0800 Subject: [PATCH 1/2] [NFC][InstrProf] Refactor InstrProfiling lowering pass Akin o

[clang] [Clang][LoongArch] Comply with the lp64d ABI to pass vector arguments (PR #74990)

2023-12-10 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. https://github.com/llvm/llvm-project/pull/74990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][InstrProf] Refactor InstrProfiling lowering pass (PR #74970)

2023-12-10 Thread Mircea Trofin via cfe-commits
@@ -31,31 +31,45 @@ using LoadStorePair = std::pair; /// Instrumentation based profiling lowering pass. This pass lowers /// the profile instrumented code generated by FE or the IR based /// instrumentation pass. -class InstrProfiling : public PassInfoMixin { +class InstrProfil

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
XDeme wrote: One thing that I checked only now, is that with clang-format 16.0.6 and 17.0.6, it formats correctly. But with `clang-format version 18.0.0 (https://github.com/llvm/llvm-project.git a6c02edd6eac476523b5c73f29619a7a9e054872)` is doens't anymore, so this is a regression introduced r

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
@@ -583,20 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { return true; } - // If the return type spans multiple lines, wrap before the function name. - if (((Current.is(TT_FunctionDeclarationName) && -!State.Line->ReturnTypeWrapped

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
@@ -26465,6 +26451,21 @@ TEST_F(FormatTest, BreakAfterAttributes) { "{\n" "}", CtorDtorCode, Style); + + Style.BreakBeforeBraces = FormatStyle::BS_Attach; + Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left;

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
@@ -583,21 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { return true; } - // If the return type spans multiple lines, wrap before the function name. - if (((Current.is(TT_FunctionDeclarationName) && -!State.Line->ReturnTypeWrapped

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/74943 >From b80f8579dbc745ddfaa3d60770dd0d3e79e6c641 Mon Sep 17 00:00:00 2001 From: XDeme Date: Sat, 9 Dec 2023 14:31:12 -0300 Subject: [PATCH 1/7] Fixes overload operator in BreakAfterAttributes --- clang/lib/Format/Co

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
@@ -583,20 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { return true; } - // If the return type spans multiple lines, wrap before the function name. - if (((Current.is(TT_FunctionDeclarationName) && -!State.Line->ReturnTypeWrapped

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/70024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,143 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +#include +#include +#include +#include + +__attribute__((__format__ (__scanf__, 1, 4))) +void f1(char *out, const size_t len, const char *format, ... /* args */) +{ +va_list args;

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,132 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +#include +#include + +void f1(const std::string &str, ... /* args */) +{ +va_list args; +vscanf(str.c_str(), args); // no warning +vprintf(str.c_str(), args); // no warning +

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

  1   2   >