[libclc] [libclc] Move sqrt to CLC library (PR #128748)

2025-02-25 Thread Fraser Cormack via cfe-commits
@@ -21,19 +21,17 @@ */ #if __CLC_FPSIZE == 64 -#define __CLC_NAN __builtin_nan("") -#define ZERO 0.0 +#define __CLC_NAN DBL_NAN #elif __CLC_FPSIZE == 32 -#define __CLC_NAN NAN -#define ZERO 0.0f +#define __CLC_NAN FLT_NAN #elif __CLC_FPSIZE == 16 -#define __CLC_NAN (half)NA

[clang] [clang] Implement instantiation context note for checking template parameters (PR #126088)

2025-02-25 Thread via cfe-commits
@@ -5294,10 +5294,14 @@ def err_template_missing_args : Error< "%select{class template|function template|variable template|alias template|" "template template parameter|concept|template}0 %1 requires template " "arguments">; -def err_template_arg_list_different_arity : Er

[clang] [Clang] Fix an integer overflow issue in computing CTAD's parameter depth (PR #128704)

2025-02-25 Thread Haojian Wu via cfe-commits
hokein wrote: > > Need to add a release note as it fixes an existing issue. > > Do you think we need a backport? If so, we can add the release note in the > backport PR This is not a regression, but we have a change in clang20 which exposes this issue in the assertion-build clang. I'd prefer

[clang] Don't generate SEH scopes for noexcept functions (PR #128839)

2025-02-25 Thread Maurice Heumann via cfe-commits
momo5502 wrote: FunctionCanThrow is copied from CGCoroutine.cpp https://github.com/llvm/llvm-project/pull/128839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-25 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. sorry for the delayed turn around, lgtm! https://github.com/llvm/llvm-project/pull/125988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-25 Thread kadir çetinkaya via cfe-commits
@@ -380,30 +381,114 @@ llvm::SmallVector getAllRequiredModules(ProjectModules &MDB, return ModuleNames; } +class CachingProjectModules : public ProjectModules { +public: + CachingProjectModules(const GlobalCompilationDatabase &CDB) : CDB(CDB) {} + + std::vector getRequire

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-25 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/125988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Don't generate SEH scopes for noexcept functions (PR #128839)

2025-02-25 Thread Maurice Heumann via cfe-commits
https://github.com/momo5502 created https://github.com/llvm/llvm-project/pull/128839 This fixes #93251 >From 36931d9d2a4d50ac363a1b2de123909eacfb72a6 Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Wed, 26 Feb 2025 08:37:04 +0100 Subject: [PATCH] Don't generate SEH scopes for noexcept fun

[clang] 2015626 - [Clang] Implement CWG2918 'Consideration of constraints for address of overloaded function' (#127773)

2025-02-25 Thread via cfe-commits
Author: Younan Zhang Date: 2025-02-26T15:34:06+08:00 New Revision: 2015626783aa7510ccdf6098f2112417cf56a8d0 URL: https://github.com/llvm/llvm-project/commit/2015626783aa7510ccdf6098f2112417cf56a8d0 DIFF: https://github.com/llvm/llvm-project/commit/2015626783aa7510ccdf6098f2112417cf56a8d0.diff

[clang] [Clang] Implement CWG2918 'Consideration of constraints for address of overloaded function' (PR #127773)

2025-02-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/127773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2918 'Consideration of constraints for address of overloaded function' (PR #127773)

2025-02-25 Thread Younan Zhang via cfe-commits
zyn0217 wrote: I'll merge it as-is now - post review comments are welcome https://github.com/llvm/llvm-project/pull/127773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-25 Thread Sudharsan Veeravalli via cfe-commits
svs-quic wrote: Could you please add an entry in the release notes for this? https://github.com/llvm/llvm-project/pull/127694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Check dtor instance pointers for active-ness (PR #128732)

2025-02-25 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/128732 >From 87209d26acf78f2566a7d1e9fd6dee7f455b4e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 25 Feb 2025 17:14:36 +0100 Subject: [PAT

[clang] [clang][bytecode] Check dtor instance pointers for active-ness (PR #128732)

2025-02-25 Thread Timm Baeder via cfe-commits
@@ -504,4 +504,39 @@ namespace AnonymousUnion { static_assert(return_init_all().a.p == 7); // both-error {{}} \ // both-note {{read of member 'p' of union with no active member}} } + +namespace InactiveDestroy { + struct A { +

[clang] [clang][bytecode] Fix initing incomplete arrays from ImplicitValueIni… (PR #128729)

2025-02-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/128729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Add missing LLVM_PREFERRED_TYPE to bitfield (PR #128740)

2025-02-25 Thread Timm Baeder via cfe-commits
tbaederr wrote: > LGTM but please add a more detailed summary something along the lines of > `Added LLVM_PREFERRED_TYPE to InUnion field of InlineDescriptor` would be > sufficient. Does this help at all? The patch is pretty obvious and I don't think it clears things up if I explain a single-l

[clang] 3f64899 - [clang][bytecode] Fix initing incomplete arrays from ImplicitValueIni… (#128729)

2025-02-25 Thread via cfe-commits
Author: Timm Baeder Date: 2025-02-26T08:14:00+01:00 New Revision: 3f648992bf317a3496c4d137374d2c1532423d1c URL: https://github.com/llvm/llvm-project/commit/3f648992bf317a3496c4d137374d2c1532423d1c DIFF: https://github.com/llvm/llvm-project/commit/3f648992bf317a3496c4d137374d2c1532423d1c.diff L

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/128446 >From c8eda8b9192cf4bdad4121063336beeb14cbe689 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Sun, 23 Feb 2025 16:47:18 -0800 Subject: [PATCH 1/7] Initial commit --- .../DependencyScanning/ModuleDepCollecto

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisim (Simulation Hint) extension (PR #128833)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Sudharsan Veeravalli (svs-quic) Changes This extension adds 10 instructions that provide hints to the interface simulation environment. The current spec can be found at: https://github.com/quic/riscv-unified-db/releases/ This patc

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121115 >From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 25 Dec 2024 14:22:10 -0800 Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisim (Simulation Hint) extension (PR #128833)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Sudharsan Veeravalli (svs-quic) Changes This extension adds 10 instructions that provide hints to the interface simulation environment. The current spec can be found at: https://github.com/quic/riscv-unified-db/releases/ This pa

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisim (Simulation Hint) extension (PR #128833)

2025-02-25 Thread Sudharsan Veeravalli via cfe-commits
https://github.com/svs-quic created https://github.com/llvm/llvm-project/pull/128833 This extension adds 10 instructions that provide hints to the interface simulation environment. The current spec can be found at: https://github.com/quic/riscv-unified-db/releases/ This patch adds assembler o

[clang] [verify] Improve the error messages with multiple active prefixes (PR #126068)

2025-02-25 Thread Mészáros Gergely via cfe-commits
Maetveis wrote: Ping @MaskRay @AaronBallman I thought you might be interested in reviewing since you reviewed https://reviews.llvm.org/D154688. https://github.com/llvm/llvm-project/pull/126068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [Clang][CodeGen] Fix crash when using bool vector in compound assignment (PR #75435)

2025-02-25 Thread Chenyang Gao via cfe-commits
cygao90 wrote: Hi, sorry for the late response. I haven't tested this yet, but this pr is old, I will close it. Feel free to submit a new PR to fix this issue. https://github.com/llvm/llvm-project/pull/75435 ___ cfe-commits mailing list cfe-commits@li

[clang] [Clang][CodeGen] Fix crash when using bool vector in compound assignment (PR #75435)

2025-02-25 Thread Chenyang Gao via cfe-commits
https://github.com/cygao90 closed https://github.com/llvm/llvm-project/pull/75435 ___ 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 invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-25 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ping me if you want to merge it. https://github.com/llvm/llvm-project/pull/127162 ___ 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 invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-25 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/127162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-25 Thread A. Jiang via cfe-commits
@@ -0,0 +1,646 @@ +// -*- 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

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-25 Thread A. Jiang via cfe-commits
@@ -69,7 +69,7 @@ "`LWG4074 `__","``compatible-joinable-ranges`` is underconstrained","2024-06 (St. Louis)","","","" "`LWG4076 `__","``concat_view`` should be freestanding","2024-06 (St. Louis)","","","" "`LWG4079

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-25 Thread A. Jiang via cfe-commits
@@ -0,0 +1,646 @@ +// -*- 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

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-25 Thread Fangrui Song via cfe-commits
@@ -1702,6 +1703,37 @@ static uint8_t getOsAbi(const Triple &t) { } } +// Check if an archive file is a thin archive. +static bool isThinArchive(Ctx &ctx, StringRef archiveFilePath) { + const size_t thinArchiveMagicLen = sizeof(ThinArchiveMagic) - 1; + + ErrorOr> memBuffer

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-25 Thread Sam Elliott via cfe-commits
@@ -141,9 +141,38 @@ class RISCVMachineFunctionInfo : public MachineFunctionInfo { // We cannot use fixed locations for the callee saved spill slots if the // function uses a varargs save area. // TODO: Use a separate placement for vararg registers to enable Zcmp.

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-25 Thread Sam Elliott via cfe-commits
@@ -120,12 +144,7 @@ bool RISCVPushPopOpt::runOnMachineFunction(MachineFunction &Fn) { // If Zcmp extension is not supported, abort. const RISCVSubtarget *Subtarget = &Fn.getSubtarget(); - if (!Subtarget->hasStdExtZcmp()) -return false; - - // If frame pointer elimi

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-25 Thread Craig Topper via cfe-commits
@@ -120,12 +144,7 @@ bool RISCVPushPopOpt::runOnMachineFunction(MachineFunction &Fn) { // If Zcmp extension is not supported, abort. const RISCVSubtarget *Subtarget = &Fn.getSubtarget(); - if (!Subtarget->hasStdExtZcmp()) -return false; - - // If frame pointer elimi

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-25 Thread Craig Topper via cfe-commits
@@ -783,6 +783,54 @@ void RISCVFrameLowering::allocateStack(MachineBasicBlock &MBB, } } +static bool isPush(unsigned Opcode) { + switch (Opcode) { + case RISCV::CM_PUSH: + case RISCV::QC_CM_PUSH: + case RISCV::QC_CM_PUSHFP: +return true; + default: +return fals

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-25 Thread Craig Topper via cfe-commits
@@ -783,6 +783,54 @@ void RISCVFrameLowering::allocateStack(MachineBasicBlock &MBB, } } +static bool isPush(unsigned Opcode) { + switch (Opcode) { + case RISCV::CM_PUSH: + case RISCV::QC_CM_PUSH: + case RISCV::QC_CM_PUSHFP: +return true; + default: +return fals

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-25 Thread Craig Topper via cfe-commits
@@ -141,9 +141,38 @@ class RISCVMachineFunctionInfo : public MachineFunctionInfo { // We cannot use fixed locations for the callee saved spill slots if the // function uses a varargs save area. // TODO: Use a separate placement for vararg registers to enable Zcmp.

[clang] [clang] more useful error message for decomposition declaration missing initializer (PR #127924)

2025-02-25 Thread via cfe-commits
https://github.com/kbrav edited https://github.com/llvm/llvm-project/pull/127924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/128731 >From 6f8c6d152033505db6f6b1f8a424c01fcfc05c0d Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Mon, 24 Feb 2025 23:07:05 -0800 Subject: [PATCH 1/7] [RISCV] Add Xqccmp Assembly Support Xqccmp is a new spec by Qu

[clang] [llvm] [mlir] [NVPTX] Convert vector function nvvm.annotations to attributes (PR #127736)

2025-02-25 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/127736 >From b637f2a9142aa9493e78f8d6e05b692b7175c123 Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Wed, 19 Feb 2025 02:26:23 + Subject: [PATCH 1/3] [NVPTX] Convert vector function nvvm.annotations to attr

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/128731 >From 6f8c6d152033505db6f6b1f8a424c01fcfc05c0d Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Mon, 24 Feb 2025 23:07:05 -0800 Subject: [PATCH 1/6] [RISCV] Add Xqccmp Assembly Support Xqccmp is a new spec by Qu

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang Author: Sam Elliott (lenary) Changes This adds support for Xqccmp to the following passes: - Prolog Epilog Insertion - reusing much of the existing push/pop logic, but extending it to cope with frame pointers an

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -0,0 +1,82 @@ +//===--===// +// +// 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: Apac

[clang] [clang-format] Don't break before *const (PR #128817)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #28919 --- Full diff: https://github.com/llvm/llvm-project/pull/128817.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+2-1) - (modified) clang/unittests/Format/FormatTest

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/128166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-25 Thread Matt Arsenault via cfe-commits
@@ -2352,6 +2353,22 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { Value *Src = Visit(const_cast(E)); llvm::Type *SrcTy = Src->getType(); llvm::Type *DstTy = ConvertType(DestTy); + +// FIXME: this is a gross but seemingly necessary workaround for an

[clang] [clang-format] Don't break before *const (PR #128817)

2025-02-25 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/128817 Fixes #28919 >From 3ca7f64c1165fbbf93f1715a80b4a9fbbb7d245f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 25 Feb 2025 20:43:25 -0800 Subject: [PATCH] [clang-format] Don't break before *const Fixes #28919 -

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-25 Thread Matt Arsenault via cfe-commits
arsenm wrote: > I think it's reasonable and we should probably get this in before the release > window. The release branch reverted the original offending patch, so we don't need this or the other follow up patches https://github.com/llvm/llvm-project/pull/128166

[clang] [Clang] Fix an integer overflow issue in computing CTAD's parameter depth (PR #128704)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes There were some cases where we computed incorrect template parameter depths for synthesized CTAD, invalid as they might be, we still shouldn't crash anyway. Technically the only scenario in which the inner f

[clang] [Clang] Fix an integer overflow issue in computing CTAD's parameter depth (PR #128704)

2025-02-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/128704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix an integer overflow issue in computing CTAD's parameter depth (PR #128704)

2025-02-25 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > Need to add a release note as it fixes an existing issue. Do you think we need a backport? If so, we can add the release note in the backport PR https://github.com/llvm/llvm-project/pull/128704 ___ cfe-commits mailing list cfe-commit

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -0,0 +1,128 @@ +//===--===// +// +// 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] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -0,0 +1,128 @@ +//===--===// +// +// 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] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -75,3 +110,34 @@ mlir::Value CIRGenFunction::emitScalarExpr(const Expr *e) { return ScalarExprEmitter(*this, builder).Visit(const_cast(e)); } + +// Emit code for an explicit or implicit cast. Implicit +// casts have to handle a more broad range of conversions than explic

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -0,0 +1,82 @@ +//===--===// +// +// 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: Apac

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -0,0 +1,128 @@ +//===--===// +// +// 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] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - | FileCheck %s + +int f1(); erichkeane wrote: Silly question: What is the purpose here for the forward declaration of f1? https://github.com/llvm/llvm-p

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -0,0 +1,76 @@ +//===--===// +// +// 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: Apac

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -0,0 +1,128 @@ +//===--===// +// +// 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] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -0,0 +1,125 @@ +//===--===// +// +// 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] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -0,0 +1,128 @@ +//===--===// +// +// 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] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -0,0 +1,82 @@ +//===--===// +// +// 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: Apac

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -0,0 +1,82 @@ +//===--===// +// +// 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: Apac

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -115,6 +115,149 @@ def ConstantOp : CIR_Op<"const", let hasFolder = 1; } +//===--===// +// AllocaOp +//===--===// + +class AllocaTypesMa

[clang] [llvm] [RISCV] Xqcia 0.4 Spec renamed qc.(sla/sll)sat to qc.(shl/shlu)sat (PR #128710)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM. I edited the description for readability, so please use it as the message when squashing this PR. https://github.com/llvm/llvm-project/pull/128710 ___ cfe-commits mailing list cfe-commits@lis

[clang] [llvm] [RISCV] Xqcia 0.4 Spec renamed qc.(sla/sll)sat to qc.(shl/shlu)sat (PR #128710)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/128710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Sam Elliott (lenary) Changes This adds support for Xqccmp to the following passes: - Prolog Epilog Insertion - reusing much of the existing push/pop logic, but extending it to cope with frame pointers and reorder the CFI information

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Sam Elliott (lenary) Changes This adds support for Xqccmp to the following passes: - Prolog Epilog Insertion - reusing much of the existing push/pop logic, but extending it to cope with frame pointers and reorder the CFI information correctl

[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)

2025-02-25 Thread Craig Topper via cfe-commits
@@ -68,7 +68,7 @@ class RISCVTargetInfo : public TargetInfo { return TargetInfo::VoidPtrBuiltinVaList; } - std::string_view getClobbers() const override { return ""; } + std::string_view getClobbers() const override { return "~{vl},~{vtype}"; } topperc

[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)

2025-02-25 Thread Craig Topper via cfe-commits
topperc wrote: > Even for these rare cases, the user can achieve the same effect if they put > `vl/vtype` into clobbered registers explicitly. They can, but will they? clobbers are a relatively uncommon feature I suspect many people don't know about it. I think maybe we need documentation of

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121115 >From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 25 Dec 2024 14:22:10 -0800 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)

2025-02-25 Thread Hank Chang via cfe-commits
@@ -68,7 +68,7 @@ class RISCVTargetInfo : public TargetInfo { return TargetInfo::VoidPtrBuiltinVaList; } - std::string_view getClobbers() const override { return ""; } + std::string_view getClobbers() const override { return "~{vl},~{vtype}"; } HankCha

[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)

2025-02-25 Thread Hank Chang via cfe-commits
https://github.com/HankChang736 updated https://github.com/llvm/llvm-project/pull/128636 >From d7718e9ed9f03990895f0d89b87808d8c96bb67c Mon Sep 17 00:00:00 2001 From: Hank Chang Date: Sun, 23 Feb 2025 23:59:23 +0800 Subject: [PATCH 1/2] [RISCV] Mark {vl, vtype} as clobber in inline assembly Th

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/128446 >From c8eda8b9192cf4bdad4121063336beeb14cbe689 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Sun, 23 Feb 2025 16:47:18 -0800 Subject: [PATCH 1/6] Initial commit --- .../DependencyScanning/ModuleDepCollecto

[clang] [clang-format] Allow breaking before kw___attribute (PR #128623)

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

[clang] 8fc8a84 - [clang-format] Allow breaking before kw___attribute (#128623)

2025-02-25 Thread via cfe-commits
Author: Owen Pan Date: 2025-02-25T19:44:54-08:00 New Revision: 8fc8a84e23471fe56214e68706addc712b5a2949 URL: https://github.com/llvm/llvm-project/commit/8fc8a84e23471fe56214e68706addc712b5a2949 DIFF: https://github.com/llvm/llvm-project/commit/8fc8a84e23471fe56214e68706addc712b5a2949.diff LOG:

[clang] [llvm] [RISCV] Xqcia 0.4 Spec renamed qc.(sla/sll)sat to qc.(shl/shlu)sat (PR #128710)

2025-02-25 Thread Sudharsan Veeravalli via cfe-commits
https://github.com/svs-quic approved this pull request. LGTM. Please remove "[RISCV] Xqcia 0.4 Spec renamed qc.(sla/sll)sat to qc.(shl/shlu)sat" from the commit message body before merging. https://github.com/llvm/llvm-project/pull/128710 ___ cfe-comm

[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)

2025-02-25 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: > I think what @wangpc-pp advocated here (please correct me if I'm wrong) was > that user should be responsible annotating these registers as clobbered so > that we have more freedom on scheduling when the inline assembly is not using > any vector instructions. While other app

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

2025-02-25 Thread Matt Arsenault via cfe-commits
@@ -21,19 +21,17 @@ */ #if __CLC_FPSIZE == 64 -#define __CLC_NAN __builtin_nan("") -#define ZERO 0.0 +#define __CLC_NAN DBL_NAN #elif __CLC_FPSIZE == 32 -#define __CLC_NAN NAN -#define ZERO 0.0f +#define __CLC_NAN FLT_NAN #elif __CLC_FPSIZE == 16 -#define __CLC_NAN (half)NA

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

2025-02-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/128748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] more useful error message for decomposition declaration missing initializer (PR #127924)

2025-02-25 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Please provide more details than a link to the github issue. The summary is what goes in the git log and folks downstream often use git log as a first line in analyzing issues. Summaries w/o detailed summary are not useful. https://github.com/llvm/llvm-proj

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121115 >From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 25 Dec 2024 14:22:10 -0800 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-25 Thread Vitaly Buka via cfe-commits
@@ -214,13 +214,14 @@ Available checks are: the wrong dynamic type, or that its lifetime has not begun or has ended. Incompatible with ``-fno-rtti``. Link must be performed by ``clang++``, not ``clang``, to make sure C++-specific parts of the runtime library and

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-25 Thread via cfe-commits
@@ -1702,6 +1703,37 @@ static uint8_t getOsAbi(const Triple &t) { } } +// Check if an archive file is a thin archive. +static bool isThinArchive(Ctx &ctx, StringRef archiveFilePath) { + const size_t thinArchiveMagicLen = sizeof(ThinArchiveMagic) - 1; + + ErrorOr> memBuffer

[clang] [clang-cl] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--fmodule-output` (PR #121046)

2025-02-25 Thread Chuanqi Xu via cfe-commits
@@ -6097,10 +6097,29 @@ const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA, } llvm::PrettyStackTraceString CrashInfo("Computing output path"); + // Output to a user requested destination? if (AtTopLevel && !isa(JA) && !isa(JA)) { -if (Arg

[clang] [clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (2nd attempt) (PR #127406)

2025-02-25 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: f378e52ed3c6f8da4973f97f1ef043c2eb0da721 https://github.com/llvm/llvm-project/actions/runs/13534670364 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-proje

[clang] [clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (2nd attempt) (PR #127406)

2025-02-25 Thread Tom Stellard via cfe-commits
https://github.com/tstellar milestoned https://github.com/llvm/llvm-project/pull/127406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (2nd attempt) (PR #127406)

2025-02-25 Thread Tom Stellard via cfe-commits
tstellar wrote: /cherry-pick f378e52ed3c6f8da4973f97f1ef043c2eb0da721 https://github.com/llvm/llvm-project/pull/127406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Support warning on taking address of guarded variables (PR #123063)

2025-02-25 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: > One thought --- you could consider an attribute that could be put on pointer > arguments to functions that says "yes, I dereference this and read or write > it". GCC [has such an attribute](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-access-f

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-25 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 5bbd811547440e56eb3c2ed387833b41ce6232e3 Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH] [clang-tidy] Fix invalid fixit from modernize-use-ranges for

[clang-tools-extra] [clang-tidy] Fix false negative `modernize-use-ranges` when using getter function (PR #127377)

2025-02-25 Thread via cfe-commits
Andrewyuan34 wrote: ping https://github.com/llvm/llvm-project/pull/127377 ___ 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 negative `modernize-use-ranges` when using getter function (PR #127377)

2025-02-25 Thread via cfe-commits
https://github.com/Andrewyuan34 edited https://github.com/llvm/llvm-project/pull/127377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)

2025-02-25 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: Good question. Which AST nodes could we visit here? Let's see some examples of initializing function pointers/references: ```c++ void f(); void (*fp)() = f; void (*fp2)() = &f; void (*fp3)() = fp; void (&fr)() = f; ``` The (simplified) AST: ``` TranslationUnitDecl 0x55edc6

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-25 Thread via cfe-commits
Andrewyuan34 wrote: > LGTM. since it is just a patch instead of ideal solution for > `std::equality_comparable_with` stuff, could you add some FIXME in code? Thanks for the comment! Already added. https://github.com/llvm/llvm-project/pull/127162 ___

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-25 Thread via cfe-commits
Andrewyuan34 wrote: > Thanks for addressing this. However I think a more general solution is > required (instead of special-casing `std::unique_ptr`/`nullptr`), see > [#124815 > (comment)](https://github.com/llvm/llvm-project/issues/124815#issuecomment-2676753012) Thanks for the comment, I go

[clang] 2db8386 - [HLSL] Implement default constant buffer $Globals (2nd attempt) (#128589)

2025-02-25 Thread via cfe-commits
Author: Helena Kotas Date: 2025-02-25T16:57:07-08:00 New Revision: 2db8386867c5083980ff00bf2eae8937457ab9da URL: https://github.com/llvm/llvm-project/commit/2db8386867c5083980ff00bf2eae8937457ab9da DIFF: https://github.com/llvm/llvm-project/commit/2db8386867c5083980ff00bf2eae8937457ab9da.diff

[clang] [llvm] [mlir] [NVPTX] Convert vector function nvvm.annotations to attributes (PR #127736)

2025-02-25 Thread Alex MacLean via cfe-commits
@@ -5021,6 +5024,36 @@ bool llvm::UpgradeDebugInfo(Module &M) { return Modified; } +static void upgradeNVVMFnVectorAttr(const StringRef Attr, const char DimC, +GlobalValue *GV, const Metadata *V) { + Function *F = cast(GV); + + constexpr

[clang] [llvm] [mlir] [NVPTX] Convert vector function nvvm.annotations to attributes (PR #127736)

2025-02-25 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/127736 >From 5ca8b82e146439453b51f990e4ed43f8bd2838eb Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Wed, 19 Feb 2025 02:26:23 + Subject: [PATCH 1/3] [NVPTX] Convert vector function nvvm.annotations to attr

[clang] Thread Safety Analysis: Improved pointer handling (PR #127396)

2025-02-25 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: I think this looks very good! I just have some minor remarks. Thanks to @aoates for trying this out, this is always appreciated! And sorry for the delay. https://github.com/llvm/llvm-project/pull/127396 ___

[clang] Thread Safety Analysis: Improved pointer handling (PR #127396)

2025-02-25 Thread Aaron Puchert via cfe-commits
@@ -515,7 +515,8 @@ Warning flags + ``-Wthread-safety-analysis``: The core analysis. + ``-Wthread-safety-precise``: Requires that mutex expressions match precisely. This warning can be disabled for code which has a lot of aliases. - + ``-Wthread-safety-reference``:

  1   2   3   4   5   >