[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-29 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: vgvassilev wrote: Can we create some text fixture that will do that automatically for us and reduce this copy-paste? https://github.com/llvm/llvm-project/pull/84758 _

[clang] [llvm] [PowerPC] Diagnose musttail instead of crash inside backend (PR #93267)

2024-05-29 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 updated https://github.com/llvm/llvm-project/pull/93267 >From 17505893b2b48969512e3c2e8433a6446429f65e Mon Sep 17 00:00:00 2001 From: Chen Zheng Date: Thu, 23 May 2024 22:59:48 -0400 Subject: [PATCH 1/2] [PowerPC] Diagnose musttail instead of crash inside backe

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-29 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @mysterymath, @jasonmolenda, ping -- I am still stuck in reproducing this issue. https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-29 Thread via cfe-commits
https://github.com/Discookie updated https://github.com/llvm/llvm-project/pull/91951 >From 69cbd3da19eb0f8eb6758782b46daf99b5b79ea4 Mon Sep 17 00:00:00 2001 From: Viktor Date: Mon, 6 May 2024 06:11:58 + Subject: [PATCH 01/11] Add `bugprone-virtual-arithmetic` check Finds pointer arithmetic

[clang] [llvm] [PowerPC] Diagnose musttail instead of crash inside backend (PR #93267)

2024-05-29 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 updated https://github.com/llvm/llvm-project/pull/93267 >From 17505893b2b48969512e3c2e8433a6446429f65e Mon Sep 17 00:00:00 2001 From: Chen Zheng Date: Thu, 23 May 2024 22:59:48 -0400 Subject: [PATCH 1/2] [PowerPC] Diagnose musttail instead of crash inside backe

[clang] [llvm] [PowerPC] Diagnose musttail instead of crash inside backend (PR #93267)

2024-05-29 Thread Chen Zheng via cfe-commits
chenzheng1030 wrote: Patch updated... https://github.com/llvm/llvm-project/pull/93267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-29 Thread via cfe-commits
https://github.com/Discookie edited https://github.com/llvm/llvm-project/pull/91951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,30 @@ +//===--- VirtualArithmeticCheck.h - clang-tidy---*- 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: Apa

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,49 @@ +//===--- VirtualArithmeticCheck.cpp - clang-tidy---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-29 Thread via cfe-commits
https://github.com/Discookie commented: Renamed the check as requested, and fixed what I reasonably could regarding the rest. Added the check option `MatchInheritedVirtualFunctions` to differentiate between inherited and newly-declared virtual functions. Inherited has many more false positive

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %check_clang_tidy %s bugprone-virtual-arithmetic %t + +class Base { +public: + virtual ~Base() {} +}; + +class Derived : public Base {}; + +void operators() { + Base *b = new Derived[10]; + + b += 1; + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: poi

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,49 @@ +//===--- VirtualArithmeticCheck.cpp - clang-tidy---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %check_clang_tidy %s bugprone-virtual-arithmetic %t + +class Base { +public: + virtual ~Base() {} +}; + +class Derived : public Base {}; + +void operators() { + Base *b = new Derived[10]; + + b += 1; + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: poi

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,49 @@ +//===--- VirtualArithmeticCheck.cpp - clang-tidy---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,31 @@ +//===--- PointerArithmeticOnPolymorphicObjectCheck.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: Apa

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,30 @@ +//===--- VirtualArithmeticCheck.h - clang-tidy---*- 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: Apa

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,50 @@ +.. title:: clang-tidy - bugprone-virtual-arithmetic + +bugprone-virtual-arithmetic +=== + +Warn if pointer arithmetic is performed on a class that declares a +virtual function. + +Pointer arithmetic on polymorphic objects where the pointer

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,49 @@ +//===--- VirtualArithmeticCheck.cpp - clang-tidy---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-05-29 Thread via cfe-commits
https://github.com/Discookie edited https://github.com/llvm/llvm-project/pull/91951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a regression in annotating class decl braces (PR #93657)

2024-05-29 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/93657 Fixes #93604. >From e853b7d6f13c152bfe57cec28a75507422f52edb Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 29 May 2024 00:49:10 -0700 Subject: [PATCH] [clang-format] Fix a regression in annotating class decl

[clang] [clang-format] Fix a regression in annotating class decl braces (PR #93657)

2024-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #93604. --- Full diff: https://github.com/llvm/llvm-project/pull/93657.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+3) - (modified) clang/unittests/Format/TokenAn

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-29 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Oh indeed, it seems we can decide to skip tests in `SetUp()` ``` class FooTest : public ::testing:Test { protected: void SetUp() { GTEST_SKIP(); } }; ``` https://github.com/llvm/llvm-project/pull/84758 ___ cfe

[clang] [clang-format] Fix a regression in annotating class decl braces (PR #93657)

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

[clang] [clang-format] add an option to insert a space only for non-code block empty braces, not for empty parentheses (PR #93634)

2024-05-29 Thread via cfe-commits
@@ -6237,18 +6237,30 @@ the configuration (without a prefix: ``Auto``). true: false: x = ( int32 )y vs. x = (int32)y - * ``bool InEmptyParentheses`` Put a space in parentheses only if the parentheses are empt

[clang] [clang-format] add an option to insert a space only for non-code block empty braces, not for empty parentheses (PR #93634)

2024-05-29 Thread via cfe-commits
@@ -6237,18 +6237,30 @@ the configuration (without a prefix: ``Auto``). true: false: x = ( int32 )y vs. x = (int32)y - * ``bool InEmptyParentheses`` Put a space in parentheses only if the parentheses are empt

[clang] [clang-format] add an option to insert a space only for non-code block empty braces, not for empty parentheses (PR #93634)

2024-05-29 Thread via cfe-commits
https://github.com/mydeveloperday commented: I think you might be missing a change in the == operator for the Style https://github.com/llvm/llvm-project/pull/93634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [clang-format] Insert a space between a keyword and a literal (PR #93632)

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

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-29 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/93430 >From 131f515c1341122896ea3c9624751a634db06cb7 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 27 May 2024 01:16:06 +0200 Subject: [PATCH 1/3] [Clang] Static and explicit object member functions with t

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-29 Thread via cfe-commits
@@ -5813,6 +5813,24 @@ static TypoCorrection TryTypoCorrectionForCall(Sema &S, Expr *Fn, return TypoCorrection(); } +static bool isParenthetizedAndQualifiedAddressOfExpr(Expr *Fn) { + if (!isa(Fn)) +return false; + + Fn = Fn->IgnoreParens(); + auto *UO = dyn_cast(Fn)

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-29 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/93430 >From 131f515c1341122896ea3c9624751a634db06cb7 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 27 May 2024 01:16:06 +0200 Subject: [PATCH 1/4] [Clang] Static and explicit object member functions with t

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-29 Thread Vadim D. via cfe-commits
vvd170501 wrote: @HighCommander4, overall it looks good, but I'd replace "enables include-cleaner checks" with "enables unused include check", because the option doesn't affect missing include check. https://github.com/llvm/llvm-project/pull/87208 __

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
@@ -67,15 +67,13 @@ On Unix-like Systems Build LLVM and Clang: cd llvm-project -mkdir build (in-tree build is not supported) -cd build This builds both LLVM and Clang in release mode. Alternatively, if you need a debug build, switch Release to Deb

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. I'm fine with `cmake --build`, but I don't think that replacing `cd` with `-S` and `-B` is an improvement. https://github.com/llvm/llvm-project/pull/93503 ___ cfe-commits mailing list

[clang] [analyzer] New optin.taint.TaintAlloc checker for catching unbounded memory allocation calls (PR #92420)

2024-05-29 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/92420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] New optin.taint.TaintAlloc checker for catching unbounded memory allocation calls (PR #92420)

2024-05-29 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. I'd say that the commit is acceptable as it is now, but I added several inline comments for minor prettification issues. https://github.com/llvm/llvm-project/pull/92420 ___ cfe-commits mailing l

[clang] [analyzer] New optin.taint.TaintAlloc checker for catching unbounded memory allocation calls (PR #92420)

2024-05-29 Thread Donát Nagy via cfe-commits
@@ -938,6 +938,53 @@ optin.portability.UnixAPI " Finds implementation-defined behavior in UNIX/Posix functions. +.. _optin-taint-TaintAlloc: + +optin.taint.TaintAlloc (C, C++) +""" + +This checker warns for cases when the ``s

[clang] [analyzer] New optin.taint.TaintAlloc checker for catching unbounded memory allocation calls (PR #92420)

2024-05-29 Thread Donát Nagy via cfe-commits
@@ -938,6 +938,53 @@ optin.portability.UnixAPI " Finds implementation-defined behavior in UNIX/Posix functions. +.. _optin-taint-TaintAlloc: + +optin.taint.TaintAlloc (C, C++) +""" + +This checker warns for cases when the ``s

[clang] [analyzer] New optin.taint.TaintAlloc checker for catching unbounded memory allocation calls (PR #92420)

2024-05-29 Thread Donát Nagy via cfe-commits
@@ -938,6 +938,53 @@ optin.portability.UnixAPI " Finds implementation-defined behavior in UNIX/Posix functions. +.. _optin-taint-TaintAlloc: + +optin.taint.TaintAlloc (C, C++) +""" + +This checker warns for cases when the ``s

[clang] [analyzer] New optin.taint.TaintAlloc checker for catching unbounded memory allocation calls (PR #92420)

2024-05-29 Thread Donát Nagy via cfe-commits
@@ -1779,18 +1797,76 @@ ProgramStateRef MallocChecker::MallocMemAux(CheckerContext &C, const CallEvent &Call, const Expr *SizeEx, SVal Init, Prog

[clang] [analyzer] New optin.taint.TaintAlloc checker for catching unbounded memory allocation calls (PR #92420)

2024-05-29 Thread Donát Nagy via cfe-commits
@@ -1779,18 +1797,76 @@ ProgramStateRef MallocChecker::MallocMemAux(CheckerContext &C, const CallEvent &Call, const Expr *SizeEx, SVal Init, Prog

[clang] [analyzer] New optin.taint.TaintAlloc checker for catching unbounded memory allocation calls (PR #92420)

2024-05-29 Thread Donát Nagy via cfe-commits
@@ -1779,18 +1797,76 @@ ProgramStateRef MallocChecker::MallocMemAux(CheckerContext &C, const CallEvent &Call, const Expr *SizeEx, SVal Init, Prog

[clang] fa649df - [clang][ExtractAPI] Flatten all enum cases from anonymous enums at top level (#93559)

2024-05-29 Thread via cfe-commits
Author: Daniel Grumberg Date: 2024-05-29T09:47:23+01:00 New Revision: fa649df8e54c2aa8921a42ad8d10e1e45700e5d7 URL: https://github.com/llvm/llvm-project/commit/fa649df8e54c2aa8921a42ad8d10e1e45700e5d7 DIFF: https://github.com/llvm/llvm-project/commit/fa649df8e54c2aa8921a42ad8d10e1e45700e5d7.dif

[clang] [clang][ExtractAPI] Flatten all enum cases from anonymous enums at top level (PR #93559)

2024-05-29 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/93559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/92338 >From 41fbc18c7a4a26b11bc4b772bbe2e384ad9d9dbc Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Fri, 10 May 2024 16:29:55 +0800 Subject: [PATCH 1/9] [X86] Support EGPR for inline assembly. "jR": explictly enabl

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf edited https://github.com/llvm/llvm-project/pull/92338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Freddy Ye via cfe-commits
@@ -0,0 +1,16 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: not llc -mtriple=x86_64 < %s 2>&1 | FileCheck %s --check-prefix=ERR +; RUN: not llc -mtriple=x86_64 -mattr=+egpr < %s 2>&1 | FileCheck %s --check-prefix=ERR +; RUN: llc -mtripl

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Freddy Ye via cfe-commits
@@ -0,0 +1,16 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: not llc -mtriple=x86_64 < %s 2>&1 | FileCheck %s --check-prefix=ERR +; RUN: not llc -mtriple=x86_64 -mattr=+egpr < %s 2>&1 | FileCheck %s --check-prefix=ERR +; RUN: llc -mtripl

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Freddy Ye via cfe-commits
@@ -0,0 +1,16 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: not llc -mtriple=x86_64 %s 2>&1 | FileCheck %s --check-prefix=ERR +; RUN: llc -mtriple=x86_64 -mattr=+egpr < %s | FileCheck %s +; RUN: llc -mtriple=x86_64 -mattr=+egpr,+inline-a

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Freddy Ye via cfe-commits
@@ -58255,6 +58281,22 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, } break; } + } else if (Constraint.size() == 2 && Constraint[0] == 'j') { +switch (Constraint[1]) { +default: + break; +case 'R': + if

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Freddy Ye via cfe-commits
@@ -58024,15 +58043,22 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, case 'r': // GENERAL_REGS case 'l': // INDEX_REGS if (VT == MVT::i8 || VT == MVT::i1) -return std::make_pair(0U, &X86::GR8_NOREX2RegClass); +

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Freddy Ye via cfe-commits
@@ -5418,6 +5418,8 @@ X86: operand will get allocated only to RAX -- if two 32-bit operands are needed, you're better off splitting it yourself, before passing it to the asm statement. +- ``jR``: An 8, 16, 32, or 64-bit integer EGPR when EGPR feature is on. + Otherwise,

[clang] [llvm] Recover performance loss after PagedVector introduction (PR #67972)

2024-05-29 Thread Giulio Eulisse via cfe-commits
https://github.com/ktf updated https://github.com/llvm/llvm-project/pull/67972 >From 154f82bd0e35e9d8ad8f8812ba3eb1cf8d211003 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+...@users.noreply.github.com> Date: Mon, 2 Oct 2023 13:01:14 +0200 Subject: [PATCH 1/3] Hint for branch likelihood --

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/92338 >From 41fbc18c7a4a26b11bc4b772bbe2e384ad9d9dbc Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Fri, 10 May 2024 16:29:55 +0800 Subject: [PATCH 01/10] [X86] Support EGPR for inline assembly. "jR": explictly ena

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Freddy Ye via cfe-commits
@@ -5418,6 +5418,8 @@ X86: operand will get allocated only to RAX -- if two 32-bit operands are needed, you're better off splitting it yourself, before passing it to the asm statement. +- ``jR``: An 8, 16, 32, or 64-bit integer EGPR when EGPR feature is on. --

[clang] [llvm] Recover performance loss after PagedVector introduction (PR #67972)

2024-05-29 Thread Giulio Eulisse via cfe-commits
ktf wrote: I have updated the branch and I think the two changes in this PR are in any case good. However it's my understanding that the performance regression was actually due to some less aggressive inlining of the new code. I have no idea how to proceed for that though. https://github.com/

[clang] 0f7b4b0 - [X86][Driver] Enable feature ccmp,nf for -mapxf

2024-05-29 Thread Shengchen Kan via cfe-commits
Author: Shengchen Kan Date: 2024-05-29T17:34:26+08:00 New Revision: 0f7b4b04a548e10d0f552f13bebc21972d55d7f6 URL: https://github.com/llvm/llvm-project/commit/0f7b4b04a548e10d0f552f13bebc21972d55d7f6 DIFF: https://github.com/llvm/llvm-project/commit/0f7b4b04a548e10d0f552f13bebc21972d55d7f6.diff

[clang] 4bb6974 - [X86] x86-atomic-long_double.c - cleanup check prefixes

2024-05-29 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-05-29T10:38:03+01:00 New Revision: 4bb6974a87e495f19faea4b13475a65e842473f0 URL: https://github.com/llvm/llvm-project/commit/4bb6974a87e495f19faea4b13475a65e842473f0 DIFF: https://github.com/llvm/llvm-project/commit/4bb6974a87e495f19faea4b13475a65e842473f0.diff

[clang] 9c42ed1 - [X86] Add x86-atomic-double.c double test coverage

2024-05-29 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-05-29T10:38:03+01:00 New Revision: 9c42ed1371ee8c211aedcfe8aed16662a9befb69 URL: https://github.com/llvm/llvm-project/commit/9c42ed1371ee8c211aedcfe8aed16662a9befb69 DIFF: https://github.com/llvm/llvm-project/commit/9c42ed1371ee8c211aedcfe8aed16662a9befb69.diff

[clang] f3fb7f5 - [X86] x86-atomic-float.c - cleanup unused check prefixes

2024-05-29 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-05-29T10:38:02+01:00 New Revision: f3fb7f569936db418feef98e4ae68777a9a4cd2a URL: https://github.com/llvm/llvm-project/commit/f3fb7f569936db418feef98e4ae68777a9a4cd2a DIFF: https://github.com/llvm/llvm-project/commit/f3fb7f569936db418feef98e4ae68777a9a4cd2a.diff

[clang] [llvm] [SME] Add intrinsics for FCVT(wid.) and FCVTL (PR #93202)

2024-05-29 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/93202 >From a1750b2b5658f8ced700bbf010019703fc52f126 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Mon, 15 Apr 2024 13:31:00 + Subject: [PATCH 1/7] [LLVM][AARCH64]Replace +sme2p1+smef16f16 by +smef16f16 A

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Shengchen Kan via cfe-commits
@@ -5394,10 +5394,12 @@ X86: - ``Z``: An immediate 32-bit unsigned integer. - ``q``: An 8, 16, 32, or 64-bit register which can be accessed as an 8-bit ``l`` integer register. On X86-32, this is the ``a``, ``b``, ``c``, and ``d`` - registers, and on X86-64, it is all of the

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Shengchen Kan via cfe-commits
@@ -5394,10 +5394,12 @@ X86: - ``Z``: An immediate 32-bit unsigned integer. - ``q``: An 8, 16, 32, or 64-bit register which can be accessed as an 8-bit ``l`` integer register. On X86-32, this is the ``a``, ``b``, ``c``, and ``d`` - registers, and on X86-64, it is all of the

[clang] [llvm] [AArch64][SME] Add intrinsics for multi-vector BFCLAMP (PR #93532)

2024-05-29 Thread via cfe-commits
Lukacma wrote: > You should just re-open the old PR instead of making a new one, or if the fix > is trivial then just re-commit the change without a PR unless you need > someone to review it. I see. Wasn't aware of this. Thanks for pointing it out. https://github.com/llvm/llvm-project/pull/93

[clang] 78cc9cb - [AArch64][SME] Add intrinsics for multi-vector BFCLAMP (#93532)

2024-05-29 Thread via cfe-commits
Author: Lukacma Date: 2024-05-29T10:44:58+01:00 New Revision: 78cc9cbba23fd1783a9b233ae745f126ece56cc7 URL: https://github.com/llvm/llvm-project/commit/78cc9cbba23fd1783a9b233ae745f126ece56cc7 DIFF: https://github.com/llvm/llvm-project/commit/78cc9cbba23fd1783a9b233ae745f126ece56cc7.diff LOG:

[clang] [llvm] [AArch64][SME] Add intrinsics for multi-vector BFCLAMP (PR #93532)

2024-05-29 Thread via cfe-commits
https://github.com/Lukacma closed https://github.com/llvm/llvm-project/pull/93532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SME] Add intrinsics for vector groups ZERO (PR #93201)

2024-05-29 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/93201 >From c44bd42f8011dd09771fda50a76a7321342c2b2f Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Thu, 4 Apr 2024 14:36:54 + Subject: [PATCH 1/6] WIP --- clang/include/clang/Basic/arm_sme.td | 29 +

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Shengchen Kan via cfe-commits
@@ -57581,6 +57581,14 @@ X86TargetLowering::getConstraintType(StringRef Constraint) const { case '2': return C_RegisterClass; } +case 'j': + switch (Constraint[1]) { + default: +break; + case 'r': + case 'R': +return

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Shengchen Kan via cfe-commits
@@ -57660,6 +57668,19 @@ X86TargetLowering::getSingleConstraintMatchWeight( break; } break; + case 'j': +if (StringRef(Constraint).size() != 2) + break; +switch (Constraint[1]) { +default: + return CW_Invalid; +case 'r': +case 'R': +

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Shengchen Kan via cfe-commits
KanRobert wrote: Remove this test and update llvm/test/CodeGen/X86/apx/asm-constraint.ll https://github.com/llvm/llvm-project/pull/92338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Shengchen Kan via cfe-commits
KanRobert wrote: Merge this into llvm/test/CodeGen/X86/apx/inline-asm-jr-constraint.ll You can add `not` at each run line. llc does not stop processing when encountering such kind of error. https://github.com/llvm/llvm-project/pull/92338 _

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-29 Thread Shengchen Kan via cfe-commits
@@ -0,0 +1,16 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: not llc -mtriple=x86_64 %s 2>&1 | FileCheck %s --check-prefix=ERR +; RUN: llc -mtriple=x86_64 -mattr=+egpr < %s | FileCheck %s +; RUN: llc -mtriple=x86_64 -mattr=+egpr,+inline-a

[clang] 5c214eb - [Inline] Clone return range attribute on the callsite into inlined call (#92666)

2024-05-29 Thread via cfe-commits
Author: Andreas Jonson Date: 2024-05-29T12:05:05+02:00 New Revision: 5c214eb0c628c874f2c9496e663be4067e64442a URL: https://github.com/llvm/llvm-project/commit/5c214eb0c628c874f2c9496e663be4067e64442a DIFF: https://github.com/llvm/llvm-project/commit/5c214eb0c628c874f2c9496e663be4067e64442a.diff

[clang] [llvm] [inline] Clone return range attribute on the callsite into inlined call (PR #92666)

2024-05-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/92666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e93799f - [SME] Add intrinsics for FCVT(wid.) and FCVTL (#93202)

2024-05-29 Thread via cfe-commits
Author: Lukacma Date: 2024-05-29T11:34:24+01:00 New Revision: e93799f260e881ff2f7c0fd7afc78374d615d70e URL: https://github.com/llvm/llvm-project/commit/e93799f260e881ff2f7c0fd7afc78374d615d70e DIFF: https://github.com/llvm/llvm-project/commit/e93799f260e881ff2f7c0fd7afc78374d615d70e.diff LOG:

[clang] [llvm] [SME] Add intrinsics for FCVT(wid.) and FCVTL (PR #93202)

2024-05-29 Thread via cfe-commits
https://github.com/Lukacma closed https://github.com/llvm/llvm-project/pull/93202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1e44a96 - [AArch64][SME] Add intrinsics for vector groups ZERO (#93201)

2024-05-29 Thread via cfe-commits
Author: Lukacma Date: 2024-05-29T11:35:21+01:00 New Revision: 1e44a9690915e8acf7b2a0e67b56aaf4509e9257 URL: https://github.com/llvm/llvm-project/commit/1e44a9690915e8acf7b2a0e67b56aaf4509e9257 DIFF: https://github.com/llvm/llvm-project/commit/1e44a9690915e8acf7b2a0e67b56aaf4509e9257.diff LOG:

[clang] [llvm] [AArch64][SME] Add intrinsics for vector groups ZERO (PR #93201)

2024-05-29 Thread via cfe-commits
https://github.com/Lukacma closed https://github.com/llvm/llvm-project/pull/93201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Implement variadic functions by IR lowering (PR #93362)

2024-05-29 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,180 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature + +// Simple calls to known variadic functions that are completely elided when +// optimisations are on This is a functional check that the expand-varia

[clang] [llvm] [AMDGPU] Implement variadic functions by IR lowering (PR #93362)

2024-05-29 Thread Matt Arsenault via cfe-commits
@@ -103,19 +104,27 @@ void AMDGPUABIInfo::computeInfo(CGFunctionInfo &FI) const { if (!getCXXABI().classifyReturnType(FI)) FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); + unsigned ArgumentIndex = 0; + const unsigned numFixedArguments = FI.getNumRequired

[clang] [llvm] [AMDGPU][WIP] Extend permlane16, permlanex16 and permlane64 intrinsic lowering for generic types (PR #92725)

2024-05-29 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH edited https://github.com/llvm/llvm-project/pull/92725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][WIP] Extend permlane16, permlanex16 and permlane64 intrinsic lowering for generic types (PR #92725)

2024-05-29 Thread Vikram Hegde via cfe-commits
vikramRH wrote: 1. Added/updated tests for permlanex16, permlane64 2. This needs https://github.com/llvm/llvm-project/pull/89217 to land first so that only incremental changes can be reviewed. https://github.com/llvm/llvm-project/pull/92725 ___ cfe-c

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-29 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/86512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-29 Thread Matt Arsenault via cfe-commits
@@ -1170,6 +1170,23 @@ The AMDGPU backend implements the following LLVM IR intrinsics. :ref:`llvm.set.fpenv` Sets the floating point environment to the specifies state. + llvm.amdgcn.readfirstlaneProvides direct access to v_readfirstl

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-29 Thread Matt Arsenault via cfe-commits
@@ -5387,6 +5387,124 @@ bool AMDGPULegalizerInfo::legalizeDSAtomicFPIntrinsic(LegalizerHelper &Helper, return true; } +// TODO: Fix pointer type handling +bool AMDGPULegalizerInfo::legalizeLaneOp(LegalizerHelper &Helper, + MachineInst

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-29 Thread Matt Arsenault via cfe-commits
@@ -6086,6 +6086,63 @@ static SDValue lowerBALLOTIntrinsic(const SITargetLowering &TLI, SDNode *N, DAG.getConstant(0, SL, MVT::i32), DAG.getCondCode(ISD::SETNE)); } +static SDValue lowerLaneOp(const SITargetLowering &TLI, SDNode *N, + Selection

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-29 Thread Matt Arsenault via cfe-commits
@@ -1170,6 +1170,23 @@ The AMDGPU backend implements the following LLVM IR intrinsics. :ref:`llvm.set.fpenv` Sets the floating point environment to the specifies state. + llvm.amdgcn.readfirstlaneProvides direct access to v_readfirstl

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-29 Thread Matt Arsenault via cfe-commits
@@ -5387,6 +5387,124 @@ bool AMDGPULegalizerInfo::legalizeDSAtomicFPIntrinsic(LegalizerHelper &Helper, return true; } +// TODO: Fix pointer type handling +bool AMDGPULegalizerInfo::legalizeLaneOp(LegalizerHelper &Helper, + MachineInst

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-29 Thread Matt Arsenault via cfe-commits
@@ -6086,6 +6086,63 @@ static SDValue lowerBALLOTIntrinsic(const SITargetLowering &TLI, SDNode *N, DAG.getConstant(0, SL, MVT::i32), DAG.getCondCode(ISD::SETNE)); } +static SDValue lowerLaneOp(const SITargetLowering &TLI, SDNode *N, + Selection

[clang] Reapply "[Clang][Sema] placement new initializes typedef array with correct size (#83124)" (PR #89036)

2024-05-29 Thread via cfe-commits
awson wrote: It looks like the author of the patch have either diverted to other activities or is unable to fix it. Could we, perhaps, **just diagnose** the situation and gracefully fail with something like "typedefed array blah-blah is not supported in blah-blah" instead of generating segfau

[clang] [clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (PR #93461)

2024-05-29 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/93461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (PR #93461)

2024-05-29 Thread Yitzhak Mandelbaum via cfe-commits
@@ -188,90 +188,97 @@ static MemberExpr *getMemberForAccessor(const CXXMemberCallExpr &C) { return nullptr; } -static void getReferencedDecls(const Decl &D, ReferencedDecls &Referenced) { - insertIfGlobal(D, Referenced.Globals); - insertIfFunction(D, Referenced.Functions)

[clang] [clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (PR #93461)

2024-05-29 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/93461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Improved PointerSubChecker (PR #93676)

2024-05-29 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/93676 The checker is made more exact (only pointer into array is allowed) and more tests are added. From a896030e71d09ebe7239d6fab343606918ee4c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Da

[clang] [clang][analyzer] Improved PointerSubChecker (PR #93676)

2024-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes The checker is made more exact (only pointer into array is allowed) and more tests are added. --- Full diff: https://github.com/llvm/llvm-project/pull/93676.diff 3 Files Affected: - (modified) clang/lib/S

[clang] [clang][analyzer] Improved PointerSubChecker (PR #93676)

2024-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Kéri (balazske) Changes The checker is made more exact (only pointer into array is allowed) and more tests are added. --- Full diff: https://github.com/llvm/llvm-project/pull/93676.diff 3 Files Affected: - (mod

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #93302)

2024-05-29 Thread via cfe-commits
zmodem wrote: > I understand that removing the code that drops `dllexport` may not be the > "best" place to fix this issue but if this code is not actually required, > which appears to be the case (please let me know if this is not), then > removing the code to achieve "better" behaviour feels

[clang] [DebugInfo] Add flag to only emit referenced member functions (PR #87018)

2024-05-29 Thread Paul T Robinson via cfe-commits
pogo59 wrote: What @SLTozer said. I don't want "members" to mean "some but not all members" and "methods" was shorter than "member-functions" (but I'm okay with "member-functions"). https://github.com/llvm/llvm-project/pull/87018 ___ cfe-commits mail

[clang] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-05-29 Thread Matt Arsenault via cfe-commits
@@ -2928,12 +2928,13 @@ static void emitUsed(CodeGenModule &CGM, StringRef Name, for (unsigned i = 0, e = List.size(); i != e; ++i) { UsedArray[i] = llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast( -cast(&*List[i]), CGM.Int8PtrTy); ---

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Momchil Velikov via cfe-commits
@@ -1989,6 +1989,14 @@ llvm::Value *CodeGenFunction::EmitLoadOfScalar(Address Addr, bool Volatile, return EmitAtomicLoad(AtomicLValue, Loc).getScalarVal(); } + if (const auto *BIT = Ty->getAs()) { +if (BIT->getNumBits() > 128) { + // Long _BitInt has array of

  1   2   3   4   >