[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] [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] 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] 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] [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] [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
@@ -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,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,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
@@ -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,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
@@ -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] [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] [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] [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] [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-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] [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-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] [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] 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] [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] [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] 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
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] [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] [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] 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-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-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 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] 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] [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] [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] [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] [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
@@ -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][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] [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] [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-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] [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-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] [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

[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 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] 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][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] [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] 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] [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] [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] 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] [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 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] [HLSL][Sema] Fix Struct Size Calculation containing 16/32 bit scalars (PR #128086)

2025-02-25 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt closed https://github.com/llvm/llvm-project/pull/128086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-25 Thread Shilei Tian via cfe-commits
@@ -7417,7 +7419,7 @@ def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfie def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">, HelpText<"Turn off Type Based Alias Analysis">, MarshallingInfoFlag>; -defm pointer_tbaa: BoolOption<"", "pointer-

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-25 Thread Shilei Tian via cfe-commits
@@ -708,6 +712,34 @@ void amdgpu::getAMDGPUTargetFeatures(const Driver &D, options::OPT_m_amdgpu_Features_Group); } +static unsigned GetFullLTOPartitions(const Driver &D, const ArgList &Args) { + const Arg *A = Args.getLastArg(options::OPT_flto_par

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-25 Thread Shilei Tian via cfe-commits
@@ -708,6 +712,34 @@ void amdgpu::getAMDGPUTargetFeatures(const Driver &D, options::OPT_m_amdgpu_Features_Group); } +static unsigned GetFullLTOPartitions(const Driver &D, const ArgList &Args) { shiltian wrote: ```suggestion static

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-25 Thread Shilei Tian via cfe-commits
@@ -708,6 +712,34 @@ void amdgpu::getAMDGPUTargetFeatures(const Driver &D, options::OPT_m_amdgpu_Features_Group); } +static unsigned GetFullLTOPartitions(const Driver &D, const ArgList &Args) { + const Arg *A = Args.getLastArg(options::OPT_flto_par

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

2025-02-25 Thread Aaron Puchert via cfe-commits
@@ -2294,6 +2309,11 @@ void BuildLockset::VisitReturnStmt(const ReturnStmt *S) { FunctionExitFSet, RetVal, ReturnType->getPointeeType().isConstQualified() ? AK_Read : AK_Written, POK_ReturnByRef); + } else if (ReturnType->isPointerType()) {

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

2025-02-25 Thread Aaron Puchert via cfe-commits
@@ -142,9 +145,19 @@ int main(void) { (void)(get_value(b_) == 1); mutex_unlock(foo_.mu_); + a_ = 0; // expected-warning{{writing variable 'a_' requires holding mutex 'foo_.mu_'}} + __WRITE_ONCE(a_, 0); // expected-warning{{writing variable 'a_' requires holding mutex '

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

2025-02-25 Thread Aaron Puchert via cfe-commits
@@ -4944,6 +4949,14 @@ class Foo { (*datap2_)[0] = 0;// expected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}} data_(); // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}} + +// Calls

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

2025-02-25 Thread Aaron Puchert via cfe-commits
@@ -4955,13 +4968,18 @@ class Foo { //showDataCell(*datap2_); // xpected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}} int a = data_[0]; // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}} + +(v

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

2025-02-25 Thread Aaron Puchert via cfe-commits
@@ -528,6 +529,9 @@ for a period of time, after which they are migrated into the standard analysis. * ``-Wthread-safety-beta``: New features. Off by default. + + ``-Wthread-safety-pointer``: Checks when passing or returning pointers to +guarded variables, or pointers

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

2025-02-25 Thread Aaron Puchert via cfe-commits
@@ -1795,9 +1795,22 @@ void ThreadSafetyAnalyzer::checkPtAccess(const FactSet &FSet, const Expr *Exp, // Pass by reference warnings are under a different flag. aaronpuchert wrote: "reference/pointer" 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
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/127396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-25 Thread Aaron Puchert via cfe-commits
@@ -1780,6 +1782,14 @@ void ThreadSafetyAnalyzer::checkPtAccess(const FactSet &FSet, const Expr *Exp, Exp = CE->getSubExpr(); continue; } +if (const auto *UO = dyn_cast(Exp)) { + if (UO->getOpcode() == UO_AddrOf) { +// Pointer access via pointe

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

2025-02-25 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/128589 ___ 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 via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From c6a732cb59340adfc045196c9c27ad9b2227c377 Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH 1/2] [clang-tidy] Fix invalid fixit from modernize-use-ranges

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

2025-02-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/128792 >From 235ef9e23a314f8946b48143294da367b80f7d14 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 25 Feb 2025 12:31:08 -0800 Subject: [PATCH 1/2] [CIR] Upstream basic alloca and load support This change i

[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``:

[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] [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] 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] [memprof] Add memprof options as a clang frontend flag (PR #128615)

2025-02-25 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg updated https://github.com/llvm/llvm-project/pull/128615 >From fa0202169af23419c4bcbf66eabd1beb6b6e8e34 Mon Sep 17 00:00:00 2001 From: Ellis Hoag Date: Mon, 24 Feb 2025 17:57:48 -0800 Subject: [PATCH 1/2] [memprof] Add memprof options clang frontend flag --- clang/i

[clang] 59cee03 - Generalize creduce-clang-crash.py script to look for cvise (#128592)

2025-02-25 Thread via cfe-commits
Author: Reid Kleckner Date: 2025-02-25T13:59:26-08:00 New Revision: 59cee030fb9b8be7ee0a89964ead5120d029deb4 URL: https://github.com/llvm/llvm-project/commit/59cee030fb9b8be7ee0a89964ead5120d029deb4 DIFF: https://github.com/llvm/llvm-project/commit/59cee030fb9b8be7ee0a89964ead5120d029deb4.diff

[clang] Generalize creduce-clang-crash.py script to look for cvise (PR #128592)

2025-02-25 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/128592 ___ 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
@@ -0,0 +1,35 @@ +# RUN: not llvm-mc -triple=riscv32 -mattr=+experimental-xqccmp -M no-aliases -show-encoding < %s 2>&1 \ +# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s + +# CHECK-ERROR: error: invalid operand for instruction +qc.cm.mvsa01 a1, a2 + +# CHECK-ERROR: error:

[clang] [WebAssembly] Generate invokes with llvm.wasm.(re)throw (PR #128105)

2025-02-25 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/128105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 40566fd - [WebAssembly] Generate invokes with llvm.wasm.(re)throw (#128105)

2025-02-25 Thread via cfe-commits
Author: Heejin Ahn Date: 2025-02-25T14:12:35-08:00 New Revision: 40566fd674d110185e2d5e72e320369bfab63ede URL: https://github.com/llvm/llvm-project/commit/40566fd674d110185e2d5e72e320369bfab63ede DIFF: https://github.com/llvm/llvm-project/commit/40566fd674d110185e2d5e72e320369bfab63ede.diff LO

[clang] [clang] Ignore GCC 11 `[[malloc(x)]]` attribute (PR #68059)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -2064,13 +2064,87 @@ static void handleTLSModelAttr(Sema &S, Decl *D, const ParsedAttr &AL) { static void handleRestrictAttr(Sema &S, Decl *D, const ParsedAttr &AL) { QualType ResultType = getFunctionOrMethodResultType(D); - if (ResultType->isAnyPointerType() || ResultT

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

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

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Deric Cheung via cfe-commits
@@ -0,0 +1,71 @@ +; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s + +; CHECK: %dx.types.i32c = type { i32, i1 } + +define noundef i32 @test_UAddc(i32 noundef %a, i32 noundef %b) { +; CHECK-LABEL: define noundef i32 @test_UAddc( +

[clang] [llvm] [RISCV][MC] Add assembler support for XRivosVisni (PR #128773)

2025-02-25 Thread Craig Topper via cfe-commits
@@ -10,6 +10,46 @@ // //===--===// +class RVInstVXI funct6, RISCVVFormat opv, dag outs, dag ins, +string opcodestr, string argstr> +: RVInst { + bits<5> imm; + bits<5> rs1; + bits<5> vd

<    1   2   3   4   5   >