[clang] [clang-tools-extra] [NFC] Explicitly pass a VFS when creating DiagnosticsEngine (PR #115852)

2024-11-21 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-tools-extra,clang` at step 4 "build". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/7342 Here is the relevant pi

[clang] [llvm] [mlir] [LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (PR #116856)

2024-11-21 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm closed https://github.com/llvm/llvm-project/pull/116856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Load function body from the module that gives canonical decl (PR #111992)

2024-11-21 Thread Dmitry Polukhin via cfe-commits
dmpolukhin wrote: I do believe that the issue about ODR violation cannot be caused by this change itself. I suggest merging this PR as is and I'll take a look at the reproducer as soon as you create it. This PR fixes known issues with reproducers so I'm in doubt what makes this change so speci

[clang] [clang][bytecode] Check FromPtr in BitCasttPtr (PR #117142)

2024-11-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/117142 None >From ea7847f4f414e052e0349fe503a2001b930bf22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 21 Nov 2024 12:20:12 +0100 Subject: [PATCH] [clang][bytecode] Check FromPtr in BitCas

[clang] [clang][bytecode] Check FromPtr in BitCasttPtr (PR #117142)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/117142.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.h (+3) - (modified) clang/test/AST/ByteCode/builtin-bit-cast.cpp (+11)

[clang] 1425fa9 - [clang][bytecode] Check FromPtr in BitCastPtr (#117142)

2024-11-21 Thread via cfe-commits
Author: Timm Baeder Date: 2024-11-21T13:21:00+01:00 New Revision: 1425fa915dd4815e10b97373380e049db3a01cd3 URL: https://github.com/llvm/llvm-project/commit/1425fa915dd4815e10b97373380e049db3a01cd3 DIFF: https://github.com/llvm/llvm-project/commit/1425fa915dd4815e10b97373380e049db3a01cd3.diff L

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-21 Thread Nathan Gauër via cfe-commits
@@ -86,6 +86,7 @@ let TargetPrefix = "spv" in { def int_spv_dot4add_i8packed : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; def int_spv_dot4add_u8packed : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i3

[clang] [llvm] [IR] Add TargetExtType::CanBeLocal property (PR #99016)

2024-11-21 Thread Jay Foad via cfe-commits
jayfoad wrote: Ping. This is ready again for review. https://github.com/llvm/llvm-project/pull/99016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-21 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts edited https://github.com/llvm/llvm-project/pull/115902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Add TargetExtType::CanBeLocal property (PR #99016)

2024-11-21 Thread Jay Foad via cfe-commits
@@ -228,6 +228,8 @@ class StructType : public Type { SCDB_NotContainsScalableVector = 32, SCDB_ContainsNonGlobalTargetExtType = 64, SCDB_NotContainsNonGlobalTargetExtType = 128, +SCDB_ContainsNonLocalTargetExtType = 64, +SCDB_NotContainsNonLocalTargetExtType

[clang-tools-extra] a1153cd - Revert "[NFC] Explicitly pass a VFS when creating DiagnosticsEngine (#115852)"

2024-11-21 Thread Sylvestre Ledru via cfe-commits
Author: Sylvestre Ledru Date: 2024-11-21T13:04:30+01:00 New Revision: a1153cd6fedd4c906a9840987934ca4712e34cb2 URL: https://github.com/llvm/llvm-project/commit/a1153cd6fedd4c906a9840987934ca4712e34cb2 DIFF: https://github.com/llvm/llvm-project/commit/a1153cd6fedd4c906a9840987934ca4712e34cb2.dif

[clang] [clang][SME] Ignore flatten for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/116391 >From 90daf9c544bcb776c8a68ad504ba5eda50eafe8a Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Fri, 15 Nov 2024 14:35:41 + Subject: [PATCH 1/2] [clang][SME] Ignore flatten for callees mismatched stream

[clang] Fix redundant macro expansion checks in ASTMatchers (PR #117143)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: mandymi (mandymimi) Changes A performance issue was descibed in #114521 **Root Cause**: The function getExpansionLocOfMacro is responsible for finding the expansion location of macros. When dealing with macro parameters, it recursively

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-21 Thread Nathan Gauër via cfe-commits
@@ -0,0 +1,17 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; CHECK-DAG: %[[#bool:]] = OpTypeBool +; CHECK-DAG: %[[#uint:]]

[clang] [clang-tools-extra] [NFC] Explicitly pass a VFS when creating DiagnosticsEngine (PR #115852)

2024-11-21 Thread Sylvestre Ledru via cfe-commits
sylvestre wrote: I had to revert this for causing this issue with lldb: https://github.com/llvm/llvm-project/issues/117145 https://github.com/llvm/llvm-project/pull/115852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang][SME] Ignore flatten for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > I guess this is fine, then. But please add a note describing the current > situation, so the next person looking at this has context. (Put it in > TargetInfo.h, maybe?) > > LGTM with the note. Thanks :+1: Added a note to `TargetInfo.h` https://github.com/llvm/llvm-project/p

[clang-tools-extra] bdd10d9 - [NFC] Explicitly pass a VFS when creating DiagnosticsEngine (#115852)

2024-11-21 Thread via cfe-commits
Author: kadir çetinkaya Date: 2024-11-21T12:11:41+01:00 New Revision: bdd10d9d249bd1c2a45e3de56a5accd97e953458 URL: https://github.com/llvm/llvm-project/commit/bdd10d9d249bd1c2a45e3de56a5accd97e953458 DIFF: https://github.com/llvm/llvm-project/commit/bdd10d9d249bd1c2a45e3de56a5accd97e953458.dif

[clang] [clang-tools-extra] [NFC] Explicitly pass a VFS when creating DiagnosticsEngine (PR #115852)

2024-11-21 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/115852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in reduce `or` and `xor` function. (PR #116976)

2024-11-21 Thread Simon Pilgrim via cfe-commits
@@ -732,6 +732,10 @@ at the end to the next power of 2. These reductions support both fixed-sized and scalable vector types. +The reduction intrinsics, including ``__builtin_reduce_add``, RKSimon wrote: "integer reduction intrinsics"? https://github.com/llv

[clang] a742741 - [Clang] Handle `[[noreturn]]` constructors in CFG (#115558)

2024-11-21 Thread via cfe-commits
Author: Oleksandr T. Date: 2024-11-21T11:33:11+01:00 New Revision: a7427410dd71072cbd1d44a6f78a08268b19a73b URL: https://github.com/llvm/llvm-project/commit/a7427410dd71072cbd1d44a6f78a08268b19a73b DIFF: https://github.com/llvm/llvm-project/commit/a7427410dd71072cbd1d44a6f78a08268b19a73b.diff

[clang] [Clang] skip warnings for constructors marked with the [[noreturn]] attribute (PR #115558)

2024-11-21 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/115558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-11-21 Thread Ties Stuij via cfe-commits
https://github.com/stuij created https://github.com/llvm/llvm-project/pull/117140 because: - This brings Clang in line with GCC for which this is the default for ARM - It frees up a register, so performance increase, especially on Thumb/6-M - It will decrease code size >From 4a85a0cd98bf328f314

[clang] [clang][bytecode] Handle bitcasts involving bitfields (PR #116843)

2024-11-21 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/116843 >From 7b6b8c76b1438154f07794be4883625da8e9bd03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 8 Nov 2024 14:37:56 +0100 Subject: [PATC

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-11-21 Thread Ties Stuij via cfe-commits
stuij wrote: This change was discussed in the LLVM Embedded Toolchains working group sync up two weeks ago, and at the time people were in agreement that it made sense: https://discourse.llvm.org/t/llvm-embedded-toolchains-working-group-sync-up/63270/73#p-334070-peter-frame-pointers-on-or-off-b

[clang] [AMDGPU] Do not allow the region address space to be converted to generic (PR #117171)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Joseph Huber (jhuber6) Changes Summary: Previous changes relaxed the address space rules based on what the target says about them. This accidentally included the AS(2) region as convertible to generic. Simply check for AS(2) and re

[clang] [clang][bytecode] Add assert to ensure correct state restoration in CallBI function (PR #115496)

2024-11-21 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/115496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Disable graph-trim-interval by default (PR #111843)

2024-11-21 Thread Donát Nagy via cfe-commits
NagyDonat wrote: It turns out that this commit increases the runtime by ~3% on a set of 6-8 open source projects that we used as a benchmark. (The testing was done on our local fork by @gamesh411, he can provide more accurate data if needed.) Based on this, we decided to temporarily disable th

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-11-21 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/115487 >From 5e24d212f797b5fa1b6da1526c807046373d3c21 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 8 Nov 2024 16:13:17 +0200 Subject: [PATCH 1/3] [Clang] skip default argument instantiation for non-definin

[clang] [clang][bytecode] Improve resource management and state restoration in CallBI function (PR #115496)

2024-11-21 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/115496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/116391 >From 90daf9c544bcb776c8a68ad504ba5eda50eafe8a Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Fri, 15 Nov 2024 14:35:41 + Subject: [PATCH 1/4] [clang][SME] Ignore flatten for callees mismatched stream

[clang] [clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Benjamin Maxwell via cfe-commits
@@ -1143,30 +1146,62 @@ void AArch64TargetCodeGenInfo::checkFunctionABI( } } -void AArch64TargetCodeGenInfo::checkFunctionCallABIStreaming( -CodeGenModule &CGM, SourceLocation CallLoc, const FunctionDecl *Caller, -const FunctionDecl *Callee) const { - if (!Caller ||

[clang] [clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Benjamin Maxwell via cfe-commits
@@ -0,0 +1,72 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -emit-llvm -target-feature +sme %s -o - | FileCheck %s MacDue wrote: Done :+1: https://github.com/llvm/llvm-project/pull/116391 ___ cfe-commits mail

[clang-tools-extra] [NFC] Fix uninitialized pointer field. (PR #117173)

2024-11-21 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/117173 None >From 27925c327d9f3164e3ba966ffaed5715681480fd Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Thu, 21 Nov 2024 07:03:46 -0800 Subject: [PATCH] [NFC] Fix uninitialized pointer field. --- clang-

[clang] [clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Benjamin Maxwell via cfe-commits
@@ -1143,30 +1146,62 @@ void AArch64TargetCodeGenInfo::checkFunctionABI( } } -void AArch64TargetCodeGenInfo::checkFunctionCallABIStreaming( -CodeGenModule &CGM, SourceLocation CallLoc, const FunctionDecl *Caller, -const FunctionDecl *Callee) const { - if (!Caller ||

[clang] [clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Sander de Smalen via cfe-commits
@@ -1143,30 +1146,62 @@ void AArch64TargetCodeGenInfo::checkFunctionABI( } } -void AArch64TargetCodeGenInfo::checkFunctionCallABIStreaming( -CodeGenModule &CGM, SourceLocation CallLoc, const FunctionDecl *Caller, -const FunctionDecl *Callee) const { - if (!Caller ||

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-21 Thread Steven Perron via cfe-commits
@@ -0,0 +1,17 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; CHECK-DAG: %[[#bool:]] = OpTypeBool +; CHECK-DAG: %[[#uint:]]

[clang] [Clang] Prevent null dereferences (PR #115502)

2024-11-21 Thread via cfe-commits
https://github.com/smanna12 closed https://github.com/llvm/llvm-project/pull/115502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7b61ff2 - [Clang] Prevent null dereferences (#115502)

2024-11-21 Thread via cfe-commits
Author: smanna12 Date: 2024-11-21T09:15:02-06:00 New Revision: 7b61ff2c263b7122c23783385662f6ff67764352 URL: https://github.com/llvm/llvm-project/commit/7b61ff2c263b7122c23783385662f6ff67764352 DIFF: https://github.com/llvm/llvm-project/commit/7b61ff2c263b7122c23783385662f6ff67764352.diff LOG:

[clang] [Clang] enhance error recovery with RecoveryExpr for trailing commas in call arguments (PR #114684)

2024-11-21 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/114684 >From d95d0fdb22ae2ad162f89cb211f313cea6c6474a Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 2 Nov 2024 23:54:35 +0200 Subject: [PATCH 1/7] [Clang] enhance error recovery with RecoveryExpr for traili

[clang] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)

2024-11-21 Thread via cfe-commits
https://github.com/StefanPaulet updated https://github.com/llvm/llvm-project/pull/117167 >From 54199baf4a6a205e0b85f9f528a90b8170a960fa Mon Sep 17 00:00:00 2001 From: StefanPaulet Date: Thu, 21 Nov 2024 15:32:56 +0200 Subject: [PATCH 1/2] [clang] Allow delayed function instantiation at TU end i

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-21 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: The latest changes https://github.com/llvm/llvm-project/pull/116257/commits/c147f0cd439812114322e4edb72795d848af3d6d may go a bit beyond the scope of this refactoring. I wanted to address the matter raised on this thread https://github.com/llvm/llvm-project/pull/116257#discuss

[clang] [Clang] enhance error recovery with RecoveryExpr for trailing commas in call arguments (PR #114684)

2024-11-21 Thread Oleksandr T. via cfe-commits
@@ -32,6 +32,25 @@ void test_invalid_call(int s) { int var = some_func(undef1); } +int some_func2(int a, int b); +void test_invalid_call_2() { + // CHECK: -RecoveryExpr {{.*}} 'int' contains-errors + // CHECK-NEXT: `-UnresolvedLookupExpr {{.*}} '' lvalue (ADL) = 'some_f

[clang] [Clang] Prevent potential null pointer dereferences (PR #117176)

2024-11-21 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/117176 >From 1b6b411291b4d7cfd830d43609eaddc65b0f2c56 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Thu, 21 Nov 2024 07:25:11 -0800 Subject: [PATCH 1/2] [Clang] Prevent potential null pointer dereferences ---

[clang-tools-extra] [NFC] Fix uninitialized pointer field. (PR #117173)

2024-11-21 Thread Aaron Ballman via cfe-commits
@@ -23,7 +23,7 @@ AST_MATCHER(StringLiteral, isOrdinary) { return Node.isOrdinary(); } } // namespace UseStdPrintCheck::UseStdPrintCheck(StringRef Name, ClangTidyContext *Context) -: ClangTidyCheck(Name, Context), +: ClangTidyCheck(Name, Context), PP(PP),

[clang-tools-extra] [NFC] Fix uninitialized pointer field. (PR #117173)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Zahira Ammarguellat (zahiraam) Changes Non-static class member `PP` is not initialized in this constructor nor in any functions that it calls. --- Full diff: https://github.com/llvm/llvm-project/pull/117173.diff 1 Files Affected:

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-21 Thread Steven Perron via cfe-commits
@@ -3158,6 +3172,166 @@ bool SPIRVInstructionSelector::selectFirstBitHigh(Register ResVReg, } } +bool SPIRVInstructionSelector::selectFirstBitLow16(Register ResVReg, + const SPIRVType *ResType, +

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-21 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/116858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC] Fix uninitialized pointer field. (PR #117173)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Zahira Ammarguellat (zahiraam) Changes Non-static class member `PP` is not initialized in this constructor nor in any functions that it calls. --- Full diff: https://github.com/llvm/llvm-project/pull/117173.diff 1 Files Aff

[clang] [clang][bytecode] Initialize bases when bitcasting (PR #117179)

2024-11-21 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/117179 None >From 30d56c5522516e1d4b3fdb69c8aae67db8df5d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 8 Nov 202

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-21 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt updated https://github.com/llvm/llvm-project/pull/115902 >From 845256b2ed971a4e42f7f871e8b51e711486261a Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Mon, 11 Nov 2024 16:34:23 -0700 Subject: [PATCH 01/18] [HLSL] Implement WaveActiveAnyTrue intrinsic --- clang/

[clang] [clang][bytecode] Initialize bases when bitcasting (PR #117179)

2024-11-21 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Patch is 46.57 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/117179.diff 10 Fi

[clang] [clang][bytecode] Handle bitcasts involving bitfields (PR #116843)

2024-11-21 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -295,62 +218,56 @@ static bool CheckBitcastType(InterpState &S, CodePtr OpPC, QualType T, static bool readPointerToBuffer(const Context &Ctx, const Pointer &FromPtr, BitcastBuffer &Buffer, boo

[clang] [analyzer][Solver] Early return if sym is concrete on assuming (PR #115579)

2024-11-21 Thread Ding Fei via cfe-commits
danix800 wrote: For this testcase, two constrainst are collected on the path: ```c (1) a + b + c == d (2) b + c = 0 ``` when assuming the third constraint `b == 0`, (1) or (2) is selected at random order for simplifying eq class. The fixedpoint simplification algorithm will recurse by `Re-eva

[clang] [clang][CodeGen][SPIRV] Translate `amdgpu_flat_work_group_size` into `reqd_work_group_size`. (PR #116820)

2024-11-21 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: reqd_work_group_size is for OpenCL reqd_work_group_size attribute and it sets exact block size. amdgpu-flat-work-group-size sets a (min, max) range for block size. HIP launch bounds sets a block size range (1, bound). It cannot be represented by reqd_work_group_size. https:/

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-11-21 Thread Yihe Li via cfe-commits
Mick235711 wrote: Closed in favor of #112521. https://github.com/llvm/llvm-project/pull/112289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [rtsan] NFC: Update docs with customizable functions (PR #117086)

2024-11-21 Thread via cfe-commits
https://github.com/davidtrevelyan approved this pull request. https://github.com/llvm/llvm-project/pull/117086 ___ 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 C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Discookie (Discookie) Changes Before, C++ member functions in the format of ``Class instance; instance.memberfn();`` were unable to be matched. This PR adds support for this type of call, and it is matched in exactly the same format

[clang-tools-extra] [clang-tidy] Add C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2024-11-21 Thread via cfe-commits
https://github.com/Discookie created https://github.com/llvm/llvm-project/pull/117165 Before, C++ member functions in the format of ``Class instance; instance.memberfn();`` were unable to be matched. This PR adds support for this type of call, and it is matched in exactly the same format as ot

[clang] [clang][bytecode] Add assert to ensure correct state restoration in CallBI function (PR #115496)

2024-11-21 Thread via cfe-commits
smanna12 wrote: > Please reword the title of the PR. It sounds like this commit is actually > fixing anything but it just silences the static analyzer. Thanks @tbaederr for reviews! I have updated title and commit message. https://github.com/llvm/llvm-project/pull/115496 __

[clang] [clang][SME] Ignore flatten for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/116391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Add assert to ensure correct state restoration in CallBI function (PR #115496)

2024-11-21 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/115496 ___ 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 C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2024-11-21 Thread via cfe-commits
https://github.com/Discookie updated https://github.com/llvm/llvm-project/pull/117165 >From e90ab99dde0945d103959fa73ea2d31852f753e7 Mon Sep 17 00:00:00 2001 From: Viktor Date: Thu, 21 Nov 2024 14:33:24 + Subject: [PATCH] [clang-tidy] Add C++ member function support to user-defined bugpron

[clang] [rtsan] NFC: Update docs with customizable functions (PR #117086)

2024-11-21 Thread Chris Apple via cfe-commits
https://github.com/cjappl closed https://github.com/llvm/llvm-project/pull/117086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/116391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Sander de Smalen via cfe-commits
@@ -1143,30 +1146,62 @@ void AArch64TargetCodeGenInfo::checkFunctionABI( } } -void AArch64TargetCodeGenInfo::checkFunctionCallABIStreaming( -CodeGenModule &CGM, SourceLocation CallLoc, const FunctionDecl *Caller, -const FunctionDecl *Callee) const { - if (!Caller ||

[clang] [clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm commented: Thanks for including the `clang::always_inline` statement attribute as well. https://github.com/llvm/llvm-project/pull/116391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/116391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Add assert to ensure correct state restoration in CallBI function (PR #115496)

2024-11-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/115496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)

2024-11-21 Thread via cfe-commits
https://github.com/StefanPaulet created https://github.com/llvm/llvm-project/pull/117167 Some eager instantiations may try to instantiate a forward declared templated function before it is defined. This introduces one more attempt to instantiate at the end of the TU. Resolves #115731 >From 5

[clang] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)

2024-11-21 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] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (StefanPaulet) Changes Some eager instantiations may try to instantiate a forward declared templated function before it is defined. This introduces one more attempt to instantiate at the end of the TU. Resolves #115731 --- Full dif

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-21 Thread Steven Perron via cfe-commits
@@ -1949,24 +1949,36 @@ bool SPIRVInstructionSelector::selectSign(Register ResVReg, return Result; } +bool SPIRVInstructionSelector::selectWaveOpInst(Register ResVReg, +const SPIRVType *ResType, +

[clang] [clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Sander de Smalen via cfe-commits
@@ -0,0 +1,72 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -emit-llvm -target-feature +sme %s -o - | FileCheck %s sdesmalen-arm wrote: nit: Given that the tests are otherwise identical, could you merge these with `sme-flatten-streaming-attrs.c` and def

[clang] [clang] constexpr built-in reduce `or` and `xor` function. (PR #116976)

2024-11-21 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/116976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] eb48e11 - [ARM] Fix undefined behaviour in bf16->float conversion (#116985)

2024-11-21 Thread via cfe-commits
Author: Oliver Stannard Date: 2024-11-21T10:15:33Z New Revision: eb48e1100a1f9dc26c6f2e56301c0a55394465c5 URL: https://github.com/llvm/llvm-project/commit/eb48e1100a1f9dc26c6f2e56301c0a55394465c5 DIFF: https://github.com/llvm/llvm-project/commit/eb48e1100a1f9dc26c6f2e56301c0a55394465c5.diff LO

[clang] [LoongArch] Add conditional compilation for FP approximation intrinsics (PR #117132)

2024-11-21 Thread Lu Weining via cfe-commits
https://github.com/SixWeining closed https://github.com/llvm/llvm-project/pull/117132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Ties Stuij (stuij) Changes because: - This brings Clang in line with GCC for which this is the default for ARM - It frees up a register, so performance increase, especially on Thumb/6-M - It will decrease code size --- Full diff: ht

[clang] [llvm] Introduce SingleByteCoverage tests (w/yaml2obj) (PR #113114)

2024-11-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/113114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] seq_cst is allowed in Flush since OpenMP 5.1. (PR #114072)

2024-11-21 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > > > > Thanks for this patch. Could you update the title/summary of the patch > > > > to say that seq_cst is allowed in Flush since OpenMP 5.1. Also, might > > > > make sense to say why no other changes in Lowering to IR is required. > > > > Could you add a test in fla

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-21 Thread Timm Baeder via cfe-commits
@@ -14690,6 +14690,14 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) { } } + // The result of __builtin_counted_by_ref cannot be assigned to a variable. + // It allows leaking and modification of bounds safety information. + if (const auto *CE = dyn_cast_if_present

[clang] [clang] __STDC_NO_THREADS__ is no longer necessary for VS 2022 1939 and above (PR #117149)

2024-11-21 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] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-21 Thread Steven Perron via cfe-commits
@@ -3158,6 +3172,166 @@ bool SPIRVInstructionSelector::selectFirstBitHigh(Register ResVReg, } } +bool SPIRVInstructionSelector::selectFirstBitLow16(Register ResVReg, + const SPIRVType *ResType, +

[clang] [Clang] Prevent potential null pointer dereferences (PR #117176)

2024-11-21 Thread via cfe-commits
@@ -1908,9 +1908,9 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; // ensure both args have 3 elements int NumElementsArg1 = -TheCall->getArg(0)->getType()->getAs()->getNumElements(); +TheCall->getA

[clang] a12e79a - [rtsan] NFC: Update docs with customizable functions (#117086)

2024-11-21 Thread via cfe-commits
Author: Chris Apple Date: 2024-11-21T06:32:27-08:00 New Revision: a12e79a85fc18d535c58f2c82d2b2e80586e43d7 URL: https://github.com/llvm/llvm-project/commit/a12e79a85fc18d535c58f2c82d2b2e80586e43d7 DIFF: https://github.com/llvm/llvm-project/commit/a12e79a85fc18d535c58f2c82d2b2e80586e43d7.diff L

[clang-tools-extra] [NFC] Fix uninitialized pointer field. (PR #117173)

2024-11-21 Thread Aaron Ballman via cfe-commits
@@ -23,7 +23,7 @@ AST_MATCHER(StringLiteral, isOrdinary) { return Node.isOrdinary(); } } // namespace UseStdPrintCheck::UseStdPrintCheck(StringRef Name, ClangTidyContext *Context) -: ClangTidyCheck(Name, Context), +: ClangTidyCheck(Name, Context), PP(PP),

[clang] [flang] [llvm] seq_cst is allowed in Flush since OpenMP 5.1. (PR #114072)

2024-11-21 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. Please add the test I suggested. Please wait for @alexey-bataev https://github.com/llvm/llvm-project/pull/114072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-21 Thread Steven Perron via cfe-commits
https://github.com/s-perron commented: I hoping we can make this simpler than the Msb builtins. I'll double check that. https://github.com/llvm/llvm-project/pull/116858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-21 Thread Farzon Lotfi via cfe-commits
@@ -1949,24 +1949,36 @@ bool SPIRVInstructionSelector::selectSign(Register ResVReg, return Result; } +bool SPIRVInstructionSelector::selectWaveOpInst(Register ResVReg, +const SPIRVType *ResType, +

[clang] [Clang] Prevent potential null pointer dereferences (PR #117176)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes This commit addresses several null pointer issues identified by static analysis by replacing dyn_cast<> with cast<> and getAs<> with castAs<> in various parts of the Clang codebase. The cast and castAs method is u

[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

2024-11-21 Thread Mikołaj Piróg via cfe-commits
@@ -1165,6 +1188,23 @@ void Writer::createMiscChunks() { llvm::TimeTraceScope timeScope("Misc chunks"); Configuration *config = &ctx.config; + auto searchForPgoMagicSection = [this](char sectionName[]) { mikolaj-pirog wrote: I measured this by linking cl

[clang] [llvm] [AArch64][SVE] Change the immediate argument in svextq (PR #115340)

2024-11-21 Thread via cfe-commits
https://github.com/SpencerAbson updated https://github.com/llvm/llvm-project/pull/115340 >From bac0e8b46c284b17f04a68d95b87e8b8bf28f438 Mon Sep 17 00:00:00 2001 From: Spencer Abson Date: Thu, 7 Nov 2024 11:44:27 + Subject: [PATCH] [AArch64][SVE] Fix the immediate argument in svextq The mea

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-11-21 Thread via cfe-commits
@@ -2010,6 +2031,25 @@ class CXXDeductionGuideDecl : public FunctionDecl { /// this is an implicit deduction guide. CXXConstructorDecl *getCorrespondingConstructor() const { return Ctor; } + /// Get the deduction guide from which this deduction guide was generated, + ///

[clang] [Clang] [Parser] Fixing all callers of `ParseExternalDeclaration` that didn't parse gnu attributes (PR #117148)

2024-11-21 Thread via cfe-commits
@@ -267,9 +267,11 @@ void Parser::ParseInnerNamespace(const InnerNamespaceInfoList &InnerNSs, while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) { ParsedAttributes DeclAttrs(AttrFactory); - MaybeParseCXX11Attrib

[clang] [Clang] [Parser] Fixing all callers of `ParseExternalDeclaration` that didn't parse gnu attributes (PR #117148)

2024-11-21 Thread via cfe-commits
@@ -267,9 +267,11 @@ void Parser::ParseInnerNamespace(const InnerNamespaceInfoList &InnerNSs, while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) { ParsedAttributes DeclAttrs(AttrFactory); - MaybeParseCXX11Attrib

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-21 Thread Karol Herbst via cfe-commits
@@ -322,22 +322,26 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) if ( ARCH STREQUAL spirv OR ARCH STREQUAL spirv64 ) set( build_flags -O0 -finline-hint-functions -DCLC_SPIRV ) - set( opt_flags ) + set( clc_opt_flags ) + # Inline CLC functions into OpenCL

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-11-21 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,33 @@ +.. title:: clang-tidy - modernize-use-integer-sign-comparison + +modernize-use-integer-sign-comparison += + +Replace comparisons between signed and unsigned integers with their safe +C++20 ``std::cmp_*`` alternative, if availab

[clang-tools-extra] df9a14d - Reapply "[NFC] Explicitly pass a VFS when creating DiagnosticsEngine (#115852)"

2024-11-21 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2024-11-21T14:55:30+01:00 New Revision: df9a14d7bbf1180e4f1474254c9d7ed6bcb4ce55 URL: https://github.com/llvm/llvm-project/commit/df9a14d7bbf1180e4f1474254c9d7ed6bcb4ce55 DIFF: https://github.com/llvm/llvm-project/commit/df9a14d7bbf1180e4f1474254c9d7ed6bcb4ce55.dif

[clang] d23449d - [Clang] Eliminate shadowing warnings for parameters of explicit object member functions (#114813)

2024-11-21 Thread via cfe-commits
Author: Oleksandr T. Date: 2024-11-21T14:31:27+01:00 New Revision: d23449d99c816b2d5b507f8d44f6e324e658e8bc URL: https://github.com/llvm/llvm-project/commit/d23449d99c816b2d5b507f8d44f6e324e658e8bc DIFF: https://github.com/llvm/llvm-project/commit/d23449d99c816b2d5b507f8d44f6e324e658e8bc.diff

[clang] [C++20][Modules] Load function body from the module that gives canonical decl (PR #111992)

2024-11-21 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: I fully agree, both getting the reproducers and reducing them later is such a pain that we cannot be efficient without that tooling. My team is going to start working on it soonish, we really feel the need. We'll make sure to loop you in to look for potential collaborations

[clang] [Clang] [Parser] Fixing all callers of `ParseExternalDeclaration` that didn't parse gnu attributes (PR #117148)

2024-11-21 Thread Mathys Gasnier via cfe-commits
@@ -267,9 +267,11 @@ void Parser::ParseInnerNamespace(const InnerNamespaceInfoList &InnerNSs, while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) { ParsedAttributes DeclAttrs(AttrFactory); - MaybeParseCXX11Attrib

<    1   2   3   4   5   6   >