[clang] [clang][bytecode] Call CheckLocalLoad in GetLocal (PR #152090)

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

[clang] 8f7dfc6 - [clang][bytecode] Call CheckLocalLoad in GetLocal (#152090)

2025-08-04 Thread via cfe-commits
Author: Timm Baeder Date: 2025-08-05T08:46:22+02:00 New Revision: 8f7dfc689c4750bfffc0c57f2f8f5b69383f747b URL: https://github.com/llvm/llvm-project/commit/8f7dfc689c4750bfffc0c57f2f8f5b69383f747b DIFF: https://github.com/llvm/llvm-project/commit/8f7dfc689c4750bfffc0c57f2f8f5b69383f747b.diff L

[clang] [clang] Use llvm::iterator_range::empty (NFC) (PR #152088)

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

[clang] [clang] Respect [[gnu::error]] on functions passed to [[gnu::cleanup]] (PR #152082)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Vincent (Mr-Anyone) Changes Forward SourceLocation to `EmitCall` so that clang triggers an error when a function inside `[[gnu::cleanup(func)]]` is annotated with `[[gnu::error("some message")]]`. resol

[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)

2025-08-04 Thread Owen Pan via cfe-commits
https://github.com/owenca requested changes to this pull request. It seems that we don't need to add a separate formatting pass for this new option as changing the case of letters in numeric literals has no impact on any existing passes. IMO, the best place to handle this is in `FormatTokenLex

[clang] df3f629 - [clang][bytecode][NFC] Only collect non-null args if we have to (#152074)

2025-08-04 Thread via cfe-commits
Author: Timm Baeder Date: 2025-08-05T07:54:25+02:00 New Revision: df3f6297354b3ea5fa53cc6a9d5464b54aae6f15 URL: https://github.com/llvm/llvm-project/commit/df3f6297354b3ea5fa53cc6a9d5464b54aae6f15 DIFF: https://github.com/llvm/llvm-project/commit/df3f6297354b3ea5fa53cc6a9d5464b54aae6f15.diff L

[clang] [clang] Use llvm::iterator_range::empty (NFC) (PR #152088)

2025-08-04 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/152088 None >From ea033b3a634653f842eb07cf19923e2a09d286c7 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 2 Aug 2025 10:26:39 -0700 Subject: [PATCH] [clang] Use llvm::iterator_range::empty (NFC) --- cl

[clang] [clang] Respect [[gnu::error]] on functions passed to [[gnu::cleanup]] (PR #152082)

2025-08-04 Thread via cfe-commits
https://github.com/Mr-Anyone created https://github.com/llvm/llvm-project/pull/152082 Forward SourceLocation to `EmitCall` so that clang triggers an error when a function inside `[[gnu::cleanup(func)]]` is annotated with `[[gnu::error("some message")]]`. resolves #146520 >From c0fda068d6a178

[clang] [llvm] [RISCV] Support XSfmm C intrinsics (PR #143070)

2025-08-04 Thread Brandon Wu via cfe-commits
@@ -679,6 +685,50 @@ bool SemaRISCV::CheckBuiltinFunctionCall(const TargetInfo &TI, return CheckVSetVL(1, 2); case RISCVVector::BI__builtin_rvv_vsetvlimax: return CheckVSetVL(0, 1); + case RISCVVector::BI__builtin_rvv_sf_vsettnt: + case RISCVVector::BI__builtin_rvv

[clang] [clang][bytecode] Call CheckLocalLoad in GetLocal (PR #152090)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes I forgot to call this here as well. It was only used in the EvalEmitter implementation of the function. Also fix a problem where we didn't diagnose out-of-lifetime reads here. --- Full diff: https://github.

[clang] [clang][bytecode] Call CheckLocalLoad in GetLocal (PR #152090)

2025-08-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/152090 I forgot to call this here as well. It was only used in the EvalEmitter implementation of the function. Also fix a problem where we didn't diagnose out-of-lifetime reads here. >From 1203ec58f331b7a0753be6bbaa

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread Tom Vijlbrief via cfe-commits
@@ -76,26 +76,26 @@ while.end:; preds = %while.body, %entry ret i8 %r.0.lcssa } -define i16 @load16postinc(ptr %x, i16 %y) { +define i16 @load16postinc(ptr %p, i16 %cnt) { ; CHECK-LABEL: load16postinc: ; CHECK: ld {{.*}}, {{[XYZ]}}+

[clang] [clang] Use llvm::iterator_range::empty (NFC) (PR #152088)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/152088.diff 6 Files Affected: - (modified) clang/lib/CodeGen/CGDebugInfo.cpp (+1-1) - (modified) clang/li

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread Tom Vijlbrief via cfe-commits
https://github.com/tomtor edited https://github.com/llvm/llvm-project/pull/152028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread Tom Vijlbrief via cfe-commits
@@ -57,7 +57,8 @@ class LLVM_LIBRARY_VISIBILITY AVRTargetInfo : public TargetInfo { Int16Type = SignedInt; Char32Type = UnsignedLong; SigAtomicType = SignedChar; -resetDataLayout("e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8"); +resetDataLayout( +

[clang] [llvm] [NFC][PowerPC] Cleaning up test file and removing redundant front-end test (PR #151971)

2025-08-04 Thread Tony Varghese via cfe-commits
https://github.com/tonykuttai edited https://github.com/llvm/llvm-project/pull/151971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Only collect non-null args if we have to (PR #152074)

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

[clang] [llvm] [NFC][PowerPC] Cleaning up test file and removing redundant front-end test (PR #151971)

2025-08-04 Thread Tony Varghese via cfe-commits
https://github.com/tonykuttai requested changes to this pull request. LGTM with minor comments to be addressed. https://github.com/llvm/llvm-project/pull/151971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread Tom Vijlbrief via cfe-commits
@@ -0,0 +1,68 @@ +//===- AVRTargetTransformInfo.h - AVR specific TTI -*- 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-Identifier: Apache-2.

[clang] [llvm] [NFC][PowerPC] Cleaning up test file and removing redundant front-end test (PR #151971)

2025-08-04 Thread Tony Varghese via cfe-commits
@@ -7,240 +8,87 @@ ; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple=powerpc-ibm-aix \ ; RUN: < %s | FileCheck %s --check-prefix=POWERPC_32 -define i32 @test_Greater_than(ptr %colauths, i32 signext %ncols) { -; This testcase is manually reduced to isolate the critical cod

[clang] [llvm] [NFC][PowerPC] Cleaning up test file and removing redundant front-end test (PR #151971)

2025-08-04 Thread Tony Varghese via cfe-commits
@@ -7,240 +8,87 @@ ; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple=powerpc-ibm-aix \ ; RUN: < %s | FileCheck %s --check-prefix=POWERPC_32 -define i32 @test_Greater_than(ptr %colauths, i32 signext %ncols) { -; This testcase is manually reduced to isolate the critical cod

[clang] [clang][bytecode][NFC] Only collect non-null args if we have to (PR #152074)

2025-08-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/152074 >From 3bcb6a3d737dfcfe083286be3d664baf7c254ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 5 Aug 2025 06:25:55 +0200 Subject: [PATCH] [clang][bytecode][NFC] Only collect non-null arg

[clang] [clang] Fix crash in dynamic_cast final class optimization (PR #152076)

2025-08-04 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/152076 >From 7af97ae2f3a155920b15f28c2ad4b24f3550b143 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 4 Aug 2025 20:54:46 -0700 Subject: [PATCH] [clang] Fix crash in dynamic_cast final class optimization This cor

[clang] [llvm] [X86] Set .llvmbc and .llvmcmd to exclude sections (PR #151910)

2025-08-04 Thread Fangrui Song via cfe-commits
MaskRay wrote: I think not using SHF_EXCLUDE is an intention design. There are some discussions on https://discourse.llvm.org/t/end-to-end-fembed-bitcode-llvmbc-and-llvmcmd/56265 The concatenated bitcode might allow analysis like https://github.com/travitch/whole-program-llvm (though it doesn

[clang] [clang] Fix crash in dynamic_cast final class optimization (PR #152076)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Oliver Hunt (ojhunt) Changes This corrects the codegen for the final class optimization to correct handle the case where there is no path to perform the cast, and also corrects the codegen to handle ptrauth protected vtable pointe

[clang] [clang] Fix crash in dynamic_cast final class optimization (PR #152076)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes This corrects the codegen for the final class optimization to correct handle the case where there is no path to perform the cast, and also corrects the codegen to handle ptrauth protected vtable pointers. As

[clang] [clang] Fix crash in dynamic_cast final class optimization (PR #152076)

2025-08-04 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/152076 This corrects the codegen for the final class optimization to correct handle the case where there is no path to perform the cast, and also corrects the codegen to handle ptrauth protected vtable pointers. As pa

[clang] c598676 - Fix missing clang changes for #151983 (#152066)

2025-08-04 Thread via cfe-commits
Author: Justin Bogner Date: 2025-08-04T19:14:17-07:00 New Revision: c5986765dc708d682deb2cdf62f5e16df737179b URL: https://github.com/llvm/llvm-project/commit/c5986765dc708d682deb2cdf62f5e16df737179b DIFF: https://github.com/llvm/llvm-project/commit/c5986765dc708d682deb2cdf62f5e16df737179b.diff

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread Ben Shi via cfe-commits
@@ -57,7 +57,8 @@ class LLVM_LIBRARY_VISIBILITY AVRTargetInfo : public TargetInfo { Int16Type = SignedInt; Char32Type = UnsignedLong; SigAtomicType = SignedChar; -resetDataLayout("e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8"); +resetDataLayout( +

[clang] [llvm] [RISCV] Add SpacemiT XSMTVDot (SpacemiT Vector Dot Product) extension. (PR #151706)

2025-08-04 Thread Jim Lin via cfe-commits
@@ -0,0 +1,114 @@ +# RUN: llvm-mc -triple=riscv32 -show-encoding --mattr=+xsmtvdot %s \ +# RUN:| FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+xsmtvdot %s \ +# RUN:| FileCheck %s --check-prefixes=CHE

[clang] [llvm] [RISCV] Add SpacemiT XSMTVDot (SpacemiT Vector Dot Product) extension. (PR #151706)

2025-08-04 Thread Jim Lin via cfe-commits
@@ -1642,6 +1642,14 @@ def HasVendorXAndesVDot AssemblerPredicate<(all_of FeatureVendorXAndesVDot), "'XAndesVDot' (Andes Vector Dot Product Extension)">; +def FeatureVendorXSMTVDot +: RISCVExtension<1, 0, "SpacemiT Vector Dot Product Extensio

[clang] [llvm] [RISCV] Add SpacemiT XSMTVDot (SpacemiT Vector Dot Product) extension. (PR #151706)

2025-08-04 Thread Jim Lin via cfe-commits
tclin914 wrote: Most vendor MC tests, including those for vector, are placed under `llvm/test/MC/RISCV`, except for SiFive’s. https://github.com/llvm/llvm-project/pull/151706 ___ cfe-commits mailing list cfe-commits@

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread Ben Shi via cfe-commits
https://github.com/benshi001 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/152028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread Ben Shi via cfe-commits
@@ -0,0 +1,68 @@ +//===- AVRTargetTransformInfo.h - AVR specific TTI -*- 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-Identifier: Apache-2.

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread Ben Shi via cfe-commits
@@ -57,7 +57,8 @@ class LLVM_LIBRARY_VISIBILITY AVRTargetInfo : public TargetInfo { Int16Type = SignedInt; Char32Type = UnsignedLong; SigAtomicType = SignedChar; -resetDataLayout("e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8"); +resetDataLayout( +

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread Ben Shi via cfe-commits
@@ -76,26 +76,26 @@ while.end:; preds = %while.body, %entry ret i8 %r.0.lcssa } -define i16 @load16postinc(ptr %x, i16 %y) { +define i16 @load16postinc(ptr %p, i16 %cnt) { ; CHECK-LABEL: load16postinc: ; CHECK: ld {{.*}}, {{[XYZ]}}+

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

2025-08-04 Thread Ben Shi via cfe-commits
benshi001 wrote: Currently I put support of new features at a low priority, since arduino still uses gcc-7.3 as its main tool chain. https://github.com/llvm/llvm-project/pull/146244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [llvm] [RISCV] Add SpacemiT XSMTVDot (SpacemiT Vector Dot Product) extension. (PR #151706)

2025-08-04 Thread Craig Topper via cfe-commits
@@ -0,0 +1,141 @@ +//===-- RISCVInstrInfoXSMTVDot.td - SpacemiT Vector Dot Product *- tablegen -*-===// +// +// 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-Identi

[clang] [llvm] [RISCV] Add SpacemiT XSMTVDot (SpacemiT Vector Dot Product) extension. (PR #151706)

2025-08-04 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/151706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add SpacemiT XSMTVDot (SpacemiT Vector Dot Product) extension. (PR #151706)

2025-08-04 Thread Craig Topper via cfe-commits
@@ -0,0 +1,141 @@ +//===-- RISCVInstrInfoXSMTVDot.td - SpacemiT Vector Dot Product *- tablegen -*-===// +// +// 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-Identi

[clang] [llvm] [RISCV] Add SpacemiT XSMTVDot (SpacemiT Vector Dot Product) extension. (PR #151706)

2025-08-04 Thread Craig Topper via cfe-commits
@@ -0,0 +1,141 @@ +//===-- RISCVInstrInfoXSMTVDot.td --*- tablegen -*-===// +// +// 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: Ap

[clang] [llvm] [RISCV] Add SpacemiT XSMTVDot (SpacemiT Vector Dot Product) extension. (PR #151706)

2025-08-04 Thread Craig Topper via cfe-commits
@@ -0,0 +1,141 @@ +//===-- RISCVInstrInfoXSMTVDot.td --*- tablegen -*-===// +// +// 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: Ap

[clang] [llvm] [RISCV] Add SpacemiT XSMTVDot (SpacemiT Vector Dot Product) extension. (PR #151706)

2025-08-04 Thread Min-Yih Hsu via cfe-commits
@@ -531,6 +531,9 @@ The current vendor extensions supported are: ``XAndesVDot`` LLVM implements `version 5.0.0 of the Andes Vector Dot Product Extension specification

[clang] [CIR] Implemented get/set for volatile bitfields (PR #151875)

2025-08-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/24699 Here is the relevant piece of the build log fo

[clang] [llvm] workflows/release-binaries: Enable Windows x86 builds (PR #128274)

2025-08-04 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/128274 >From 2110f92892dd72dfbe1a7d87116faa3693c7c586 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 22 Feb 2025 03:08:24 + Subject: [PATCH 01/14] workflows/release-binaries: Enable Windows x86 builds ---

[clang] [llvm] [AMDGPU] gfx1250 v_wmma_scale[16]_f32_16x16x128_f8f6f4 codegen (PR #152036)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Stanislav Mekhanoshin (rampitec) Changes --- Patch is 174.67 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/152036.diff 14 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsA

[clang] [llvm] [AMDGPU] gfx1250 v_wmma_scale[16]_f32_16x16x128_f8f6f4 codegen (PR #152036)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Stanislav Mekhanoshin (rampitec) Changes --- Patch is 174.67 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/152036.diff 14 Files Affected: - (modified) clang/include/clang/Basic/Bui

[clang] [llvm] [AMDGPU] gfx1250 v_wmma_scale[16]_f32_16x16x128_f8f6f4 codegen (PR #152036)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-analysis Author: Stanislav Mekhanoshin (rampitec) Changes --- Patch is 174.67 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/152036.diff 14 Files Affected: - (modified) clang/include/clang/Basic/Bui

[clang] [llvm] [AMDGPU] gfx1250 v_wmma_scale[16]_f32_16x16x128_f8f6f4 codegen (PR #152036)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Stanislav Mekhanoshin (rampitec) Changes --- Patch is 174.67 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/152036.diff 14 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsAMD

[clang] [llvm] [AMDGPU] gfx1250 v_wmma_scale[16]_f32_16x16x128_f8f6f4 codegen (PR #152036)

2025-08-04 Thread Stanislav Mekhanoshin via cfe-commits
rampitec wrote: * **#152036** https://app.graphite.dev/github/pr/llvm/llvm-project/152036?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/152

[clang] [llvm] [AMDGPU] gfx1250 v_wmma_scale[16]_f32_16x16x128_f8f6f4 codegen (PR #152036)

2025-08-04 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec ready_for_review https://github.com/llvm/llvm-project/pull/152036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce elementwise ctlz/cttz builtins (PR #131995)

2025-08-04 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > That's not what I'm requesting, it would be an undefined value. It is not > instant undefined behavior, you would get UB on use of that value You're creating a lot of work by insisting on this. We don't currently have a definition of what it means to "use" a value in a w

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread Tom Vijlbrief via cfe-commits
tomtor wrote: loop-reduce does not preserve predecrement operations in loops which it cannot optimize. This is a non AVR specific bug/issue, but on architectures with rich addressing modes it is hidden (a scaled index is used on Intel/ARM) and RISCV has no post/pre addressing. In functions wh

[clang] [HLSL][NFC] Move all resource tests under CodeGenHLSL\resources (PR #152035)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes Also removes an outdated test buffer-array-operator.hlsl. Array operator on resources is tested in StructuredBuffers-subscripts.hlsl and RWBuffer-subscript.hlsl. --- Full diff: https://github.com/llvm/llvm-pr

[clang] [HLSL][NFC] Move all resource tests under CodeGenHLSL\resources (PR #152035)

2025-08-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/152035 Also removes an outdated test buffer-array-operator.hlsl. Array operator on resources is tested in StructuredBuffers-subscripts.hlsl and RWBuffer-subscript.hlsl. >From 08da927a2831c304478d3aa2bbefe882c11c61f5 M

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-08-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/134016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Elide suspension points via [[clang::coro_destroyed_on_suspend]] (PR #152029)

2025-08-04 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-08-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. This looks good for me as a first step, but we'll definitely need some of the others to chime in before merging. In general I'd like to see us move towards something that more generic, considering that it seems like SPIRV, NVPTX, and AMDGP

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread Tom Vijlbrief via cfe-commits
https://github.com/tomtor updated https://github.com/llvm/llvm-project/pull/152028 >From c5206367a672d52b6761490b144e0221f8dafcf3 Mon Sep 17 00:00:00 2001 From: Tom Vijlbrief Date: Sun, 3 Aug 2025 09:15:58 +0200 Subject: [PATCH 1/3] Improve AVR loop code generation --- clang/lib/Basic/Targets

[clang] Elide suspension points via [[clang::coro_destroyed_on_suspend]] (PR #152029)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (snarkmaster) Changes See `AttrDocs.td` for the user-facing docs. The immediate motivation was that I noticed that short-circuiting coroutines failed to optimize well. My demo program for lack-of-optimization is here: https://godbol

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- llvm/lib/Target/AVR/AVRTargetTransformInfo.h clang/

[clang] Elide suspension points via [[clang::coro_destroyed_on_suspend]] (PR #152029)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines Author: None (snarkmaster) Changes See `AttrDocs.td` for the user-facing docs. The immediate motivation was that I noticed that short-circuiting coroutines failed to optimize well. My demo program for lack-of-optimization is here: https://g

[clang] Elide suspension points via [[clang::coro_destroyed_on_suspend]] (PR #152029)

2025-08-04 Thread via cfe-commits
https://github.com/snarkmaster updated https://github.com/llvm/llvm-project/pull/152029 >From 78c958db9cb04697696a1d00fd5df7cf6a1e0ea9 Mon Sep 17 00:00:00 2001 From: snarkmaster Date: Sun, 3 Aug 2025 21:22:32 -0700 Subject: [PATCH] Elide suspension points via [[clang::coro_destroyed_on_suspend

[clang] Elide suspension points via [[clang::coro_destroyed_on_suspend]] (PR #152029)

2025-08-04 Thread via cfe-commits
https://github.com/snarkmaster created https://github.com/llvm/llvm-project/pull/152029 See `AttrDocs.td` for the user-facing docs. The immediate motivation was that I noticed that short-circuiting coroutines failed to optimize well. My demo program for lack-of-optimization is here: https://g

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread Tom Vijlbrief via cfe-commits
https://github.com/tomtor updated https://github.com/llvm/llvm-project/pull/152028 >From c5206367a672d52b6761490b144e0221f8dafcf3 Mon Sep 17 00:00:00 2001 From: Tom Vijlbrief Date: Sun, 3 Aug 2025 09:15:58 +0200 Subject: [PATCH 1/2] Improve AVR loop code generation --- clang/lib/Basic/Targets

[clang] [clang][ARM] Fix build failure in for __swp (PR #151354)

2025-08-04 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/151354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Vijlbrief (tomtor) Changes Fix https://github.com/llvm/llvm-project/issues/151080 --- Full diff: https://github.com/llvm/llvm-project/pull/152028.diff 7 Files Affected: - (modified) clang/lib/Basic/Targets/AVR.h (+2-1) - (modified)

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-04 Thread Tom Vijlbrief via cfe-commits
https://github.com/tomtor created https://github.com/llvm/llvm-project/pull/152028 Fix https://github.com/llvm/llvm-project/issues/151080 >From c5206367a672d52b6761490b144e0221f8dafcf3 Mon Sep 17 00:00:00 2001 From: Tom Vijlbrief Date: Sun, 3 Aug 2025 09:15:58 +0200 Subject: [PATCH 1/2] Improv

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

2025-08-04 Thread Bill Wendling via cfe-commits
bwendling wrote: > > You need to realize that submitted this code for review in May. It's like > > that I forgot some of the details of why I wrote something. But what I > > wrote was intentionally put there for a reason. > > There's a new commit. PTAL. > > Honestly, this is a case where I was

[clang] Thread safety analysis: Allocate FactEntrys with BumpPtrAllocator (PR #149660)

2025-08-04 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert closed https://github.com/llvm/llvm-project/pull/149660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a911eee - Thread safety analysis: Allocate FactEntrys with BumpPtrAllocator (#149660)

2025-08-04 Thread via cfe-commits
Author: Aaron Puchert Date: 2025-08-04T22:24:47+02:00 New Revision: a911eee3bc4923fcfa579c9f0b2c08eddff673eb URL: https://github.com/llvm/llvm-project/commit/a911eee3bc4923fcfa579c9f0b2c08eddff673eb DIFF: https://github.com/llvm/llvm-project/commit/a911eee3bc4923fcfa579c9f0b2c08eddff673eb.diff

[clang] [HIP][SPIRV] Implicit `new`/`delete` should be `cdecl` on host (PR #152023)

2025-08-04 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/152023 >From e33787e50ac261d09aa9bcc7b9e25b162abb00d6 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 4 Aug 2025 21:08:56 +0100 Subject: [PATCH 1/2] Prevent spurious CC clashes. --- clang/lib/Sema/SemaExprCXX.cp

[clang] [HIP][SPIRV] Implicit `new`/`delete` should be `cdecl` on host (PR #152023)

2025-08-04 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/lib/Sema/SemaExprCXX.cpp `` View t

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

2025-08-04 Thread Erich Keane via cfe-commits
erichkeane wrote: > You need to realize that submitted this code for review in May. It's like > that I forgot some of the details of why I wrote something. But what I wrote > was intentionally put there for a reason. > > There's a new commit. PTAL. Honestly, this is a case where I was heavily

[clang] [HIP][SPIRV] Implicit `new`/`delete` should be `cdecl` on host (PR #152023)

2025-08-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alex Voicu (AlexVlx) Changes Client apps can (and in the case of the MSVC STL do) set cdecl explicitly on `new` / `delete` implementations. On the other hand, Clang generates implicit decls with the target's default CC. This is problemati

[clang] [HIP][SPIRV] Implicit `new`/`delete` should be `cdecl` on host (PR #152023)

2025-08-04 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx created https://github.com/llvm/llvm-project/pull/152023 Client apps can (and in the case of the MSVC STL do) set cdecl explicitly on `new` / `delete` implementations. On the other hand, Clang generates implicit decls with the target's default CC. This is problematic

[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)

2025-08-04 Thread Andy MacGregor via cfe-commits
30Wedge wrote: > I suggest NumericLiteralCase, Prefix, HexDigit, ExponentLetter, and Suffix > for the option names and Leave, Lower, and Upper for the enum values. I agree. So much more concise. https://github.com/llvm/llvm-project/pull/151590 ___

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

2025-08-04 Thread Bill Wendling via cfe-commits
bwendling wrote: And if you're flagging this for "changes required", please list those changes. https://github.com/llvm/llvm-project/pull/141846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)

2025-08-04 Thread Andy MacGregor via cfe-commits
https://github.com/30Wedge updated https://github.com/llvm/llvm-project/pull/151590 >From 2934f3ade1f585ba527507986d46577254e95e40 Mon Sep 17 00:00:00 2001 From: Andy MacGregor Date: Thu, 31 Jul 2025 16:24:06 -0400 Subject: [PATCH 1/3] [clang-format] Add an option to format integer literal cas

[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)

2025-08-04 Thread Andy MacGregor via cfe-commits
@@ -3558,6 +3558,76 @@ struct FormatStyle { /// \version 9 std::vector NamespaceMacros; + /// Control over each component in a numeric literal. + enum NumericLiteralComponentStyle : int8_t { +/// Leave this component of the literal as is. +NLCS_Leave, +/// Al

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

2025-08-04 Thread Bill Wendling via cfe-commits
bwendling wrote: You need to realize that submitted this code for review in May. It's like that I forgot some of the details of why I wrote something. But what I wrote was intentionally put there for a reason. There's a new commit. PTAL. https://github.com/llvm/llvm-project/pull/141846 __

[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)

2025-08-04 Thread Andy MacGregor via cfe-commits
@@ -0,0 +1,347 @@ +//===--- NumericLiteralCaseFixer.cpp ---*- 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-Identifier: Apache-2

[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)

2025-08-04 Thread Andy MacGregor via cfe-commits
@@ -0,0 +1,347 @@ +//===--- NumericLiteralCaseFixer.cpp ---*- 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-Identifier: Apache-2

[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)

2025-08-04 Thread Andy MacGregor via cfe-commits
@@ -0,0 +1,347 @@ +//===--- NumericLiteralCaseFixer.cpp ---*- 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-Identifier: Apache-2

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

2025-08-04 Thread Bill Wendling via cfe-commits
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() == 0) + return true; + +// Delay if this is not a function type.

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

2025-08-04 Thread Bill Wendling via cfe-commits
bwendling wrote: > Removing my approval-- I thought the changes requested were nits, but amount > of discussion shows that was not true. Wrong. They aren't nits. It's just you lacking a fundamental understanding of the code. Sorry for the confusion, but I wrote the code to avoid ICEs. I don't

[clang] Fix Clang bug that -Wformat-signedness is not reported properly. (PR #150962)

2025-08-04 Thread via cfe-commits
DeanSturtevant1 wrote: @AaronBallman,@karka228,@hazohelet - please - any thoughts? Thanks. - Dean https://github.com/llvm/llvm-project/pull/150962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

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

2025-08-04 Thread Erich Keane via cfe-commits
https://github.com/erichkeane requested changes to this pull request. Removing my approval-- I thought the changes requested were nits, but amount of discussion shows that was not true. https://github.com/llvm/llvm-project/pull/141846 ___ cfe-commits

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

2025-08-04 Thread Erich Keane via cfe-commits
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() == 0) erichkeane wrote: What is 'it' in that sentence?

[clang] [CIR] Implemented get/set for volatile bitfields (PR #151875)

2025-08-04 Thread via cfe-commits
@@ -322,22 +322,27 @@ void CIRGenFunction::emitStoreOfScalar(mlir::Value value, Address addr, assert(!cir::MissingFeatures::opTBAA()); } +/// Helper method to check if the underlying ABI is AAPCS +static bool isAAPCS(const TargetInfo &targetInfo) { Andres-S

[clang] [CIR] Implemented get/set for volatile bitfields (PR #151875)

2025-08-04 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/151875 >From 6ff88bb5ea307ca083bbc408f0d7cc3775ff63ac Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Sun, 3 Aug 2025 12:21:55 -0500 Subject: [PATCH 1/2] [CIR] Implemented get/set for volatile bitfields

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

2025-08-04 Thread Bill Wendling via cfe-commits
https://github.com/bwendling edited https://github.com/llvm/llvm-project/pull/141846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-08-04 Thread Bill Wendling via cfe-commits
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() == 0) bwendling wrote: The code is necessary. If it's n

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

2025-08-04 Thread Bill Wendling via cfe-commits
https://github.com/bwendling deleted https://github.com/llvm/llvm-project/pull/141846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-08-04 Thread Bill Wendling via cfe-commits
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() == 0) bwendling wrote: In fact, it's checked elsewhere,

[clang] [llvm] Trying to fix undefined symbol error caused by iterator variable (PR #141507)

2025-08-04 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: The reason I'm suspicious of the getDeclareMapperVarRef check is that SemaOpenMP::ActOnOMPIteratorExpr creates the variable (VarDecl::Create) regardless. So what's supposed to happen for variables where getDeclareMapperVarRef is false? In

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

2025-08-04 Thread Erich Keane via cfe-commits
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() == 0) erichkeane wrote: AS written, you're assuming an

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-08-04 Thread Nikita Popov via cfe-commits
nikic wrote: > This PR only adds support for the following architectures: x86 - x86_64. > Support for other architectures can be added in future patches. This makes for pretty bad UX. To the degree it is feasible, this should be supported on all arches from day one, at least if a Clang builtin

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

2025-08-04 Thread Bill Wendling via cfe-commits
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() == 0) bwendling wrote: Of course I'm not assuming anyth

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

2025-08-04 Thread Erich Keane via cfe-commits
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() == 0) + return true; + +// Delay if this is not a function type.

  1   2   3   4   5   >