[clang] [CIR] Implement NotEqualOp for ComplexType (PR #146129)

2025-07-01 Thread Henrich Lauko via cfe-commits
@@ -1319,6 +1319,9 @@ def CmpOp : CIR_Op<"cmp", [Pure, SameTypeOperands]> { `cir.bool` result. The kinds of comparison available are: [lt,gt,ge,eq,ne] +Note: The 'complex' dialect has separate complex.eq and complex.neq +operations + xlauko wro

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-01 Thread Changpeng Fang via cfe-commits
@@ -621,6 +621,32 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Function *F = CGM.getIntrinsic(IID, {LoadTy}); return Builder.CreateCall(F, {Addr}); } + case AMDGPU::BI__builtin_amdgcn_tensor_load_to_lds: + case AMDGPU::BI__builtin_amdg

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-07-01 Thread Rana Pratap Reddy via cfe-commits
ranapratap55 wrote: > If the idea here is to remove the need for > https://github.com/ROCm/llvm-project/blob/amd-staging/amd/device-libs/ockl/src/base-image-intrinsics.ll > and > https://github.com/ROCm/llvm-project/blob/amd-staging/amd/device-libs/ockl/src/extended-image-intrinsics.ll > then

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-01 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng edited https://github.com/llvm/llvm-project/pull/146636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-07-01 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: This broke building C++ modules for mingw targets. Repro: `empty.cppm`: ```c++ export module empty; ``` ```console $ clang -target x86_64-windows-gnu -x c++-module empty.cppm -c -o empty.cppm.obj -std=gnu++23 error: invalid value 'seh' in '-exception-model=seh' ``` https://git

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-01 Thread Changpeng Fang via cfe-commits
@@ -621,6 +621,32 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Function *F = CGM.getIntrinsic(IID, {LoadTy}); return Builder.CreateCall(F, {Addr}); } + case AMDGPU::BI__builtin_amdgcn_tensor_load_to_lds: + case AMDGPU::BI__builtin_amdg

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

2025-07-01 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/146230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] WebAssembly: Stop changing MCAsmInfo's ExceptionsType based on flags (PR #146343)

2025-07-01 Thread Heejin Ahn via cfe-commits
aheejin wrote: > > And it was a little confusing that the PR description argues we should > > remove `-wasm-enable-eh/sjlj` options, which disagree, when the code seems > > to fix something else. Those flags control behaviors, not exception models, > > so we still need them. For example, someo

[clang] [llvm] WebAssembly: Stop changing MCAsmInfo's ExceptionsType based on flags (PR #146343)

2025-07-01 Thread Matt Arsenault via cfe-commits
@@ -1,4 +1,4 @@ -# RUN: llc -mtriple=wasm32-unknown-unknown -wasm-use-legacy-eh -exception-model=wasm -mattr=+exception-handling -run-pass wasm-cfg-stackify %s -o - | FileCheck %s +# RUN: llc -mtriple=wasm32-unknown-unknown -wasm-use-legacy-eh -wasm-enable-sjlj -exception-model

[clang] [llvm] WebAssembly: Stop changing MCAsmInfo's ExceptionsType based on flags (PR #146343)

