[libunwind] MIPS/libunwind: Use -mfp64 if compiler is FPXX (PR #68521)

2023-11-11 Thread Brad Smith via cfe-commits
brad0 wrote: Probably not the best person to ask. Let's see what MaskRay says. @MaskRay https://github.com/llvm/llvm-project/pull/68521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [clang-format] Handle control statements in BreakAfterAttributes (PR #71995)

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

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/70845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Yingwei Zheng via cfe-commits
@@ -0,0 +1,145 @@ +; RUN: opt < %s --O3 -S | FileCheck %s dtcxzyw wrote: Could you please: 1. Convert this IR into SSA form as @nikic mentioned. 2. Drop unused attributes. 3. Re-generate tests with `llvm/utils/update_test_checks.py`. https://github.com/llvm/llv

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Yingwei Zheng via cfe-commits
@@ -0,0 +1,145 @@ +; RUN: opt < %s --O3 -S | FileCheck %s dtcxzyw wrote: ```suggestion ; RUN: opt < %s -O3 -S | FileCheck %s ``` https://github.com/llvm/llvm-project/pull/70845 ___ cfe-commits mailing list cfe-commits@

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw requested changes to this pull request. https://github.com/llvm/llvm-project/pull/70845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-11 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/71452 >From 970bf07d0b184c7ec356ae8f47b193a5e3ff0309 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Mon, 6 Nov 2023 23:20:31 +0100 Subject: [PATCH] [clang][CodeGen] Ensure consistent `mustprogress` att

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Yingwei Zheng via cfe-commits
@@ -0,0 +1,145 @@ +; RUN: opt < %s --O3 -S | FileCheck %s dtcxzyw wrote: ``` define i16 @vecreduce_smin_v2i16(i32 %n, ptr %v) { entry: br label %for.cond for.cond: %p.0 = phi i16 [ 0, %entry ], [ %conv8, %for.inc ] %i.0 = phi i32 [ 0, %entry ], [ %inc, %fo

[clang] 970bf07 - [clang][CodeGen] Ensure consistent `mustprogress` attribute emission

2023-11-11 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2023-11-11T09:43:03+01:00 New Revision: 970bf07d0b184c7ec356ae8f47b193a5e3ff0309 URL: https://github.com/llvm/llvm-project/commit/970bf07d0b184c7ec356ae8f47b193a5e3ff0309 DIFF: https://github.com/llvm/llvm-project/commit/970bf07d0b184c7ec356ae8f47b193a5e3ff0309.d

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-11 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto closed https://github.com/llvm/llvm-project/pull/71452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Nikita Popov via cfe-commits
@@ -247,6 +355,19 @@ define i1 @sext_zext_uge_op0_wide(i16 %x, i8 %y) { ret i1 %c } + +define i1 @sext_zext_nneg_uge_op0_wide(i16 %x, i8 %y) { +; CHECK-LABEL: @sext_zext_nneg_uge_op0_wide( +; CHECK-NEXT:[[TMP1:%.*]] = sext i8 [[Y:%.*]] to i16 +; CHECK-NEXT:[[C:%.*]]

[llvm] [clang-tools-extra] [clang] [RISCV] Eliminate dead li after emitting VSETVLIs (PR #65934)

2023-11-11 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > Oh nice, I'm running into something similar in #71657. Are all these dead > ADDIs coming from the backwards local postpass? Yes. I believe this PR can address the issue. https://github.com/llvm/llvm-project/pull/65934 ___ cfe-commits

[clang-tools-extra] d867f66 - [clang-tidy] modernize-avoid-bind: Fix handling of operators

2023-11-11 Thread Piotr Zegar via cfe-commits
Author: Joachim Priesner Date: 2023-11-11T09:56:33Z New Revision: d867f668672d634d52eaeae4cdcb7f9740890082 URL: https://github.com/llvm/llvm-project/commit/d867f668672d634d52eaeae4cdcb7f9740890082 DIFF: https://github.com/llvm/llvm-project/commit/d867f668672d634d52eaeae4cdcb7f9740890082.diff L

[clang-tools-extra] 9311d12 - [clang-tidy][DOC] Add release notes for modernize-avoid-bind

2023-11-11 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-11-11T09:56:33Z New Revision: 9311d12281c33e0ab8fc19ec956bdb7e13e59303 URL: https://github.com/llvm/llvm-project/commit/9311d12281c33e0ab8fc19ec956bdb7e13e59303 DIFF: https://github.com/llvm/llvm-project/commit/9311d12281c33e0ab8fc19ec956bdb7e13e59303.diff LOG: [

[clang-tools-extra] 0e55fef - [clang-tidy] Tweak diag ranges for bugprone-sizeof-expression

2023-11-11 Thread Piotr Zegar via cfe-commits
Author: Nathan James Date: 2023-11-11T09:56:33Z New Revision: 0e55fef0e98ff5fc6898f3eda43e02143dbe0748 URL: https://github.com/llvm/llvm-project/commit/0e55fef0e98ff5fc6898f3eda43e02143dbe0748 DIFF: https://github.com/llvm/llvm-project/commit/0e55fef0e98ff5fc6898f3eda43e02143dbe0748.diff LOG:

[PATCH] D125949: [clang-tidy] modernize-avoid-bind: Fix crash when method name is not a simple identifier

2023-11-11 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd867f668672d: [clang-tidy] modernize-avoid-bind: Fix handling of operators (authored by jspam, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[clang-tools-extra] bbb7cb8 - [clang-tidy][DOC] Add relase notes for bugprone-sizeof-expression

2023-11-11 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-11-11T09:56:33Z New Revision: bbb7cb80598de12347204aefa4fe6146512ad4a1 URL: https://github.com/llvm/llvm-project/commit/bbb7cb80598de12347204aefa4fe6146512ad4a1 DIFF: https://github.com/llvm/llvm-project/commit/bbb7cb80598de12347204aefa4fe6146512ad4a1.diff LOG: [

[PATCH] D101617: [clang-tidy] Tweak diag ranges for bugprone-sizeof-expression

2023-11-11 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0e55fef0e98f: [clang-tidy] Tweak diag ranges for bugprone-sizeof-expression (authored by njames93, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[clang] [clang-format] Handle control statements in BreakAfterAttributes (PR #71995)

2023-11-11 Thread Owen Pan via cfe-commits
@@ -1432,34 +1432,82 @@ struct FormatStyle { /// const int i; /// [[gnu::const]] [[maybe_unused]] /// int j; +/// /// [[nodiscard]] /// inline int f(); /// [[gnu::const]] [[nodiscard]] /// int g(); +/// +/// [[likely]]

[clang] [clang-format] Handle control statements in BreakAfterAttributes (PR #71995)

2023-11-11 Thread Owen Pan via cfe-commits
@@ -2049,8 +2049,10 @@ the configuration (without a prefix: ``Auto``). .. _BreakAfterAttributes: **BreakAfterAttributes** (``AttributeBreakingStyle``) :versionbadge:`clang-format 16` :ref:`¶ ` - Break after a group of C++11 attributes before a variable/function - (including

[clang] [clang-format] Handle control statements in BreakAfterAttributes (PR #71995)

2023-11-11 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/71995 >From b67ea36d180e700cc6b0661e8f2390eda515c566 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 10 Nov 2023 00:21:58 -0800 Subject: [PATCH 1/2] [clang-format] Handle control statements in BreakAfterAttributes

[clang] [clang] Fixes compile error that double colon operator cannot resolve macro with parentheses. (PR #68618)

2023-11-11 Thread Yonggang Luo via cfe-commits
https://github.com/lygstate updated https://github.com/llvm/llvm-project/pull/68618 >From 63c1f1b8970acf1720838a511f930407100770bb Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Tue, 10 Oct 2023 02:23:34 +0800 Subject: [PATCH] [clang] Fixes compile error that double colon operator cannot re

[clang] 4effdc4 - [clang][CodeGen] Regenerate `wasm-eh.cpp` test (NFC)

2023-11-11 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2023-11-11T11:59:59+01:00 New Revision: 4effdc47947b9260a1540ee7d8b699b077cbedb5 URL: https://github.com/llvm/llvm-project/commit/4effdc47947b9260a1540ee7d8b699b077cbedb5 DIFF: https://github.com/llvm/llvm-project/commit/4effdc47947b9260a1540ee7d8b699b077cbedb5.d

[PATCH] D158657: [clang-tidy] Fix false-positives in misc-static-assert caused by non-constexpr variables

2023-11-11 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158657/new/ https://reviews.llvm.org/D158657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D144429: [clang-tidy] Add bugprone-chained-comparison check

2023-11-11 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144429/new/ https://reviews.llvm.org/D144429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)

2023-11-11 Thread J.C. Moyer via cfe-commits
https://github.com/jcmoyer updated https://github.com/llvm/llvm-project/pull/71385 >From f8282b227e296a4662812c933999f0bf90982748 Mon Sep 17 00:00:00 2001 From: "J.C. Moyer" Date: Sun, 5 Nov 2023 17:21:32 -0500 Subject: [PATCH] [clang-tidy] Improve alternate snake case warnings Improves the ac

[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)

2023-11-11 Thread J.C. Moyer via cfe-commits
jcmoyer wrote: Rebased to resolve merge conflict. https://github.com/llvm/llvm-project/pull/71385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Replace uses of CreatePointerBitCastOrAddrSpaceCast (NFC) (PR #68277)

2023-11-11 Thread Youngsuk Kim via cfe-commits
@@ -1123,9 +1123,7 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, if (!CurFnInfo->getReturnInfo().getIndirectByVal()) { ReturnValuePointer = CreateDefaultAlignTempAlloca(Int8PtrTy, "result.ptr"); - Builder.CreateStore(Builder.Cre

[clang] [llvm] [clang] Replace uses of CreatePointerBitCastOrAddrSpaceCast (NFC) (PR #68277)

2023-11-11 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/68277 >From 2c3fb032e7fdefa553ed4833bbeed8852eb6a410 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Mon, 2 Oct 2023 12:28:33 -0400 Subject: [PATCH 1/4] [clang] Replace uses of CreatePointerBitCastOrAddrSpaceCast (N

[clang] [llvm] [AArch64] Stack probing for function prologues (PR #66524)

2023-11-11 Thread Momchil Velikov via cfe-commits
momchil-velikov wrote: I'm going to squash the commits which belong to this PR as I don't believe they are useful in isolation anymore and they get in the way of refactoring/rebasing. (Long story short, I did a patch to avoid having two back to back probing loops, then factored out a stack pr

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-11 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin Gentle ping! https://github.com/llvm/llvm-project/pull/69734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-11 Thread Timm Baeder via cfe-commits
@@ -17219,10 +17219,10 @@ static bool UsefulToPrintExpr(const Expr *E) { if (const auto *UnaryOp = dyn_cast(E)) return UsefulToPrintExpr(UnaryOp->getSubExpr()); - // Ignore nested binary operators. This could be a FIXME for improvements - // to the diagnostics in the f

[clang] [llvm] [clang] Replace uses of CreatePointerBitCastOrAddrSpaceCast (NFC) (PR #68277)

2023-11-11 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/68277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5c91b28 - [clang] Replace uses of CreatePointerBitCastOrAddrSpaceCast (NFC) (#68277)

2023-11-11 Thread via cfe-commits
Author: Youngsuk Kim Date: 2023-11-11T10:57:44-05:00 New Revision: 5c91b2886f6bf400b60ca7839069839ac3980f8f URL: https://github.com/llvm/llvm-project/commit/5c91b2886f6bf400b60ca7839069839ac3980f8f DIFF: https://github.com/llvm/llvm-project/commit/5c91b2886f6bf400b60ca7839069839ac3980f8f.diff

[clang] [llvm] [clang][AArch64] Pass down stack clash protection options to LLVM/Backend (PR #68993)

2023-11-11 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/68993 >From bfd551c181b8325382247eab80544e69212121aa Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Sat, 11 Nov 2023 11:41:48 + Subject: [PATCH 1/6] [AArch64] Refactor allocation of locals and stack

[clang] [Clang] Correct handling of negative and out-of-bounds indices (PR #71877)

2023-11-11 Thread Bill Wendling via cfe-commits
bwendling wrote: /sub @rapidsna https://github.com/llvm/llvm-project/pull/71877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Léonard Oest O'Leary via cfe-commits
@@ -247,6 +355,19 @@ define i1 @sext_zext_uge_op0_wide(i16 %x, i8 %y) { ret i1 %c } + +define i1 @sext_zext_nneg_uge_op0_wide(i16 %x, i8 %y) { +; CHECK-LABEL: @sext_zext_nneg_uge_op0_wide( +; CHECK-NEXT:[[TMP1:%.*]] = sext i8 [[Y:%.*]] to i16 +; CHECK-NEXT:[[C:%.*]]

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Léonard Oest O'Leary via cfe-commits
@@ -0,0 +1,145 @@ +; RUN: opt < %s --O3 -S | FileCheck %s leo-ard wrote: How did you get the SSA form ? I wasn't able to do it on my side. Here are the commands that I did : ```bash > build_release/bin/clang -S -emit-llvm min_max.c -fno-discard-value-names -o

Re: [clang] cd7ba9f - [Clang] Generate test checks (NFC)

2023-11-11 Thread Shoaib Meenai via cfe-commits
This is breaking tests when building without assertions enabled, e.g. https://lab.llvm.org/buildbot/#/builders/67/builds/13266/steps/7/logs/stdio, I think because the initial entry: label isn’t generated in such builds. Could you please take a look? From: cfe-commits on behalf of Nikita Popov

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,145 @@ +; RUN: opt < %s --O3 -S | FileCheck %s nikic wrote: You need to use `-O2 -Xclang -disable-llvm-optzns`, or manually drop the `optnone` attributes. https://github.com/llvm/llvm-project/pull/70845 ___

[llvm] [clang] [clang][AArch64] Pass down stack clash protection options to LLVM/Backend (PR #68993)

2023-11-11 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/68993 >From c55da9c253829610418e5fb22e2b0ecc3f1585b7 Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Sat, 11 Nov 2023 15:27:53 + Subject: [PATCH 1/6] [CFIFixup] Precommit test ahead of multi-block prol

[clang] [llvm] [clang-tools-extra] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-11-11 Thread Nikita Popov via cfe-commits
nikic wrote: Your original example does not verify: https://alive2.llvm.org/ce/z/Bkd89Z Can you please provide a correct example of what you're trying to do? https://github.com/llvm/llvm-project/pull/68502 ___ cfe-commits mailing list cfe-commits@list

[clang] [llvm] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Léonard Oest O'Leary via cfe-commits
https://github.com/leo-ard updated https://github.com/llvm/llvm-project/pull/70845 From 00d0c18b5414ffe7222e1ee0ad5ecfdb8783704e Mon Sep 17 00:00:00 2001 From: leo-ard Date: Mon, 30 Oct 2023 18:01:27 -0400 Subject: [PATCH 01/14] Add NonNeg check for InstCombine --- llvm/lib/Transforms/InstCom

[clang] [llvm] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Léonard Oest O'Leary via cfe-commits
@@ -0,0 +1,112 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3 +; RUN: opt < %s -O3 -S | FileCheck %s +; See issue #55013 and PR #70845 for more details. +; This test comes from the following C program, compiled with clang +; +;

[clang] [llvm] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Léonard Oest O'Leary via cfe-commits
https://github.com/leo-ard edited https://github.com/llvm/llvm-project/pull/70845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Léonard Oest O'Leary via cfe-commits
https://github.com/leo-ard updated https://github.com/llvm/llvm-project/pull/70845 From 00d0c18b5414ffe7222e1ee0ad5ecfdb8783704e Mon Sep 17 00:00:00 2001 From: leo-ard Date: Mon, 30 Oct 2023 18:01:27 -0400 Subject: [PATCH 01/15] Add NonNeg check for InstCombine --- llvm/lib/Transforms/InstCom

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Yingwei Zheng via cfe-commits
@@ -0,0 +1,112 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3 +; RUN: opt < %s -O3 -S | FileCheck %s +; See issue #55013 and PR #70845 for more details. +; This test comes from the following C program, compiled with clang +; +;

[llvm] [clang] [Verifier] Check function attributes related to branch protection (NFC) (PR #70565)

2023-11-11 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/70565 >From 0fb3e4e96d9377e65d1c794fe0b648ff835748b9 Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Sat, 28 Oct 2023 15:01:36 +0100 Subject: [PATCH 1/4] [Verifier] Check function attributes related to bra

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/70845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Yingwei Zheng via cfe-commits
@@ -0,0 +1,111 @@ +; RUN: opt < %s -O3 -S | FileCheck %s +; See issue #55013 and PR #70845 for more details. +; This test comes from the following C program, compiled with clang +; +;; short vecreduce_smin_v2i16(int n, short* v) +;; { +;; short p = 0; +;; for (int i = 0; i < n

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw commented: LGTM https://github.com/llvm/llvm-project/pull/70845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Verifier] Check function attributes related to branch protection (NFC) (PR #70565)

2023-11-11 Thread Momchil Velikov via cfe-commits
momchil-velikov wrote: Ping? https://github.com/llvm/llvm-project/pull/70565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Yingwei Zheng via cfe-commits
@@ -0,0 +1,145 @@ +; RUN: opt < %s --O3 -S | FileCheck %s dtcxzyw wrote: My command: `bin/opt -S -O3 -print-changed min_max.ll` Then I got IR after the SROA pass :) https://github.com/llvm/llvm-project/pull/70845 ___

[llvm] [clang] [clang] Add bitint classification for __builtin_classify_type (PR #72036)

2023-11-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/72036 See #71911 >From 20ec7adfd769b10b74f5104ee308fd9b58b44208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 11 Nov 2023 18:44:13 +0100 Subject: [PATCH] [clang] Add bitint classification fo

[llvm] [clang] [clang] Add bitint classification for __builtin_classify_type (PR #72036)

2023-11-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes See #71911 --- Full diff: https://github.com/llvm/llvm-project/pull/72036.diff 4 Files Affected: - (modified) clang/lib/AST/ExprConstant.cpp (+7-1) - (modified) clang/test/Sema/builtin-classify-type.c (+4

[clang-tools-extra] [clang-tidy] Fix macros handling in cppcoreguidelines-prefer-member-initializer (PR #72037)

2023-11-11 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/72037 Produces now valid fixes for a member variables initialized with macros. Correctly uses expansion location instead of location inside macro to get init code. Close #70189 >From 4b47913beaecf4f22354b423bbe3441

[clang-tools-extra] [clang-tidy] Fix macros handling in cppcoreguidelines-prefer-member-initializer (PR #72037)

2023-11-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes Produces now valid fixes for a member variables initialized with macros. Correctly uses expansion location instead of location inside macro to get init code. Close #70189 --- Full diff: https://github

[lldb] [clang] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

2023-11-11 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/71780 >From e5bc858c35b479d29174c9945c6c67f4d2dc085b Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 9 Nov 2023 01:13:21 + Subject: [PATCH 1/5] Reland "[clang][DebugInfo] Emit global variable definitions

[clang] [llvm] [clang] Add bitint classification for __builtin_classify_type (PR #72036)

2023-11-11 Thread via cfe-commits
@@ -1060,7 +1060,7 @@ if (UNIX AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9 - append("-fdiagnostics-color" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + append("-fdiagnostics-col

[clang] [llvm] [clang] Add bitint classification for __builtin_classify_type (PR #72036)

2023-11-11 Thread via cfe-commits
https://github.com/cor3ntin commented: Can you add a release note? otherwise this looks good https://github.com/llvm/llvm-project/pull/72036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-11 Thread via cfe-commits
cor3ntin wrote: @AMP999 Sorry, I'm in a committee meeting this week. tests look good. it's still missing a release note though https://github.com/llvm/llvm-project/pull/69734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] e70d2a4 - [Clang] Add the list of papers approved in Kona

2023-11-11 Thread Corentin Jabot via cfe-commits
Author: Corentin Jabot Date: 2023-11-11T09:03:49-10:00 New Revision: e70d2a45ea00241035143394be28604390341f0e URL: https://github.com/llvm/llvm-project/commit/e70d2a45ea00241035143394be28604390341f0e DIFF: https://github.com/llvm/llvm-project/commit/e70d2a45ea00241035143394be28604390341f0e.diff

[clang] [lldb] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

2023-11-11 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/71780 >From e5bc858c35b479d29174c9945c6c67f4d2dc085b Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 9 Nov 2023 01:13:21 + Subject: [PATCH 1/6] Reland "[clang][DebugInfo] Emit global variable definitions

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Léonard Oest O'Leary via cfe-commits
https://github.com/leo-ard updated https://github.com/llvm/llvm-project/pull/70845 From 00d0c18b5414ffe7222e1ee0ad5ecfdb8783704e Mon Sep 17 00:00:00 2001 From: leo-ard Date: Mon, 30 Oct 2023 18:01:27 -0400 Subject: [PATCH 01/16] Add NonNeg check for InstCombine --- llvm/lib/Transforms/InstCom

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Léonard Oest O'Leary via cfe-commits
@@ -0,0 +1,111 @@ +; RUN: opt < %s -O3 -S | FileCheck %s +; See issue #55013 and PR #70845 for more details. +; This test comes from the following C program, compiled with clang +; +;; short vecreduce_smin_v2i16(int n, short* v) +;; { +;; short p = 0; +;; for (int i = 0; i < n

[clang] [llvm] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/70845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Use zext's nneg flag for icmp folding (PR #70845)

2023-11-11 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/70845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] Fix #41439: Update the documentation with the correct information. (PR #69377)

2023-11-11 Thread via cfe-commits
https://github.com/Da-Viper updated https://github.com/llvm/llvm-project/pull/69377 >From 0e0a3e7ad1a0a7098e05a5164413369eaa58c55b Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Tue, 17 Oct 2023 20:49:47 +0100 Subject: [PATCH 1/2] Fix #41439: Update the documentation with the correct informa

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-11 Thread via cfe-commits
https://github.com/tomekpaszek updated https://github.com/llvm/llvm-project/pull/70338 >From 46a2ad3fd19697ab8b92b7de061346b1471a8eed Mon Sep 17 00:00:00 2001 From: Tomek Paszek Date: Sat, 11 Nov 2023 19:38:00 +0100 Subject: [PATCH 1/3] Added an option to ignore macro definitions. --- clang/i

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-11 Thread via cfe-commits
@@ -4648,6 +4648,10 @@ struct FormatStyle { /// \version 11 std::vector WhitespaceSensitiveMacros; + /// Ignore formatting in preprocessor definitions. + /// \version 18 + bool IgnorePPDefinitions; tomekpaszek wrote: fixed https://github.com/llvm/llvm

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-11 Thread via cfe-commits
@@ -1354,7 +1354,9 @@ unsigned UnwrappedLineFormatter::format( bool FixIndentation = (FixBadIndentation || ContinueFormatting) && Indent != TheLine.First->OriginalColumn; -bool ShouldFormat = TheLine.Affected || FixIndentation; +bool Shoul

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-11 Thread via cfe-commits
@@ -24153,6 +24153,23 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { tomekpaszek wrote: added more tests now https://github.com/llvm/

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-11 Thread via cfe-commits
@@ -24153,6 +24153,23 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + + ve

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-11 Thread via cfe-commits
https://github.com/tomekpaszek updated https://github.com/llvm/llvm-project/pull/70338 >From cfe5937f53b549fdfbd6e4845a2d0ab91226cad3 Mon Sep 17 00:00:00 2001 From: Tomek Paszek Date: Sat, 11 Nov 2023 19:38:00 +0100 Subject: [PATCH 1/3] Added an option to ignore macro definitions. --- clang/i

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-11 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: Thank you! No problem! I'll add the release notes. https://github.com/llvm/llvm-project/pull/69734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Remove special handling of comments after brace/paren (PR #71672)

2023-11-11 Thread Owen Pan via cfe-commits
@@ -802,7 +802,10 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, Previous.isNot(TT_ObjCMethodExpr) && Previous.isNot(TT_RequiresClause) && !(Current.MacroParent && Previous.MacroParent) && (Current.isNot(TT_LineComment) ||

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel created https://github.com/llvm/llvm-project/pull/72040 libunwind already puts logging facilities behind macros so that they can be turned on and off. The one place where this isn't done yet is for debug output tracing DWARF evaluation. The code there directly

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Michael Kenzel (michael-kenzel) Changes libunwind already puts logging facilities behind macros so that they can be turned on and off. The one place where this isn't done yet is for debug output tracing DWARF evaluation. The code ther

[clang] f7a759d - [StaticAnalyzer] Stop including llvm/ADT/ImmutableMap.h (NFC)

2023-11-11 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-11-11T13:36:08-08:00 New Revision: f7a759d1b7b8830c3c70802a1e0cc84ae6e12ef6 URL: https://github.com/llvm/llvm-project/commit/f7a759d1b7b8830c3c70802a1e0cc84ae6e12ef6 DIFF: https://github.com/llvm/llvm-project/commit/f7a759d1b7b8830c3c70802a1e0cc84ae6e12ef6.diff L

[llvm] [clang-tools-extra] [clang] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-11 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli updated https://github.com/llvm/llvm-project/pull/68176 >From f792a030ac1761a96176332fea906cd2d1826c7b Mon Sep 17 00:00:00 2001 From: justinfargnoli Date: Sat, 12 Aug 2023 10:58:45 -0700 Subject: [PATCH 01/31] Add IRCanonicalizer.cpp --- llvm/lib/Transforms/U

[clang] [clang] Enable --gcc-install-dir for RISCV baremetal toolchains (PR #71803)

2023-11-11 Thread Fangrui Song via cfe-commits
MaskRay wrote: Thanks for the pointer. However, the description doesn't appear to have sufficient information to justify the `--gcc-toolchain=` dependent decision. A toolchain should be selected completely from the target triple. I think `RISCVToolChain` should be adjusted to either select a d

[PATCH] D33531: Clang-tidy readability: avoid const value return

2023-11-11 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL abandoned this revision. PiotrZSL marked 4 inline comments as done. PiotrZSL added a comment. Obsolete, this check is already added. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D33531/new/ https://reviews.llvm.org/D33531

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. I'm happy with this as is but I'd wait for at least one other positive review before merging. https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llv

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Alexander Richardson via cfe-commits
@@ -223,6 +223,21 @@ } while (0) #endif +#define _LIBUNWIND_TRACING_DWARF_EVAL (0) arichardson wrote: Maybe it would be best to follow the same pattern as above and allow turning it on for debug builds? But seeing as it's always been hardcoded to false,

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
@@ -223,6 +223,21 @@ } while (0) #endif +#define _LIBUNWIND_TRACING_DWARF_EVAL (0) michael-kenzel wrote: Yeah, I figured if anyone ever actually needed to turn this on for debug builds in general, they'd have added that option. It seemed to me like this

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2023-11-11 Thread Robin Caloudis via cfe-commits
robincaloudis wrote: Ping https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
@@ -223,6 +223,21 @@ } while (0) #endif +#define _LIBUNWIND_TRACING_DWARF_EVAL (0) michael-kenzel wrote: In fact, since this is more some kind of internal feature, maybe it shouldn't be in the config header at all but rather just defined and undef'ed aga

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [clang] [llvm] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel updated https://github.com/llvm/llvm-project/pull/72040 >From 85eb8a3f5accfdb8c90b8e45a7ff0f7480e648ce Mon Sep 17 00:00:00 2001 From: Michael Kenzel Date: Sat, 11 Nov 2023 22:09:05 +0100 Subject: [PATCH] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL --- l

  1   2   >