[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-29 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146247 >From f2ed0c7989d7e181004237a4fa2ba7ae1efe44ed Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Sat, 28 Jun 2025 16:19:55 -0700 Subject: [PATCH 1/4] add err_main_in_named_module --- clang/include/clan

[clang] [CIR] Upstream GenericSelectionExpr for ComplexType (PR #146265)

2025-06-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes Upstream the GenericSelectionExpr for ComplexType https://github.com/llvm/llvm-project/issues/141365 --- Full diff: https://github.com/llvm/llvm-project/pull/146265.diff 2 Files Affected: - (modified)

[clang] [CIR] Upstream GenericSelectionExpr for ComplexType (PR #146265)

2025-06-29 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/146265 Upstream the GenericSelectionExpr for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 75b506657dc2ecda04a5fda1f76141346d9ec3ab Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 2

[clang] [CIR] Upstream GenericSelectionExpr for ComplexType (PR #146265)

2025-06-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes Upstream the GenericSelectionExpr for ComplexType https://github.com/llvm/llvm-project/issues/141365 --- Full diff: https://github.com/llvm/llvm-project/pull/146265.diff 2 Files Affected: - (modified

[clang] dcc9e36 - [ARM] Add neon vector support for floor (#142559)

2025-06-29 Thread via cfe-commits
Author: David Green Date: 2025-06-29T11:37:16+01:00 New Revision: dcc9e36b18264aef4008b88c4ae38e33151c3345 URL: https://github.com/llvm/llvm-project/commit/dcc9e36b18264aef4008b88c4ae38e33151c3345 DIFF: https://github.com/llvm/llvm-project/commit/dcc9e36b18264aef4008b88c4ae38e33151c3345.diff L

[clang] [llvm] [ARM] Add neon vector support for floor (PR #142559)

2025-06-29 Thread David Green via cfe-commits
https://github.com/davemgreen closed https://github.com/llvm/llvm-project/pull/142559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Make EndsInComma in ContinuationIndenter consistent (PR #146256)

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

[clang] [llvm] [ARM] Add neon vector support for floor (PR #142559)

2025-06-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `arc-builder` running on `arc-worker` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/18242 Here is the relevant pie

[clang] [clang] [Sema] Suggest [[noreturn]] for void functions that always throw (PR #146234)

2025-06-29 Thread Timm Baeder via cfe-commits
@@ -1979,6 +1979,13 @@ void clang::inferNoReturnAttr(Sema &S, const Decl *D) { if (!FD->hasAttr() && !FD->hasAttr() && isKnownToAlwaysThrow(FD)) { NonConstFD->addAttr(InferredNoReturnAttr::CreateImplicit(S.Context)); + +// Conditionally, emit the suggestion warn

[clang] [docs][coroutines] Revamp "Debugging C++ coroutines" (PR #142651)

2025-06-29 Thread Adrian Vogelsgesang via cfe-commits
vogelsgesang wrote: Thanks for reporting. I actually ended up feeding this document to AI and asked it to do a proof-read. It found a couple more smaller issues. Those are fixed in #146282 now https://github.com/llvm/llvm-project/pull/142651 ___ cfe-

[clang] [clang] [Sema] Suggest [[noreturn]] for void functions that always throw (PR #146234)

2025-06-29 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/146234 >From 588ae1c6c4b965a6cd57044284845a62c75da9c2 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 28 Jun 2025 15:31:37 -0400 Subject: [PATCH 1/2] Emit a suggestion to explicitly mark the function with

[clang] [NFC][docs][coro] Fix syntax & typos (PR #146282)

2025-06-29 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/146282 >From b547ef22612bdd66abc8076df40924074230c9e3 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Sun, 29 Jun 2025 17:07:29 + Subject: [PATCH] [NFC][docs][coro] Fix syntax & typos Follow-up fixes

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-06-29 Thread via cfe-commits
https://github.com/tcottin updated https://github.com/llvm/llvm-project/pull/140498 >From 8fadd8d51fa3d96c7fb82b9d749ef3f35441ac64 Mon Sep 17 00:00:00 2001 From: Tim Cottin Date: Mon, 19 May 2025 06:26:36 + Subject: [PATCH 1/3] [clangd] Improve Markup Rendering --- clang-tools-extra/clang

[clang] [CIR] Implement ArraySubscript for ComplexType (PR #146283)

2025-06-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes Implement ArraySubscript for ComplexType https://github.com/llvm/llvm-project/issues/141365 --- Full diff: https://github.com/llvm/llvm-project/pull/146283.diff 2 Files Affected: - (modified) clang/l

[clang] [CIR] Implement ArraySubscript for ComplexType (PR #146283)

2025-06-29 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/146283 Implement ArraySubscript for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 0d1cec7c321351ed1d685ca2708683903aaf98d5 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 29 Jun 202

[clang] 40525fb - [NFC][docs][coro] Fix syntax & typos (#146282)

2025-06-29 Thread via cfe-commits
Author: Adrian Vogelsgesang Date: 2025-06-29T21:25:35+02:00 New Revision: 40525fb4c78a9020c0cb39c9ec4fb0b14e88eba4 URL: https://github.com/llvm/llvm-project/commit/40525fb4c78a9020c0cb39c9ec4fb0b14e88eba4 DIFF: https://github.com/llvm/llvm-project/commit/40525fb4c78a9020c0cb39c9ec4fb0b14e88eba4

[clang] [NFC][docs][coro] Fix syntax & typos (PR #146282)

2025-06-29 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang closed https://github.com/llvm/llvm-project/pull/146282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Remove some dead code (PR #146287)

2025-06-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/146287 None >From 7812277876bfa5ac75c110d582dea98924339858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 29 Jun 2025 21:19:22 +0200 Subject: [PATCH] [clang][bytecode][NFC] Remove some dead c

[clang-tools-extra] a3a60e0 - [clang-tidy] add new check: modernize-use-scoped-lock (#126434)

2025-06-29 Thread via cfe-commits
Author: Baranov Victor Date: 2025-06-29T22:34:32+03:00 New Revision: a3a60e03e2bf7b79683517584a9a7b3e4c8cd297 URL: https://github.com/llvm/llvm-project/commit/a3a60e03e2bf7b79683517584a9a7b3e4c8cd297 DIFF: https://github.com/llvm/llvm-project/commit/a3a60e03e2bf7b79683517584a9a7b3e4c8cd297.diff

[clang] [clang] Improve constexpr-unknown diagnostics. (PR #146288)

2025-06-29 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/146288 APValue::ConstexprUnknown() constructs a broken LValue that doesn't have an lvalue path, which confuses later error handling. It turns out we don't actually use the result of createConstexprUnknownAPValu

[clang] [clang] Improve constexpr-unknown diagnostics. (PR #146288)

2025-06-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eli Friedman (efriedma-quic) Changes APValue::ConstexprUnknown() constructs a broken LValue that doesn't have an lvalue path, which confuses later error handling. It turns out we don't actually use the result of createConstexprUnknownAPV

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-06-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/126434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve constexpr-unknown diagnostics. (PR #146288)

2025-06-29 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 HEAD~1 HEAD --extensions cpp -- clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/con

[clang] [llvm] AMDGPU: Implement intrinsic/builtins for gfx1250 load transpose instructions (PR #146289)

2025-06-29 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng created https://github.com/llvm/llvm-project/pull/146289 None >From fc2039dcf338f04977b2a0b43e8714cb5eb0f440 Mon Sep 17 00:00:00 2001 From: Changpeng Fang Date: Fri, 27 Jun 2025 14:59:33 -0700 Subject: [PATCH] AMDGPU: Implement intrinsic/builtins for gfx1250 load

[clang] fa05864 - [clang-format] Make EndsInComma in ContinuationIndenter consistent (#146256)

2025-06-29 Thread via cfe-commits
Author: Owen Pan Date: 2025-06-29T12:41:34-07:00 New Revision: fa058647fe3ad7834f9d99af7597b00990afc186 URL: https://github.com/llvm/llvm-project/commit/fa058647fe3ad7834f9d99af7597b00990afc186 DIFF: https://github.com/llvm/llvm-project/commit/fa058647fe3ad7834f9d99af7597b00990afc186.diff LOG:

[clang] [clang-format] Make EndsInComma in ContinuationIndenter consistent (PR #146256)

2025-06-29 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/146256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Implement intrinsic/builtins for gfx1250 load transpose instructions (PR #146289)

2025-06-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Changpeng Fang (changpeng) Changes --- Patch is 37.64 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/146289.diff 11 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsAMDGPU.def

[clang] [Clang] Fix '-Wformat-overflow' FP when floats had field-width and plus prefix (PR #144274)

2025-06-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/144274 >From dfb2abd2c2711c87a22e8f8c93aa82f2621518cb Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sun, 15 Jun 2025 22:20:54 +0300 Subject: [PATCH 1/3] [Clang] Fix '-Wformat-overflow' FP when floats had field-

[clang-tools-extra] [clang-tidy] properly handle private move constructors in `modernize-pass-by-value` check (PR #141304)

2025-06-29 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping https://github.com/llvm/llvm-project/pull/141304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement ArraySubscript for ComplexType (PR #146283)

2025-06-29 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/146283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement ArraySubscript for ComplexType (PR #146283)

2025-06-29 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/146283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement ArraySubscript for ComplexType (PR #146283)

2025-06-29 Thread Henrich Lauko via cfe-commits
@@ -442,3 +442,35 @@ bool foo19(double _Complex a, double _Complex b) { // OGCG: %[[CMP_IMAG:.*]] = fcmp oeq double %[[A_IMAG]], %[[B_IMAG]] // OGCG: %[[RESULT:.*]] = and i1 %[[CMP_REAL]], %[[CMP_IMAG]] + +void foo24() { + int _Complex arr[2]; + int _Complex r = arr[1]; ---

[clang] [clang][bytecode] Add `Descriptor::hasTrivialDtor()` (PR #146286)

2025-06-29 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/146286 >From a034db206e38bc4473bb47e152a7078e7348649a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 25 Jun 2025 10:27:56 +0200 Subject: [PAT

[clang] [clang] Build the Z3 mock module via CMake (PR #146284)

2025-06-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Looks really good. Sweet! Thank you for this patch. If it works then it works. There is only one thing though. We have a couple uses of %clang_cc1 and we could substitute when we are at it. See an example here https://github.com/llvm/llvm-

[clang] [lld] [llvm] [AArch64] Fix stale +zcm target feature to +zcm-gpr64 (PR #146260)

2025-06-29 Thread David Green via cfe-commits
@@ -170,7 +170,7 @@ getAArch64MicroArchFeaturesFromMtune(const Driver &D, StringRef Mtune, // 'cyclone' and later have zero-cycle register moves and zeroing. if (MtuneLowerCase == "cyclone" || StringRef(MtuneLowerCase).starts_with("apple")) { -Features.push_back(

[clang] [lld] [llvm] [AArch64] Fix stale +zcm target feature to +zcm-gpr64 (PR #146260)

2025-06-29 Thread David Green via cfe-commits
https://github.com/davemgreen commented: The llvm test look OK if you wanted to push those separately. https://github.com/llvm/llvm-project/pull/146260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [lld] [llvm] [AArch64] Fix stale +zcm target feature to +zcm-gpr64 (PR #146260)

2025-06-29 Thread David Green via cfe-commits
https://github.com/davemgreen edited https://github.com/llvm/llvm-project/pull/146260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [AArch64] Fix stale +zcm target feature to +zcm-gpr64 (PR #146260)

2025-06-29 Thread Tomer Shafir via cfe-commits
@@ -170,7 +170,7 @@ getAArch64MicroArchFeaturesFromMtune(const Driver &D, StringRef Mtune, // 'cyclone' and later have zero-cycle register moves and zeroing. if (MtuneLowerCase == "cyclone" || StringRef(MtuneLowerCase).starts_with("apple")) { -Features.push_back(

[clang] [Clang] Remove AArch64TargetInfo::setArchFeatures (PR #146107)

2025-06-29 Thread David Green via cfe-commits
davemgreen wrote: The best kind of patch. > When compiling with -march=armv9-a+nosve we found that Clang still defines > the __ARM_FEATURE_SVE2 macro Could we add a test for this, in case it comes up again in the future? Negative features have not worked super well in the past and could do wi

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-06-29 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev commented: LGTM! https://github.com/llvm/llvm-project/pull/144970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-06-29 Thread Vassil Vassilev via cfe-commits
@@ -14423,6 +14423,9 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl) { Var->getType().getAddressSpace() == LangAS::hlsl_input) return; +if (getLangOpts().CPlusPlus) + ActOnCXXEnterDeclInitializer(nullptr, Var); vgvassilev wrote: ``

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-06-29 Thread Vassil Vassilev via cfe-commits
@@ -14458,6 +14461,9 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl) { } CheckCompleteVariableDeclaration(Var); + +if (getLangOpts().CPlusPlus) + ActOnCXXExitDeclInitializer(nullptr, Var); vgvassilev wrote: ```suggestion ActOnCXXEx

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-06-29 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev edited https://github.com/llvm/llvm-project/pull/144970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-29 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH 01/13] [Clang] Add __builtin_invoke and recognize std::invoke

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-29 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH 01/13] [Clang] Add __builtin_invoke and recognize std::invoke

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Alexis Engelke via cfe-commits
@@ -18,6 +18,11 @@ namespace llvm { class WebAssemblyTargetStreamer; +struct BranchHintRecord { + MCSymbol *func_sym; + SmallVector, 0> hints; aengelke wrote: ```suggestion SmallVector, 0> Hints; ``` https://github.com/llvm/llvm-project/pull/146230 _

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Alexis Engelke via cfe-commits
@@ -18,6 +18,11 @@ namespace llvm { class WebAssemblyTargetStreamer; +struct BranchHintRecord { + MCSymbol *func_sym; aengelke wrote: Naming: `FuncSym` https://github.com/llvm/llvm-project/pull/146230 ___ cfe-comm

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Alexis Engelke via cfe-commits
@@ -2562,8 +2565,22 @@ void WebAssemblyCFGStackify::rewriteDepthImmediates(MachineFunction &MF) { MO = MachineOperand::CreateImm(getDelegateDepth(Stack, MO.getMBB())); else if (MI.getOpcode() == WebAssembly::RETHROW) MO = MachineOperand::CreateImm(g

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Alexis Engelke via cfe-commits
@@ -28,6 +33,9 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyAsmPrinter final : public AsmPrinter { WebAssemblyFunctionInfo *MFI; bool signaturesEmitted = false; + // vec idx == local func_idx + std::vector> branchHints; aengelke wrote: Use SmallVector.

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Alexis Engelke via cfe-commits
@@ -55,6 +55,15 @@ using namespace llvm; #define DEBUG_TYPE "asm-printer" extern cl::opt WasmKeepRegisters; +// values are divided by 1<<31 to calculate the probability +static cl::opt WasmHighBranchProb( +"wasm-branch-prob-high", cl::Hidden, +cl::desc("lowest branch p

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Alexis Engelke via cfe-commits
@@ -697,6 +738,34 @@ void WebAssemblyAsmPrinter::emitInstruction(const MachineInstr *MI) { WebAssemblyMCInstLower MCInstLowering(OutContext, *this); MCInst TmpInst; MCInstLowering.lower(MI, TmpInst); +if (Subtarget->hasBranchHinting() && +MI->getOpcode(

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Alexis Engelke via cfe-commits
@@ -697,6 +738,34 @@ void WebAssemblyAsmPrinter::emitInstruction(const MachineInstr *MI) { WebAssemblyMCInstLower MCInstLowering(OutContext, *this); MCInst TmpInst; MCInstLowering.lower(MI, TmpInst); +if (Subtarget->hasBranchHinting() && +MI->getOpcode(

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Alexis Engelke via cfe-commits
@@ -0,0 +1,79 @@ +; RUN: llc -mcpu=mvp -filetype=obj %s -mattr=+branch-hinting -wasm-branch-prob-high=0x6000 -wasm-branch-prob-low=0x0 -o - | obj2yaml | FileCheck %s + +; This test checks that branch weight metadata (!prof) is correctly translated to webassembly branch hint

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Alexis Engelke via cfe-commits
@@ -59,6 +67,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyAsmPrinter final : public AsmPrinter { void EmitProducerInfo(Module &M); void EmitTargetFeatures(Module &M); void EmitFunctionAttributes(Module &M); + void EmitBranchHintSection() const; aengelk

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Alexis Engelke via cfe-commits
https://github.com/aengelke commented: Some comments on the LLVM MC part. I'm not too familiar with the Wasm back-end or LLD. https://github.com/llvm/llvm-project/pull/146230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Alexis Engelke via cfe-commits
https://github.com/aengelke edited https://github.com/llvm/llvm-project/pull/146230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Alexis Engelke via cfe-commits
@@ -0,0 +1,79 @@ +; RUN: llc -mcpu=mvp -filetype=obj %s -mattr=+branch-hinting -wasm-branch-prob-high=0x6000 -wasm-branch-prob-low=0x0 -o - | obj2yaml | FileCheck %s aengelke wrote: Should test different values (multiple run lines, different check prefixes

[clang] [lld] [llvm] [AArch64] Fix stale +zcm target feature to +zcm-gpr64 (PR #146260)

2025-06-29 Thread Florian Hahn via cfe-commits
https://github.com/fhahn commented: LGTM, thanks https://github.com/llvm/llvm-project/pull/146260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-29 Thread Mikail Bagishov via cfe-commits
MikailBag wrote: It seems that clang trunk [warns](https://godbolt.org/z/Geedq7o46) on `extern "C++" main`, which is now allowed after P3618. I think it will be helpful for the UX to land this change after that warning is fixed. https://github.com/llvm/llvm-project/pull/146247 ___

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-06-29 Thread via cfe-commits
https://github.com/yronglin approved this pull request. Thanks for this fix! LGTM https://github.com/llvm/llvm-project/pull/145164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-06-29 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/145164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7138397 - [Clang] Add __builtin_invoke and use it in libc++ (#116709)

2025-06-29 Thread via cfe-commits
Author: Nikolas Klauser Date: 2025-06-29T17:52:50+02:00 New Revision: 713839729c97d1ac9492c516d0bf5e1add27fbd3 URL: https://github.com/llvm/llvm-project/commit/713839729c97d1ac9492c516d0bf5e1add27fbd3 DIFF: https://github.com/llvm/llvm-project/commit/713839729c97d1ac9492c516d0bf5e1add27fbd3.dif

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-29 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/116709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-29 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 commented: Thanks! This is a nice and simple fix. * It fixes the main issue as originally reported. * It fixes the additional issue discussed in [this comment](https://github.com/clangd/clangd/issues/2339#issuecomment-2709036107), taking the second approach

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-29 Thread Nathan Ridge via cfe-commits
@@ -4363,6 +4363,35 @@ TEST(CompletionTest, PreambleFromDifferentTarget) { EXPECT_THAT(Result.Completions, Not(testing::IsEmpty())); EXPECT_THAT(Signatures.signatures, Not(testing::IsEmpty())); } + +TEST(CompletionTest, DeducingThisIgnoreSelf) { + Annotations Test(R"cpp( +

[clang] [Clang] Remove AArch64TargetInfo::setArchFeatures (PR #146107)

2025-06-29 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm updated https://github.com/llvm/llvm-project/pull/146107 >From c44ab034e0f1a54df2a3f5c09ddabff531dea982 Mon Sep 17 00:00:00 2001 From: Sander de Smalen Date: Fri, 27 Jun 2025 16:12:04 + Subject: [PATCH] [Clang] Remove AArch64TargetInfo::setArchFeatures When

[clang] [clang][bytecode] Fix comparing pointers pointing to base classes (PR #146285)

2025-06-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/146285 In the attached test case, one pointer points to the `Derived` class and one to `Base`, but they should compare equal. They didn't because those two bases are saved at different offsets in the block. Use `comp

[clang] Reland [Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (PR #144649)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/144649 >From 14a2bb5dead7fa0e3d442e04ba73ad5f98d2e90e Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Tue, 17 Jun 2025 22:49:55 +0530 Subject: [PATCH] [Driver] Add support for crtbegin.o, crtend.o and libgloss

[clang] [clang][bytecode] Fix comparing pointers pointing to base classes (PR #146285)

2025-06-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes In the attached test case, one pointer points to the `Derived` class and one to `Base`, but they should compare equal. They didn't because those two bases are saved at different offsets in the block. Use `co

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/118809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Build the Z3 mock module via CMake (PR #146284)

2025-06-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michał Górny (mgorny) Changes Build the Z3 mock module via CMake rather than compiling it directly in tests. This ensures that the toolchain file is exported, and therefore fixes testing for Gentoo multilib. Also, it ensures that the mo

[clang] [clang] Build the Z3 mock module via CMake (PR #146284)

2025-06-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Michał Górny (mgorny) Changes Build the Z3 mock module via CMake rather than compiling it directly in tests. This ensures that the toolchain file is exported, and therefore fixes testing for Gentoo multilib. Also, it e

[clang] [llvm] [NFC][analyzer] Remove Z3-as-constraint-manager hacks from lit test code (PR #145731)

2025-06-29 Thread Michał Górny via cfe-commits
mgorny wrote: Okay, figured it out after all and filed #146284. https://github.com/llvm/llvm-project/pull/145731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Build the Z3 mock module via CMake (PR #146284)

2025-06-29 Thread Michał Górny via cfe-commits
https://github.com/mgorny created https://github.com/llvm/llvm-project/pull/146284 Build the Z3 mock module via CMake rather than compiling it directly in tests. This ensures that the toolchain file is exported, and therefore fixes testing for Gentoo multilib. Also, it ensures that the modul

[clang] Reland [Driver] Add support for GCC installation detection in Baremetal toolchain (PR #145390)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/145390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 37ffe89 - Reland [Driver] Add support for GCC installation detection in Baremetal toolchain (#145390)

2025-06-29 Thread via cfe-commits
Author: Garvit Gupta Date: 2025-06-29T23:47:21+05:30 New Revision: 37ffe896a5cd8ebf8e71497580d948fc94a2d526 URL: https://github.com/llvm/llvm-project/commit/37ffe896a5cd8ebf8e71497580d948fc94a2d526 DIFF: https://github.com/llvm/llvm-project/commit/37ffe896a5cd8ebf8e71497580d948fc94a2d526.diff

[clang] [clang][bytecode] Add `Descriptor::hasTrivialDtor()` (PR #146286)

2025-06-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/146286 We sometimes used to have a long list of ``` GetLocalPtr PopPtr [...] ``` ops at the end of scopes, because we first got a pointer to a local variable and only then did we figure out that we didn't ac

[clang] [clang][bytecode] Add `Descriptor::hasTrivialDtor()` (PR #146286)

2025-06-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We sometimes used to have a long list of ``` GetLocalPtr PopPtr [...] ``` ops at the end of scopes, because we first got a pointer to a local variable and only then did we figure out that we didn't

[clang] [clang][bytecode][NFC] Remove some dead code (PR #146287)

2025-06-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/146287.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/FunctionPointer.cpp (-2) ``diff diff --git a/clang/lib/AST/ByteCode/Fu

[clang] Reland [Driver] Fix link order of BareMetal toolchain object (PR #146291)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/146291 The linker job in BareMetal toolchain object will be used by GNU ld and lld both. However, gnuld process the arguments in the order in which they appear on command line, whereas there is no such restricti

[clang] Reland [Driver] Fix link order of BareMetal toolchain object (PR #146291)

2025-06-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Garvit Gupta (quic-garvgupt) Changes The linker job in BareMetal toolchain object will be used by GNU ld and lld both. However, gnuld process the arguments in the order in which they appear on command lin

[clang] ed25d47 - Reland [Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (#144649)

2025-06-29 Thread via cfe-commits
Author: Garvit Gupta Date: 2025-06-30T01:34:33+05:30 New Revision: ed25d473fb1b7bb85476566cbe1ff78865e4d730 URL: https://github.com/llvm/llvm-project/commit/ed25d473fb1b7bb85476566cbe1ff78865e4d730 DIFF: https://github.com/llvm/llvm-project/commit/ed25d473fb1b7bb85476566cbe1ff78865e4d730.diff

[clang] Reland [Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (PR #144649)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/144649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic (PR #127394)

2025-06-29 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %check_clang_tidy %s cppcoreguidelines-pro-bounds-pointer-arithmetic %t vbvictor wrote: I think it's better to write this test in the existing main test file than to create new test files for specific issues. After N months/years, it wi

[clang-tools-extra] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic (PR #127394)

2025-06-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM with nit. Please rebase on fresh main and I think we can merge it, unless @carlosgalvezp has something against. https://github.com/llvm/llvm-project/pull/127394 ___ cfe-commits mailing list

[clang] [Clang] Remove AArch64TargetInfo::setArchFeatures (PR #146107)

2025-06-29 Thread David Green via cfe-commits
https://github.com/davemgreen commented: Thanks https://github.com/llvm/llvm-project/pull/146107 ___ 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 flag to specify an alternative to std::forward (PR #138755)

2025-06-29 Thread Baranov Victor via cfe-commits
vbvictor wrote: > I have the issue where I want to test the custom_move and I need check to > pass only for -check-suffix=,MOVEFUNCTION and fail for everything else, since > it still expects ::std::move. I am not sure how to write this. You can create a separate file `missing-std-forward-custo

[clang] [llvm] AMDGPU: Implement intrinsic/builtins for gfx1250 load transpose instructions (PR #146289)

2025-06-29 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/146289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic (PR #127394)

2025-06-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/127394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1f5f381 - AMDGPU: Implement intrinsic/builtins for gfx1250 load transpose instructions (#146289)

2025-06-29 Thread via cfe-commits
Author: Changpeng Fang Date: 2025-06-29T14:33:31-07:00 New Revision: 1f5f38192090f16273e56d2c49837cb28572f4db URL: https://github.com/llvm/llvm-project/commit/1f5f38192090f16273e56d2c49837cb28572f4db DIFF: https://github.com/llvm/llvm-project/commit/1f5f38192090f16273e56d2c49837cb28572f4db.diff

[clang] [llvm] AMDGPU: Implement intrinsic/builtins for gfx1250 load transpose instructions (PR #146289)

2025-06-29 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng closed https://github.com/llvm/llvm-project/pull/146289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Lukas Döllerer via cfe-commits
https://github.com/Lukasdoe updated https://github.com/llvm/llvm-project/pull/146230 From cf1c0ca649741cefdab0eb1538dff58aeee16b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=B6llerer?= Date: Sat, 28 Jun 2025 21:53:09 +0200 Subject: [PATCH] [LLVM][WebAssembly] Implement branch hinting

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Lukas Döllerer via cfe-commits
Lukasdoe wrote: Changes: - Added branch hinting section parser to wasm2yaml - Threshold setting parameters are now floats - Fixed all other things aengelke found https://github.com/llvm/llvm-project/pull/146230 ___ cfe-commits mailing list cfe-commits@

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Lukas Döllerer via cfe-commits
@@ -0,0 +1,79 @@ +; RUN: llc -mcpu=mvp -filetype=obj %s -mattr=+branch-hinting -wasm-branch-prob-high=0x6000 -wasm-branch-prob-low=0x0 -o - | obj2yaml | FileCheck %s + +; This test checks that branch weight metadata (!prof) is correctly translated to webassembly branch hint

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-29 Thread Lukas Döllerer via cfe-commits
@@ -697,6 +738,34 @@ void WebAssemblyAsmPrinter::emitInstruction(const MachineInstr *MI) { WebAssemblyMCInstLower MCInstLowering(OutContext, *this); MCInst TmpInst; MCInstLowering.lower(MI, TmpInst); +if (Subtarget->hasBranchHinting() && +MI->getOpcode(

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-06-29 Thread via cfe-commits
@@ -2660,6 +2644,122 @@ void X86AsmPrinter::emitCallInstruction(const llvm::MCInst &MCI) { OutStreamer->emitInstruction(MCI, getSubtargetInfo()); } +// Checks whether a NOP is required after a CALL and inserts the NOP, if +// necessary. +void X86AsmPrinter::maybeEmitNopAfte

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-29 Thread via cfe-commits
https://github.com/MythreyaK updated https://github.com/llvm/llvm-project/pull/146258 >From a839ba01fc05750ca880ac430a70f7df766f7694 Mon Sep 17 00:00:00 2001 From: Mythreya Kuricheti Date: Sat, 28 Jun 2025 19:06:06 -0700 Subject: [PATCH 1/2] [clang] skip explicit obj param in code complete Ski

[clang] [llvm] AMDGPU: support s_monitor_sleep on gfx1250 (PR #146293)

2025-06-29 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng created https://github.com/llvm/llvm-project/pull/146293 None >From d6f55a31a5b9cc0716149424e219d219c2970d0c Mon Sep 17 00:00:00 2001 From: Changpeng Fang Date: Sun, 29 Jun 2025 16:03:46 -0700 Subject: [PATCH] AMDGPU: support s_monitor_sleep on gfx1250 Co-Authored

[clang] [llvm] AMDGPU: support s_monitor_sleep on gfx1250 (PR #146293)

2025-06-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Changpeng Fang (changpeng) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/146293.diff 8 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsAMDGPU.def (+1) - (modified) clang/test/CodeGenOpenCL/builtins-am

[clang] [llvm] AMDGPU: support s_monitor_sleep on gfx1250 (PR #146293)

2025-06-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Changpeng Fang (changpeng) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/146293.diff 8 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsAMDGPU.def (+1) - (modified) clang/test/CodeGenOpenCL/bu

  1   2   3   >