2025-07-01 Thread Heejin Ahn via cfe-commits
@@ -1,4 +1,4 @@ -# RUN: llc -mtriple=wasm32-unknown-unknown -wasm-use-legacy-eh -exception-model=wasm -mattr=+exception-handling -run-pass wasm-cfg-stackify %s -o - | FileCheck %s +# RUN: llc -mtriple=wasm32-unknown-unknown -wasm-use-legacy-eh -wasm-enable-sjlj -exception-model

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-01 Thread Matt Arsenault via cfe-commits
@@ -4280,6 +4281,20 @@ bool AMDGPUAsmParser::validateMIMGD16(const MCInst &Inst) { return true; } +bool AMDGPUAsmParser::validateTensorR128(const MCInst &Inst) { + const unsigned Opc = Inst.getOpcode(); + const MCInstrDesc &Desc = MII.get(Opc); + + if ((Desc.TSFlags & SI

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-01 Thread Matt Arsenault via cfe-commits
@@ -621,6 +621,32 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Function *F = CGM.getIntrinsic(IID, {LoadTy}); return Builder.CreateCall(F, {Addr}); } + case AMDGPU::BI__builtin_amdgcn_tensor_load_to_lds: + case AMDGPU::BI__builtin_amdg

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

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

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-01 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: Fix clang-format error https://github.com/llvm/llvm-project/pull/146636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-07-01 Thread Heejin Ahn via cfe-commits
@@ -2608,6 +2612,21 @@ void WebAssemblyCFGStackify::rewriteDepthImmediates(MachineFunction &MF) { Stack.push_back(std::make_pair(&MBB, &MI)); break; + case WebAssembly::BR_IF: { +// this is the last place where we can easily calculate the branch +

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

2025-07-01 Thread Heejin Ahn via cfe-commits
@@ -2608,6 +2612,21 @@ void WebAssemblyCFGStackify::rewriteDepthImmediates(MachineFunction &MF) { Stack.push_back(std::make_pair(&MBB, &MI)); break; + case WebAssembly::BR_IF: { +// this is the last place where we can easily calculate the branch +

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

2025-07-01 Thread Heejin Ahn via cfe-commits
@@ -5276,6 +5276,8 @@ def mtail_call : Flag<["-"], "mtail-call">, Group; def mno_tail_call : Flag<["-"], "mno-tail-call">, Group; def mwide_arithmetic : Flag<["-"], "mwide-arithmetic">, Group; def mno_wide_arithmetic : Flag<["-"], "mno-wide-arithmetic">, Group; +def mbranch_

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

2025-07-01 Thread Heejin Ahn via cfe-commits
@@ -2562,8 +2565,9 @@ void WebAssemblyCFGStackify::rewriteDepthImmediates(MachineFunction &MF) { MO = MachineOperand::CreateImm(getDelegateDepth(Stack, MO.getMBB())); else if (MI.getOpcode() == WebAssembly::RETHROW) MO = MachineOperand::CreateImm(ge

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

2025-07-01 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/146230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-07-01 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin commented: Thanks! So far I've only read the CFG parts and feature-adding parts, but some comments: https://github.com/llvm/llvm-project/pull/146230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [TableGen] Use range-based for loops (NFC) (PR #146626)

2025-07-01 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/146626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f4b938b - [TableGen] Use range-based for loops (NFC) (#146626)

2025-07-01 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-07-01T22:50:11-07:00 New Revision: f4b938b7c0ec9c3a60614abc0788f5ca43eaccf5 URL: https://github.com/llvm/llvm-project/commit/f4b938b7c0ec9c3a60614abc0788f5ca43eaccf5 DIFF: https://github.com/llvm/llvm-project/commit/f4b938b7c0ec9c3a60614abc0788f5ca43eaccf5.diff L

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #146622)

2025-07-01 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/146622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Drop const from a return type (NFC) (PR #146623)

2025-07-01 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/146623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 838b91d - [clangd] Drop const from a return type (NFC) (#146623)

2025-07-01 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-07-01T22:49:56-07:00 New Revision: 838b91d7f6838a447e7869e63a9493bf77bc0a6d URL: https://github.com/llvm/llvm-project/commit/838b91d7f6838a447e7869e63a9493bf77bc0a6d DIFF: https://github.com/llvm/llvm-project/commit/838b91d7f6838a447e7869e63a9493bf77bc0a6d.diff L

[clang] 7b4dbb4 - [Sema] Remove an unnecessary cast (NFC) (#146622)

2025-07-01 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-07-01T22:49:48-07:00 New Revision: 7b4dbb4f37d8d40f48df6092fe54503a491eb3c2 URL: https://github.com/llvm/llvm-project/commit/7b4dbb4f37d8d40f48df6092fe54503a491eb3c2 DIFF: https://github.com/llvm/llvm-project/commit/7b4dbb4f37d8d40f48df6092fe54503a491eb3c2.diff L

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-01 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cl,cpp,h -- clang/test/CodeGenOpenCL/builtins-amdgcn-gfx1250

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Changpeng Fang (changpeng) Changes --- Patch is 42.91 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/146636.diff 20 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsA

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-mc Author: Changpeng Fang (changpeng) Changes --- Patch is 42.91 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/146636.diff 20 Files Affected: - (modified) clang/includ

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-01 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng created https://github.com/llvm/llvm-project/pull/146636 None >From b6aa91862046fdd021e638f0f22e9cbbbfba418f Mon Sep 17 00:00:00 2001 From: Changpeng Fang Date: Tue, 1 Jul 2025 22:41:41 -0700 Subject: [PATCH] AMDGPU: Implement tensor load and store instructions for

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

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Ashwin Banwari (ashwinbanwari) Changes Revival of https://github.com/llvm/llvm-project/pull/146247 which got reverted for broken test. Now that https://github.com/llvm/llvm-project/pull/146461 is merged to allow `extern "C++"` for

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

2025-07-01 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari edited https://github.com/llvm/llvm-project/pull/146635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-07-01 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari created https://github.com/llvm/llvm-project/pull/146635 Revival of https://github.com/llvm/llvm-project/pull/146247. Now that https://github.com/llvm/llvm-project/pull/146461 is merged to allow `extern "C++"` for main, we can merge this change. >From 76bd9279

[clang] [llvm] WebAssembly: Move validation of EH flags to TargetMachine construct time (PR #146634)

2025-07-01 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/146634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] WebAssembly: Move validation of EH flags to TargetMachine construct time (PR #146634)

2025-07-01 Thread Matt Arsenault via cfe-commits
arsenm wrote: * **#146634** https://app.graphite.dev/github/pr/llvm/llvm-project/146634?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/14663

[clang] [llvm] WebAssembly: Move validation of EH flags to TargetMachine construct time (PR #146634)

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-webassembly Author: Matt Arsenault (arsenm) Changes This was enforcing some rules about the combinations of flags at a random point in the IR pass pipeline configuration. This is a module property that should be handled at TargetMachine construct

[clang] [llvm] WebAssembly: Move validation of EH flags to TargetMachine construct time (PR #146634)

2025-07-01 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/146634 This was enforcing some rules about the combinations of flags at a random point in the IR pass pipeline configuration. This is a module property that should be handled at TargetMachine construction time at the lat

[clang] [llvm] WebAssembly: Stop changing MCAsmInfo's ExceptionsType based on flags (PR #146343)

2025-07-01 Thread Matt Arsenault via cfe-commits
arsenm wrote: > And it was a little confusing that the PR description argues we should remove > `-wasm-enable-eh/sjlj` options, which disagree, when the code seems to fix > something else. Those flags control behaviors, not exception models, so we > still need them. For example, someone might

[clang] [clang][bytecode] Add back missing initialize call (PR #146589)

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

[clang] 984c78f - [clang][bytecode] Add back missing initialize call (#146589)

2025-07-01 Thread via cfe-commits
Author: Timm Baeder Date: 2025-07-02T07:15:47+02:00 New Revision: 984c78f27d1475390d9564b099a8550ad494dfd7 URL: https://github.com/llvm/llvm-project/commit/984c78f27d1475390d9564b099a8550ad494dfd7 DIFF: https://github.com/llvm/llvm-project/commit/984c78f27d1475390d9564b099a8550ad494dfd7.diff L

[clang] [llvm] WebAssembly: Stop changing MCAsmInfo's ExceptionsType based on flags (PR #146343)

2025-07-01 Thread Matt Arsenault via cfe-commits
@@ -1,4 +1,4 @@ -# RUN: llc -mtriple=wasm32-unknown-unknown -wasm-use-legacy-eh -exception-model=wasm -mattr=+exception-handling -run-pass wasm-cfg-stackify %s -o - | FileCheck %s +# RUN: llc -mtriple=wasm32-unknown-unknown -wasm-use-legacy-eh -wasm-enable-sjlj -exception-model

[clang] [flang] [Clang] Introduce `--offload-targets` for `-fopenmp-targets` (PR #146594)

2025-07-01 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/146594 >From 8db1344221d36408663b684cd5217a112bbe26fe Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 3 Feb 2025 12:46:27 -0600 Subject: [PATCH 1/2] [Clang] Introduce '--offload-targets' for `-fopenmp-targets`

[clang] [flang] [Clang] Introduce `--offload-targets` for `-fopenmp-targets` (PR #146594)

2025-07-01 Thread Joseph Huber via cfe-commits
@@ -1138,6 +1138,10 @@ def fno_convergent_functions : Flag<["-"], "fno-convergent-functions">, // Common offloading options let Group = offload_Group in { +def offload_targets_EQ : Joined<["--"], "offload-targets=">, jhuber6 wrote: Right, forgot that, thanks

[clang] [flang] [Clang] Introduce `--offload-targets` for `-fopenmp-targets` (PR #146594)

2025-07-01 Thread Joseph Huber via cfe-commits
@@ -116,6 +116,8 @@ def err_drv_cuda_host_arch : Error< "unsupported architecture '%0' for host compilation">; def err_drv_mix_cuda_hip : Error< "mixed CUDA and HIP compilation is not supported">; +def err_drv_mix_offload : Error< jhuber6 wrote: Oh that's

[clang-tools-extra] [clangd] Drop const from a return type (NFC) (PR #146623)

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

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #146622)

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

[clang] [clang-tools-extra] [clang][modules] Serialize `CodeGenOptions` (PR #146422)

2025-07-01 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > How does this patch handle consistency issue? e.g., What if `a.pcm` is > > compiled with `-O0` but the consumer is compiled with `-O1`? I hope we > > won't break such things. > > All `Optimize`, `OptimizeSize` and `NoInlineDefine` were `COMPATIBLE_LANGOPT` > in `LangOpti

[clang] 2a702cd - Driver: Avoid llvm::sys::path::append if resource directory absolute.

2025-07-01 Thread via cfe-commits
Author: Peter Collingbourne Date: 2025-07-01T20:21:51-07:00 New Revision: 2a702cdc38f96989cb41c0b863d977f0d8f4f325 URL: https://github.com/llvm/llvm-project/commit/2a702cdc38f96989cb41c0b863d977f0d8f4f325 DIFF: https://github.com/llvm/llvm-project/commit/2a702cdc38f96989cb41c0b863d977f0d8f4f325

[clang] [TableGen] Use range-based for loops (NFC) (PR #146626)

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/146626.diff 1 Files Affected: - (modified) clang/utils/TableGen/ClangAttrEmitter.cpp (+4-6) ``diff diff --git a/clang/utils/TableG

[clang] [TableGen] Use range-based for loops (NFC) (PR #146626)

2025-07-01 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146626 None >From c60f76a8c5aa9bdb6ba0f08f4a1e479a87761d29 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 30 Jun 2025 11:27:39 -0700 Subject: [PATCH] [TableGen] Use range-based for loops (NFC) --- clan

[clang-tools-extra] [clangd] Drop const from a return type (NFC) (PR #146623)

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes We don't need const on a return type. --- Full diff: https://github.com/llvm/llvm-project/pull/146623.diff 1 Files Affected: - (modified) clang-tools-extra/clangd/refactor/tweaks/DefineI

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #146622)

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Since both alignment and Alignment are of the same type, this patch renames alignment to Alignment while removing the cast statement. --- Full diff: https://github.com/llvm/llvm-project/pull/146622.dif

[clang-tools-extra] [clangd] Drop const from a return type (NFC) (PR #146623)

2025-07-01 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146623 We don't need const on a return type. >From 2a072761c8f3b14d22e36aae1c84c956a067b59a Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 1 Jul 2025 19:57:31 -0700 Subject: [PATCH] [clangd] Drop const

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #146622)

2025-07-01 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146622 Since both alignment and Alignment are of the same type, this patch renames alignment to Alignment while removing the cast statement. >From 451762e9cc09176fecbcb68ab5d62be53d3807c7 Mon Sep 17 00:00:00 20

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-07-01 Thread Matt Arsenault via cfe-commits
@@ -635,5 +635,66 @@ TARGET_BUILTIN(__builtin_amdgcn_bitop3_b16, "IUi", "nc", "bitop3-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_bf16_f32, "V2yV2yfUiIb", "nc", "f32-to-f16bf16-cvt-sr-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_f16_f32, "V2hV2hfUiIb", "nc", "f32-to-

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: I prefer to change the term "explicit module" in the code to something like `CXX20 module` or `named module` or whatever. Since when I read the term `explicit module` I assumed it is a style to build clang header modules. https://github.com/llvm/llvm-p

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-07-01 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang,libcxx` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/18338 Here is the relevant piece of the b

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

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

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-07-01 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,132 @@ +// RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx90a -S -verify=expected -o - %s arsenm wrote: Needs another semi test for the rejected target case https://github.com/llvm/llvm-project/pull/140210 __

[clang] [llvm] Driver: Avoid llvm::sys::path::append if resource directory absolute. (PR #146449)

2025-07-01 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/146449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-07-01 Thread Matt Arsenault via cfe-commits
@@ -635,5 +635,66 @@ TARGET_BUILTIN(__builtin_amdgcn_bitop3_b16, "IUi", "nc", "bitop3-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_bf16_f32, "V2yV2yfUiIb", "nc", "f32-to-f16bf16-cvt-sr-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_f16_f32, "V2hV2hfUiIb", "nc", "f32-to-

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

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

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-07-01 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: Title mentions type inferring but nothing is type inferring about these https://github.com/llvm/llvm-project/pull/140210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [llvm] [AVR] Handle flash RO data mapped to data space for newer devices (PR #146244)

2025-07-01 Thread Ben Shi via cfe-commits
benshi001 wrote: I do not think this PR is necessary, since there is no bug, I have explained in https://github.com/llvm/llvm-project/issues/146537. https://github.com/llvm/llvm-project/pull/146244 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] 2599a9a - [clang] [modules] Implement P3618R0: Allow attaching main to the global module (#146461)

2025-07-01 Thread via cfe-commits
Author: Ashwin Banwari Date: 2025-07-02T09:52:10+08:00 New Revision: 2599a9aeb543f01cb20e3fdc2713aa8c8cb20fbf URL: https://github.com/llvm/llvm-project/commit/2599a9aeb543f01cb20e3fdc2713aa8c8cb20fbf DIFF: https://github.com/llvm/llvm-project/commit/2599a9aeb543f01cb20e3fdc2713aa8c8cb20fbf.diff

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-07-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/146461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-07-01 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-arm64-windows-msvc` running on `linaro-armv8-windows-msvc-01` while building `clang` at step 7 "test-build-unified-tree-check-flang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/207/builds/32

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

2025-07-01 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Came up with a different approach: I moved the check to PopExpressionEvaluationContext(). This required annotating the ExpressionEvaluationContextRecord to indicate we're handling a variable initializer. https://github.com/llvm/llvm-project/pull/144970 __

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

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

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

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

[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #146553)

2025-07-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,562 @@ +// RUN: %check_clang_tidy -std=c++11 -check-suffix=11 %s misc-use-constexpr %t -- -- -fno-delayed-template-parsing +// RUN: %check_clang_tidy -std=c++14 -check-suffix=11,14 %s misc-use-constexpr %t -- -- -fno-delayed-template-parsing +// RUN: %check_clang_tidy

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-07-01 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 01/21] [clang-tidy] Add bugprone-move-shared-pointer-contents chec

[clang] [clang-tools-extra] [clang][modules] Serialize `CodeGenOptions` (PR #146422)

2025-07-01 Thread Ben Langmuir via cfe-commits
@@ -1181,8 +1183,9 @@ class Preprocessor { public: Preprocessor(const PreprocessorOptions &PPOpts, DiagnosticsEngine &diags, - const LangOptions &LangOpts, SourceManager &SM, - HeaderSearch &Headers, ModuleLoader &TheModuleLoader, +

[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #146553)

2025-07-01 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Sorry for the silly docs mistakes, btw. I've updated the docs, added replacement string options, and fixed the `const` keyword removal. https://github.com/llvm/llvm-project/pull/146553 ___ cfe-commits mailing list cfe-commits@lists.l

[clang-tools-extra] [clang-tidy] Switch misc-confusable-identifiers check to a faster algorithm. (PR #130369)

2025-07-01 Thread Richard Smith via cfe-commits
https://github.com/zygoloid closed https://github.com/llvm/llvm-project/pull/130369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] c56c349 - [clang-tidy] Switch misc-confusable-identifiers check to a faster algorithm. (#130369)

2025-07-01 Thread via cfe-commits
Author: Richard Smith Date: 2025-07-01T13:31:46-07:00 New Revision: c56c349d39464d859b0f8655a4502e5c06924b66 URL: https://github.com/llvm/llvm-project/commit/c56c349d39464d859b0f8655a4502e5c06924b66 DIFF: https://github.com/llvm/llvm-project/commit/c56c349d39464d859b0f8655a4502e5c06924b66.diff

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141937 >From 185be04e482344ce2f76eeb02859162e1838150e Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Tue, 27 May 2025 19:36:42 + Subject: [PATCH 1/6] [debuginfo][coro] Emit debug info labels for coro

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-07-01 Thread Bill Wendling via cfe-commits
@@ -3639,6 +3639,64 @@ make the function's CFI jump table canonical. See :ref:`the CFI documentation }]; } +def CFISaltDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +Use ``__attribute__((cfi_salt("")))`` on a function declaration, function ---

[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #146553)

2025-07-01 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Thanks for testing this on your codebase so fast as well. > I got some fixits that do not compile, e.g.: > > ``` > std::erase_if(numbers, [](int n) { > return n % 2 == 0; > }); > ``` > > is changed into > > ``` > std::erase_if(numbers, [](int nconstexpr ) { > return n % 2 == 0

[clang] [llvm] [analyzer] Correct Z3 test cases, fix exposed crashes (PR #146597)

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-support Author: None (vabridgers) Changes PR145731 corrected the analyzer test runner to consider use of z3 when used by testcases, which exposed problems in test cases PR37855.c and crashes in z3-crosscheck.c This chang

[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #146553)

2025-07-01 Thread Julian Schmidt via cfe-commits
5chmidti wrote: > I tried with [ITK](https://github.com/InsightSoftwareConsortium/ITK/) and the > resulting transformation did not compile. > > Many changes were of this form: > > ```diff > -const double Max = 1.0 - Min; > +constexpr double Max = 1.0 - Min; > ``` > > Which is

[clang] [flang] [Clang] Introduce `--offload-targets` for `-fopenmp-targets` (PR #146594)

2025-07-01 Thread Shilei Tian via cfe-commits
shiltian wrote: I see. That makes sense. Worth a release note item. https://github.com/llvm/llvm-project/pull/146594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add `-Gis` option to clang-dxc (PR #146448)

2025-07-01 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. This will have some nuanced differences from what DXC does today because of the differences in granularity of floating point semantic controls in LLVM today vs 3.7. That said, I think this will be conservatively correct and is probably t

[clang-tools-extra] [llvm] [WebAssembly] Fold any/alltrue (setcc x, 0, eq/ne) to [not] any/alltrue x (PR #144741)

2025-07-01 Thread via cfe-commits
https://github.com/badumbatish updated https://github.com/llvm/llvm-project/pull/144741 >From b1154b3be42660c7d9d7b6ea59bb6b59a5eacc94 Mon Sep 17 00:00:00 2001 From: badumbatish Date: Wed, 18 Jun 2025 16:38:11 -0700 Subject: [PATCH 01/12] Precommit missed optimization test for #50142 --- .../

[clang] [flang] [Clang] Introduce `--offload-targets` for `-fopenmp-targets` (PR #146594)

2025-07-01 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I see. That makes sense. Worth a release note item. This is just an alias, doesn't do what I want it to do yet. Struggling with how to maintain current semantics without hacking spaghetti code all over the place. Figured this was something I could pull out to make that smoothe

[clang] [flang] [Clang] Introduce `--offload-targets` for `-fopenmp-targets` (PR #146594)

2025-07-01 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/146594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/141937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Adrian Vogelsgesang via cfe-commits
@@ -0,0 +1,148 @@ +; Tests that we add DILabels for the suspend points. +; +; We check both the generated LLVM: +; RUN: opt < %s -passes='cgscc(coro-split)' -S | FileCheck %s +; +; And the debug info: +; RUN: opt < %s -passes='cgscc(coro-split),coro-cleanup' \ +; RUN: | llc -O0

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-07-01 Thread Damian Andrei via cfe-commits
@@ -25,14 +25,19 @@ enum CXStringFlag { /// CXString contains a 'const char *' that it doesn't own. CXS_Unmanaged, - /// CXString contains a 'const char *' that it allocated with malloc(). - CXS_Malloc, + /// CXString contains a 'CStringImpl' that it allocated with mall

[clang] ac76e4d - [Serialization] Use SourceLocation::UIntTy for the offset type, NFC

2025-07-01 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2025-07-01T22:33:23+02:00 New Revision: ac76e4d8a9aedc23123571b3801684babb78424f URL: https://github.com/llvm/llvm-project/commit/ac76e4d8a9aedc23123571b3801684babb78424f DIFF: https://github.com/llvm/llvm-project/commit/ac76e4d8a9aedc23123571b3801684babb78424f.diff LO

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Adrian Vogelsgesang via cfe-commits
@@ -0,0 +1,148 @@ +; Tests that we add DILabels for the suspend points. +; +; We check both the generated LLVM: +; RUN: opt < %s -passes='cgscc(coro-split)' -S | FileCheck %s +; +; And the debug info: +; RUN: opt < %s -passes='cgscc(coro-split),coro-cleanup' \ +; RUN: | llc -O0

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141937 >From 185be04e482344ce2f76eeb02859162e1838150e Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Tue, 27 May 2025 19:36:42 + Subject: [PATCH 1/6] [debuginfo][coro] Emit debug info labels for coro

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/141937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #146553)

2025-07-01 Thread Thomas Schenker via cfe-commits
schenker wrote: I got some fixits that do not compile, e.g.: ``` std::erase_if(numbers, [](int n) { return n % 2 == 0; }); ``` is changed into ``` std::erase_if(numbers, [](int nconstexpr ) { return n % 2 == 0; }); ``` https://github.com/llvm/llvm-project/pull/146553

[clang] [flang] [Clang] Introduce '--offload-targets' for `-fopenmp-targets` (PR #146594)

2025-07-01 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/146594 >From c8e633a2384760c2c6d5b56f3de6cdf9b8ebde7e Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 3 Feb 2025 12:46:27 -0600 Subject: [PATCH] [Clang] Introduce '--offload-targets' for `-fopenmp-targets` Summ

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Adrian Vogelsgesang via cfe-commits
@@ -2344,11 +2344,15 @@ void ModuleBitcodeWriter::writeDILocalVariable( void ModuleBitcodeWriter::writeDILabel( const DILabel *N, SmallVectorImpl &Record, unsigned Abbrev) { - Record.push_back((uint64_t)N->isDistinct()); + uint64_t IsArtificialFlag = uint64_t(N->isArt

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/141937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Adrian Vogelsgesang via cfe-commits
@@ -2240,14 +2242,28 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata( break; } case bitc::METADATA_LABEL: { -if (Record.size() != 5) +if (Record.size() < 5 || Record.size() > 7) return error("Invalid record"); IsDistinct = Record[0]

[clang] [llvm] [analyzer] Correct Z3 test cases, fix exposed crashes (PR #146597)

2025-07-01 Thread via cfe-commits
https://github.com/vabridgers created https://github.com/llvm/llvm-project/pull/146597 PR145731 corrected the analyzer test runner to consider use of z3 when used by testcases, which exposed problems in test cases PR37855.c and crashes in z3-crosscheck.c This change fixes those crashes and re-

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Adrian Vogelsgesang via cfe-commits
@@ -715,6 +715,7 @@ static void printExtendedName(raw_ostream &OS, const DINode *Node, Res = V->getName(); Line = V->getLine(); } else if (const auto *L = dyn_cast(Node)) { +// XXX what are we doing here? Adjust it? vogelsgesang wrote: yes. I ca

  1   2   3   4   5   >