[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-07 Thread Fraser Cormack via cfe-commits
@@ -2942,6 +2942,65 @@ void tools::addHIPRuntimeLibArgs(const ToolChain &TC, Compilation &C, } } +void tools::addOpenCLBuiltinsLib(const Driver &D, + const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgString

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-07 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/146503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8315167 - [Driver][RISCV] Fix incorrect compiler-rt path override in BareMetal toolchain after RISCVToolChain removal (#146849)

2025-07-07 Thread via cfe-commits
Author: Garvit Gupta Date: 2025-07-07T16:54:42+05:30 New Revision: 8315167a76e4d229fd2e6b77a646a4ed7e744489 URL: https://github.com/llvm/llvm-project/commit/8315167a76e4d229fd2e6b77a646a4ed7e744489 DIFF: https://github.com/llvm/llvm-project/commit/8315167a76e4d229fd2e6b77a646a4ed7e744489.diff

[clang] [Driver][RISCV] Fix incorrect compiler-rt path override in BareMetal toolchain after RISCVToolChain removal (PR #146849)

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

[clang] [clang-tools-extra] [ASTMatchers][NFC] Replace `makeMatcher` function with CTAD (PR #147197)

2025-07-07 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/147197 >From c9da8d946b867fb6e095cefee44388f240c28c28 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Sun, 6 Jul 2025 08:32:49 -0700 Subject: [PATCH 1/2] [ASTMatchers][NFC] Replace `makeMatcher` function with

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-07 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/146503 >From b41b2032fdb01bd91d32255bf22a94315b58a017 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 30 Jun 2025 10:59:02 +0100 Subject: [PATCH 1/7] [libclc] Place libclc files in clang's resource dir --

[clang] [llvm] [AMDGPU] Add support for `v_tanh_bf16` on gfx1250 (PR #147425)

2025-07-07 Thread Matt Arsenault via cfe-commits
@@ -13658,6 +13658,7 @@ bool SITargetLowering::isCanonicalized(Register Reg, const MachineFunction &MF, case Intrinsic::amdgcn_frexp_mant: case Intrinsic::amdgcn_fdot2: case Intrinsic::amdgcn_trig_preop: +case Intrinsic::amdgcn_tanh: arsenm wro

[clang] [llvm] [AMDGPU] Add support for `v_tanh_bf16` on gfx1250 (PR #147425)

2025-07-07 Thread Matt Arsenault via cfe-commits
@@ -700,7 +700,8 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { break; } case Intrinsic::amdgcn_sqrt: - case Intrinsic::amdgcn_rsq: { + case Intrinsic::amdgcn_rsq: + case Intrinsic::amdgcn_tanh: { arsenm wrote: Thi

[clang] [libcxx] [clang] Fix -Wuninitialized for values passed by const pointers (PR #147221)

2025-07-07 Thread Igor Kudrin via cfe-commits
@@ -453,7 +450,7 @@ void ClassifyRefs::VisitCallExpr(CallExpr *CE) { const auto *UO = dyn_cast(Ex); if (UO && UO->getOpcode() == UO_AddrOf) Ex = UO->getSubExpr(); - classify(Ex, Ignore); + classify(Ex, Use); igorkudrin wrote: Than

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

2025-07-07 Thread via cfe-commits
Author: Eli Friedman Date: 2025-07-07T23:35:10-07:00 New Revision: 071765749a70b22fb62f2efc07a3f242ff5b4c52 URL: https://github.com/llvm/llvm-project/commit/071765749a70b22fb62f2efc07a3f242ff5b4c52 DIFF: https://github.com/llvm/llvm-project/commit/071765749a70b22fb62f2efc07a3f242ff5b4c52.diff

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

2025-07-07 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/146288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Extend SourceLocation to 64 bits. (PR #147292)

2025-07-07 Thread Haojian Wu via cfe-commits
hokein wrote: > Why is this a new review? What changed from the last one I looked at? Ah, right -- this patch is actually derived from the previous one, and it is simpler. That older patch became a bit outdated since some of its changes were split out and already landed in main. I found it eas

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-07 Thread Shunsuke Watanabe via cfe-commits
@@ -3409,3 +3409,30 @@ StringRef tools::parseMRecipOption(clang::DiagnosticsEngine &Diags, return Out; } + +std::string tools::ComplexRangeKindToStr(LangOptions::ComplexRangeKind Range) { s-watanabe314 wrote: Thank you for the review. I have corrected the

[clang] [cir-translate] Fix crash issue where the data layout string is missing (PR #147209)

2025-07-07 Thread Andy Kaylor via cfe-commits
@@ -82,12 +85,17 @@ llvm::LogicalResult prepareCIRModuleDataLayout(mlir::ModuleOp mod, // Data layout is fully determined by the target triple. Here we only pass the // triple to get the data layout. + llvm::IntrusiveRefCntPtr diagID( + new clang::DiagnosticIDs); +

[clang] 968410f - [libclang] Add missing dllexport annotation (#147108)

2025-07-07 Thread via cfe-commits
Author: Tomohiro Kashiwada Date: 2025-07-07T22:49:50+03:00 New Revision: 968410ffd1bacbf540595e0b6d2628ed559098e9 URL: https://github.com/llvm/llvm-project/commit/968410ffd1bacbf540595e0b6d2628ed559098e9 DIFF: https://github.com/llvm/llvm-project/commit/968410ffd1bacbf540595e0b6d2628ed559098e9.

[clang] [PowerPC][NFC] Define new alias for mma accumulate builtins (PR #147106)

2025-07-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/147106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang][Cygwin] Use LLVM_EXPORTED_SYMBOL_FILE (*.def file) for Cygwin (PR #147278)

2025-07-07 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/147278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC][NFC] Define new alias for mma accumulate builtins (PR #147382)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Lei Huang (lei137) Changes Initial clean up in prep for adding more accumulate builtins to clang. --- Full diff: https://github.com/llvm/llvm-project/pull/147382.diff 1 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsPPC.

[clang] [libclang] Add missing dllexport annotation (PR #147108)

2025-07-07 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo closed https://github.com/llvm/llvm-project/pull/147108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement CXXScalarValueInitExpr for ComplexType (PR #147143)

2025-07-07 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147143 >From d8c01a7c98bea2440ab8b704501f7e3efb33549d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 5 Jul 2025 14:27:21 +0200 Subject: [PATCH 1/2] [CIR] Implement CXXScalarValueInitExpr for ComplexType -

[clang] [CIR] Implement CXXScalarValueInitExpr for ComplexType (PR #147143)

2025-07-07 Thread Amr Hesham via cfe-commits
@@ -161,6 +162,17 @@ mlir::Value ComplexExprEmitter::VisitChooseExpr(ChooseExpr *e) { return Visit(e->getChosenSubExpr()); } +mlir::Value +ComplexExprEmitter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *e) { + mlir::Location loc = cgf.getLoc(e->getExprLoc()); + Qu

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/147308 >From 8f1c383f8f84fb636af4a78e0ff504830f9272f5 Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Mon, 7 Jul 2025 17:20:48 +0300 Subject: [PATCH 1/3] [Clang] disallow operator in attribute argument list

[clang] [PowerPC][NFC] Define new alias for mma accumulate builtins (PR #147382)

2025-07-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 created https://github.com/llvm/llvm-project/pull/147382 Initial clean up in prep for adding more accumulate builtins to clang. >From 36d2b8fc61ab67b8d8010e8b33e3e871f8e1c4f2 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Jul 2025 14:53:15 -0500 Subject: [PATCH

[clang] 122afae - [libclang][Cygwin] Use __declspec(dllexport) for libclang on Cygwin (#147122)

2025-07-07 Thread via cfe-commits
Author: Tomohiro Kashiwada Date: 2025-07-07T22:55:53+03:00 New Revision: 122afae10ed28564b64530de571ce8e4ce584b2c URL: https://github.com/llvm/llvm-project/commit/122afae10ed28564b64530de571ce8e4ce584b2c DIFF: https://github.com/llvm/llvm-project/commit/122afae10ed28564b64530de571ce8e4ce584b2c.

[clang] [libclang][Cygwin] Use __declspec(dllexport) for libclang on Cygwin (PR #147122)

2025-07-07 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo closed https://github.com/llvm/llvm-project/pull/147122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Two-pass noreturn inference via CFG for always-throwing functions (PR #147447)

2025-07-07 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 created https://github.com/llvm/llvm-project/pull/147447 This patch adds a new AnalysisBasedWarnings pass that runs right before IssueWarnings: 1. Pass 1 seeds trivial always-throwing functions. 2. Pass 2 performs a fixed-point CFG-based analysis (CheckFallThrough)

[clang] [llvm] [AMDGPU] Add support for `v_tanh_bf16` on gfx1250 (PR #147425)

2025-07-07 Thread Shilei Tian via cfe-commits
@@ -13658,6 +13658,7 @@ bool SITargetLowering::isCanonicalized(Register Reg, const MachineFunction &MF, case Intrinsic::amdgcn_frexp_mant: case Intrinsic::amdgcn_fdot2: case Intrinsic::amdgcn_trig_preop: +case Intrinsic::amdgcn_tanh: shiltian w

[clang] [clang][bytecode] Fix activating nested unions (PR #147338)

2025-07-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/147338 >From 8b42dbd7659ce5e424fb107a0d375f449a8d44a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 7 Jul 2025 18:06:04 +0200 Subject: [PATCH] [clang][bytecode] Fix activating nested unions

[clang] [clang][Sema] Two-pass noreturn inference via CFG for always-throwing functions (PR #147447)

2025-07-07 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/147447 >From 21f0d364933cd59acaa1fb323c1018dbce7c3452 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Mon, 7 Jul 2025 19:02:38 -0700 Subject: [PATCH 1/2] Add logic to suppress noreturn falling for some basic co

[clang] [llvm] [RISCV] Implement Clang Builtins for XAndesPerf Extension (PR #147018)

2025-07-07 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: Should we document this in https://github.com/riscv-non-isa/riscv-c-api-doc/blob/main/src/c-api.adoc? https://github.com/llvm/llvm-project/pull/147018 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [llvm] [AMDGPU] Add support for `v_tanh_bf16` on gfx1250 (PR #147425)

2025-07-07 Thread Shilei Tian via cfe-commits
@@ -13658,6 +13658,7 @@ bool SITargetLowering::isCanonicalized(Register Reg, const MachineFunction &MF, case Intrinsic::amdgcn_frexp_mant: case Intrinsic::amdgcn_fdot2: case Intrinsic::amdgcn_trig_preop: +case Intrinsic::amdgcn_tanh: shiltian w

[clang] [llvm] [AMDGPU] Add support for `v_tanh_bf16` on gfx1250 (PR #147425)

2025-07-07 Thread Shilei Tian via cfe-commits
shiltian wrote: For some reason there is a crash in `llvm/test/CodeGen/AMDGPU/llvm.amdgcn.tanh.ll`. ``` LLVM ERROR: Cannot select: t28: ch = store<(store (s16) into %ir.out.load, addrspace 1)> t0, t27, t30, undef:i64 t27: i16 = bitcast t21 t21: bf16 = llvm.amdgcn.tanh TargetConstant:i64<

[libclc] [libclc] Declare workitem built-ins in clc, move ptx-nvidiacl workitem built-ins into clc (PR #144333)

2025-07-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,22 @@ +//===--===// +// +// 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

[libclc] [libclc] Declare workitem built-ins in clc, move ptx-nvidiacl workitem built-ins into clc (PR #144333)

2025-07-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,22 @@ +//===--===// +// +// 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] 6efa366 - [Clang][NFC] Avoid copies by using std::move (#146960)

2025-07-07 Thread via cfe-commits
Author: Shafik Yaghmour Date: 2025-07-07T17:53:45-07:00 New Revision: 6efa366b43686bd8b1ec509e589752535507866e URL: https://github.com/llvm/llvm-project/commit/6efa366b43686bd8b1ec509e589752535507866e DIFF: https://github.com/llvm/llvm-project/commit/6efa366b43686bd8b1ec509e589752535507866e.dif

[libclc] [libclc] Declare workitem built-ins in clc, move ptx-nvidiacl workitem built-ins into clc (PR #144333)

2025-07-07 Thread Wenju He via cfe-commits
wenju-he wrote: > > > Perhaps we need a stripped down OpenCL header, like > > > `clc/opencl/opencl-base.h` which includes just the types and macro defs? > > > > > > See #146840 for an example of this approach. > > thanks @frasercrmck I'll update OpenCL headers of this PR after #146840 is > l

[clang] [Clang][NFC] Avoid copies by using std::move (PR #146960)

2025-07-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/146960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Add missing intrinsicis vrgatherei16/vslideup/vslidedown support for Zvfbfmin (PR #146309)

2025-07-07 Thread Jim Lin via cfe-commits
https://github.com/tclin914 closed https://github.com/llvm/llvm-project/pull/146309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Two-pass noreturn inference via CFG for always-throwing functions (PR #147447)

2025-07-07 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/147447 >From 21f0d364933cd59acaa1fb323c1018dbce7c3452 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Mon, 7 Jul 2025 19:02:38 -0700 Subject: [PATCH 1/3] Add logic to suppress noreturn falling for some basic co

[clang] Report wider source range for unsafe buffers warnings (PR #147363)

2025-07-07 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: This change needs a release note. Please add an entry to `clang/docs/ReleaseNotes.rst` in the section the most adapted to the change, and referencing any Github issue this change fixes. Thanks! https://github.com/llvm/llvm-project/pull/147363 ___

[clang] [Clang] Fix template arguments collection for out-of-line declarations (PR #147463)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes We were using the lexical DC as the starting point of template argument collection when comparing declarations. This caused an issue that template arguments from out-of-line declarations are ignored when sub

[clang] [Clang] Fix template arguments collection for out-of-line declarations (PR #147463)

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

[clang] [clang] Consistently handle consteval constructors for variables. (PR #144970)

2025-07-07 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144970 >From b1f7402423af22b0ea8cdf0b3d3734bcce68a636 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 19 Jun 2025 18:29:49 -0700 Subject: [PATCH 1/2] [clang] Consistently handle consteval constructors for

[clang] [llvm] [AMDGPU] Add alignment attr & propagate alignment through make.buffer.rsrc inst (PR #145278)

2025-07-07 Thread via cfe-commits
https://github.com/Shoreshen updated https://github.com/llvm/llvm-project/pull/145278 >From 888df5412b37bd3f232bdb38c9f89786d042fe75 Mon Sep 17 00:00:00 2001 From: shore <372660...@qq.com> Date: Mon, 23 Jun 2025 14:12:15 +0800 Subject: [PATCH 1/6] Add alignment attr & propagate alignment through

[clang] [RISCV] Correct type lowering of struct of fixed-vector array in VLS (PR #147173)

2025-07-07 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/147173 >From 1934543b7ec215312eebefd152f7c9151c2d0e54 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Sat, 5 Jul 2025 21:32:28 -0700 Subject: [PATCH 1/2] [RISCV] Correct type lowering of struct of fixed-vector array i

[clang] [RISCV] Correct type lowering of struct of fixed-vector array in VLS (PR #147173)

2025-07-07 Thread Brandon Wu via cfe-commits
@@ -441,98 +441,74 @@ bool RISCVABIInfo::detectVLSCCEligibleStruct(QualType Ty, unsigned ABIVLen, // __attribute__((vector_size(64))) int d; // } // - // Struct of 1 fixed-length vector is passed as a scalable vector. - // Struct of >1 fixed-length vectors are pa

[clang] [RISCV] Correct type lowering of struct of fixed-vector array in VLS (PR #147173)

2025-07-07 Thread Brandon Wu via cfe-commits
@@ -441,98 +441,74 @@ bool RISCVABIInfo::detectVLSCCEligibleStruct(QualType Ty, unsigned ABIVLen, // __attribute__((vector_size(64))) int d; // } // - // Struct of 1 fixed-length vector is passed as a scalable vector. - // Struct of >1 fixed-length vectors are pa

[clang] [clang-tools-extra] [clang] Extend SourceLocation to 64 bits. (PR #147292)

2025-07-07 Thread Chuanqi Xu via cfe-commits
@@ -43,17 +46,24 @@ namespace clang { // Macro locations have the top bit set, we rotate by one so it is the low bit. class SourceLocationEncoding { using UIntTy = SourceLocation::UIntTy; - constexpr static unsigned UIntBits = CHAR_BIT * sizeof(UIntTy); static UIntTy en

[clang] [clang-tools-extra] [clang] Extend SourceLocation to 64 bits. (PR #147292)

2025-07-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Have you tested this with google's internal modules test? If yes, then LG. https://github.com/llvm/llvm-project/pull/147292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] 862c2fc - [RISCV] Run mem2reg for riscv-xcvalu-c-api.c and riscv-xcvalu.c. NFC.

2025-07-07 Thread Jim Lin via cfe-commits
Author: Jim Lin Date: 2025-07-08T11:04:10+08:00 New Revision: 862c2fc26eb1611e1c06dccaaa650fc29f2546de URL: https://github.com/llvm/llvm-project/commit/862c2fc26eb1611e1c06dccaaa650fc29f2546de DIFF: https://github.com/llvm/llvm-project/commit/862c2fc26eb1611e1c06dccaaa650fc29f2546de.diff LOG:

<    1   2   3   4   5   6