[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-04-14 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand approved this pull request. You might want to re-test after the recent merge of the z17 patch. Otherwise, this now looks all good to me, a few further enhancement we discussed can be done as follow-on. Thanks! https://github.com/llvm/llvm-project/pull/109164

[clang] Remove the redundant check for "WeakPtr" in isSmartPtrClass to fix the issue 135612. (PR #135629)

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

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Aaron Ballman via cfe-commits
@@ -717,6 +717,13 @@ bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) { return false; } + if (const FunctionDecl *CalleeDecl = CE->getDirectCallee(); + CalleeDecl && CalleeDecl->hasAttr()) { +Diag(St->getBeginLoc(), diag::err_musttail_mismatch) <<

[clang] [MS][clang] Revert vector deleting destructors support (PR #135611)

2025-04-14 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 h,cppm,cpp -- clang/include/clang/AST/DeclCXX.h clang/includ

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-14 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,89 @@ +//==-- ABIArgInfo.h - Abstract info regarding ABI-specific arguments ---==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-14 Thread Andy Kaylor via cfe-commits
@@ -205,13 +205,15 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { // Call operators //======// - cir::CallOp createCallOp(mlir::Location loc, mlir::SymbolRefAttr callee) { -auto op = create(loc

[clang] [ARM, AArch64] Fix passing of structures with aligned base classes (PR #135564)

2025-04-14 Thread Eli Friedman via cfe-commits
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const BaseSubobjectInfo *Base) { setSize(std::max(getSize(), Offset + Layout.getSize())); // Remember max struct/class alignment. + UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign); ---

[clang] [llvm] [HIP][HIPSTDPAR][NFC] Re-order & adapt `hipstdpar` specific passes (PR #134753)

2025-04-14 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/134753 >From a988ecf63dc79d226c2f7aa1430f65d08256888b Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 8 Apr 2025 00:20:27 +0100 Subject: [PATCH 1/8] Re-order & adapt `hipstdpar` specific passes. --- clang/lib/Co

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-14 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > We have tracked down a new and spurious "This variable is used uninitialized" > to this PR. I'm working on a reduced test case now. It looks like this: > > ``` > .cpp:XXX+2:13: error: variable 'new_section' is uninitialized when > used here [-Werror,-Wuninitialized] > 572 |

[clang] [clang] Add builtin_get_vtable_pointer and virtual_member_address (PR #135469)

2025-04-14 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > I'm confused -- how is there existing code depending on a builtin which > doesn't yet exist in Clang? Are we copying these builtins from somewhere else? This is part of the pointer authentication support we are upstreaming, all of which has been in use for a long time, just not

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-14 Thread Tom Honermann via cfe-commits
@@ -3303,6 +3303,27 @@ void CodeGenModule::EmitDeferred() { CurDeclsToEmit.swap(DeferredDeclsToEmit); for (GlobalDecl &D : CurDeclsToEmit) { +// Functions declared with the sycl_kernel_entry_point attribute are +// emitted normally during host compilation. During d

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-04-14 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,242 @@ +#!/usr/bin/env python3 +# A tool to automatically generate documentation for the config options of the +# clang static analyzer by reading `AnalyzerOptions.def`. + +import argparse +from collections import namedtuple +from enum import Enum, auto +import re +impo

[clang] [CIR] Upstream ArraySubscriptExpr from function parameter with pointer base (PR #135493)

2025-04-14 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Nothing to add after Andy comments are addressed https://github.com/llvm/llvm-project/pull/135493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-04-14 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 edited https://github.com/llvm/llvm-project/pull/130623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Handle default template arguments for alias CTAD guides (PR #134807)

2025-04-14 Thread via cfe-commits
@@ -771,3 +771,42 @@ D d(24); // CHECK-NEXT: `-ParmVarDecl {{.+}} 'U' } // namespace GH132616_DeductionGuide + +namespace GH133132 { + +template +struct A {}; + +template +using AA = A; cor3ntin wrote: Can you add a template template parameter test? https

[libclc] [libclc] Fix commands in compile_to_bc are executed sequentially (PR #130755)

2025-04-14 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. https://github.com/llvm/llvm-project/pull/130755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] 0c21d6b - [libclc] Fix commands in compile_to_bc are executed sequentially (#130755)

2025-04-14 Thread via cfe-commits
Author: Wenju He Date: 2025-04-14T14:11:04+01:00 New Revision: 0c21d6b4c8ad7310b0cd81bbefa06b2947b671f9 URL: https://github.com/llvm/llvm-project/commit/0c21d6b4c8ad7310b0cd81bbefa06b2947b671f9 DIFF: https://github.com/llvm/llvm-project/commit/0c21d6b4c8ad7310b0cd81bbefa06b2947b671f9.diff LOG:

[clang] [clang] Add builtin_get_vtable_pointer and virtual_member_address (PR #135469)

2025-04-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > I just noticed there's no documentation for > > > `__builtin_virtual_member_address()` so I'm addressing that. > > > Due to code drift and time I realized that they disagree as to whether > > > they should take `C*` or `C&` so I'm going to make them both accept > > >

[clang] [clang] Reject character devices in #embed for now (PR #135370)

2025-04-14 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thank you so much for working on that! https://github.com/llvm/llvm-project/pull/135370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang][test] Improve unit tests for Fixed point AST matchers. (PR #134398)

2025-04-14 Thread via cfe-commits
earnol wrote: Gentle ping! Requesting a review from community, since a week had passed with no response. https://github.com/llvm/llvm-project/pull/134398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-04-14 Thread Nikita Popov via cfe-commits
https://github.com/nikic requested changes to this pull request. So if I understand correctly, you are marking memsets as unsplittable, lowering them to vector zero and smaller accesses to inserts/extracts. I don't think your general approach here is going to work. We need to be careful about

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-04-14 Thread Nikita Popov via cfe-commits
@@ -1170,10 +1204,17 @@ class AllocaSlices::SliceBuilder : public PtrUseVisitor { if (!IsOffsetKnown) return PI.setAborted(&II); +bool Splittable; + +if (getVectorTypeFor(II, DL)) + Splittable = isSplittableMemOp(AS.AI.getAllocatedType(), II.isVolatile

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-04-14 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/133301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s + +int __attribute__((not_tail_called)) foo1(int a) { +return a + 1; +} + + +int foo2(int a) { +[[clang::musttail]] +return foo1(a); // expected-error {{cannot perform a tail call to function 'foo1' bec

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -325,6 +325,9 @@ Improvements to Clang's diagnostics - Now correctly diagnose a tentative definition of an array with static storage duration in pedantic mode in C. (#GH50661) +- An error is now emitted when a ``musttail`` call is made to a function marked with the ``not

[clang] [clang] Reject character devices in #embed for now (PR #135370)

2025-04-14 Thread Aaron Ballman via cfe-commits
@@ -458,6 +458,8 @@ def warn_compat_pp_embed_directive : Warning< InGroup, DefaultIgnore; def err_pp_embed_dup_params : Error< "cannot specify parameter '%0' twice in the same '#embed' directive">; +def err_pp_embed_device_file : Error< + "device files are not yet supporte

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -717,6 +717,12 @@ bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) { return false; } + if (const FunctionDecl *CalleeDecl = CE->getDirectCallee(); + CalleeDecl && CalleeDecl->hasAttr()) { +Diag(St->getBeginLoc(), diag::err_musttail_mismatch) <<

[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

2025-04-14 Thread Finn Plummer via cfe-commits
@@ -32,11 +39,19 @@ struct DescriptorTable { using ClauseType = llvm::dxil::ResourceClass; struct DescriptorTableClause { ClauseType Type; + Register Register; + uint32_t Space = 0; }; // Models RootElement : DescriptorTable | DescriptorTableClause using RootElement =

[clang] [clang] Remove isOSWindows() checks (PR #129909)

2025-04-14 Thread Prabhu Rajasekaran via cfe-commits
Prabhuk wrote: @rnk @mstorsjo -- Can you please take a look at the changes? https://github.com/llvm/llvm-project/pull/129909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-04-14 Thread Nikita Popov via cfe-commits
nikic wrote: > > I don't think your general approach here is going to work. We need to be > > careful about introducing vector operations out of thin air, because LLVM > > is not going to second guess them. If you convert a memset to <32768 x i8> > > ops here, LLVM is going to carry those all

[clang] Remove the redundant check for "WeakPtr" in isSmartPtrClass to fix the issue 135612. (PR #135629)

2025-04-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/135629 None >From 928db4c6ac01b96bbe65a9c3aec05c84c97a1040 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 14 Apr 2025 07:49:07 -0700 Subject: [PATCH] Remove the redundant check for "WeakPtr" in isSmartPtrClass

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-04-14 Thread Aniket Lal via cfe-commits
lalaniket8 wrote: > > this change makes sense and it doesn't bring (known to me) regressions > > Actually, there is an incorrect behavior in the following test case: > https://godbolt.org/z/dc3T7Mo3G , note > __clang_ocl_kern_imp_sample_kernel_float was generated, but was never called. > @lal

[clang] [Clang,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)

2025-04-14 Thread via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: https://github.com/mgschossmann updated https://github.com/llvm/llvm-project/pull/130674 >From 017a07e4912c0d06b625207a8465ed2f8d8aac5c Mon Se

[clang] [Clang,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)

2025-04-14 Thread via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s

[clang] 13b55ad - [clang] implement printing of canonical expressions (#135133)

2025-04-14 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-04-14T12:59:36-03:00 New Revision: 13b55ad3bb6bafda7d8a62c5fe2fc98157442355 URL: https://github.com/llvm/llvm-project/commit/13b55ad3bb6bafda7d8a62c5fe2fc98157442355 DIFF: https://github.com/llvm/llvm-project/commit/13b55ad3bb6bafda7d8a62c5fe2fc98157442355.dif

[clang] [HLSL] Use hlsl_device address space for getpointer. (PR #127675)

2025-04-14 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/127675 >From 81c31fcdee28482ceea703064b0103eccb2a93ad Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 12 Feb 2025 15:45:32 -0500 Subject: [PATCH 1/3] [HLSL] Use hlsl_device address space for getpointer. We ad

[clang] [flang] [llvm] [mlir] [NFC] Fix destroy typo. (PR #135640)

2025-04-14 Thread Connector Switch via cfe-commits
https://github.com/c8ef created https://github.com/llvm/llvm-project/pull/135640 None >From 7aa91c6b064a638dcaad0f36ae5cba636f5ee58e Mon Sep 17 00:00:00 2001 From: c8ef Date: Mon, 14 Apr 2025 16:10:25 + Subject: [PATCH] fix destroy typo --- .../WebKit/ref-cntbl-base-virtual-dtor-templates

[clang] [Interp] Mark inline-virtual.cpp as unsupported with ASan (PR #135402)

2025-04-14 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/135402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenACC] Switch Clang to use the Flang 'appertainment' rules for cla… (PR #135372)

2025-04-14 Thread Erich Keane via cfe-commits
erichkeane wrote: > FLANG: `atomic-if' (Valentin has PR) > Clang :: SemaOpenACC/atomic-construct.cpp > Clang :: ParserOpenACC/parse-clauses.c > Clang :: AST/ast-print-openacc-atomic-construct.cpp > Clang :: ParserOpenACC/parse-clauses.cpp > Clang :: SemaOpenACC/atomic-constr

[clang] [llvm] [NFC] Fix xmipscmov extension name (PR #135647)

2025-04-14 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro created https://github.com/llvm/llvm-project/pull/135647 The right name was used in riscv-toolchain-conventions docs. >From 86eef6e45b92a8601d2873d89b1b7b153a587bb3 Mon Sep 17 00:00:00 2001 From: Djordje Todorovic Date: Mon, 14 Apr 2025 11:22:28 +0200 Subject: [PATC

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-04-14 Thread via cfe-commits
macurtis-amd wrote: I should preface this by mentioning that I'm not all that familiar with SROA, so thank you for your patience. > So if I understand correctly, you are marking memsets as unsplittable, > lowering them to vector zero and smaller accesses to inserts/extracts. > Yes. As a naive

[clang] [Clang][AArch64] Add fp8 variants for untyped NEON intrinsics (PR #128019)

2025-04-14 Thread Momchil Velikov via cfe-commits
@@ -5464,6 +5464,15 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, Builder.CreateStore(errorValue, swiftErrorTemp); } +// Mfloat8 type is loaded as scalar type, but is treated as single +// vector type for other operation

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-04-14 Thread Ulrich Weigand via cfe-commits
@@ -2,6 +2,16 @@ ; ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s +; Test f316->i32. uweigand wrote: Comment typo. https://github.com/llvm/llvm-project/pull/109164 ___ cfe-commits mailing list cfe-commits@

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-04-14 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/109164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Silence -Wcast-function-type warnings on idiomatic Windows code (PR #135660)

2025-04-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/135660 On Windows, GetProcAddress() is the API used to dynamically load function pointers (similar to dlsym on Linux). This API returns a function pointer (a typedef named FARPROC), which means that casting from

[clang] Silence -Wcast-function-type warnings on idiomatic Windows code (PR #135660)

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes On Windows, GetProcAddress() is the API used to dynamically load function pointers (similar to dlsym on Linux). This API returns a function pointer (a typedef named FARPROC), which means that casting f

[clang] [Interp] Mark inline-virtual.cpp as unsupported with ASan (PR #135402)

2025-04-14 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/135402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2025-04-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I put up https://github.com/llvm/llvm-project/pull/135660 for review, thank you for bringing this up! https://github.com/llvm/llvm-project/pull/86131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -515,9 +519,32 @@ verifyCallCommInSymbolUses(mlir::Operation *op, return op->emitOpError() << "'" << fnAttr.getValue() << "' does not reference a valid function"; - // TODO(cir): verify function arguments and return type + auto callIf = dy

[clang] [CIR] Upstream ArraySubscriptExpr from function parameter with pointer base (PR #135493)

2025-04-14 Thread Amr Hesham via cfe-commits
@@ -570,9 +570,17 @@ CIRGenFunction::emitArraySubscriptExpr(const clang::ArraySubscriptExpr *e) { } // The base must be a pointer; emit it with an estimate of its alignment. - cgm.errorNYI(e->getSourceRange(), - "emitArraySubscriptExpr: The base must be a p

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -3303,6 +3303,27 @@ void CodeGenModule::EmitDeferred() { CurDeclsToEmit.swap(DeferredDeclsToEmit); for (GlobalDecl &D : CurDeclsToEmit) { +// Functions declared with the sycl_kernel_entry_point attribute are +// emitted normally during host compilation. During d

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

2025-04-14 Thread Durgadoss R via cfe-commits
@@ -2034,13 +2038,15 @@ multiclass F_ATOMIC_2_AS, preds>; defm _S : F_ATOMIC_2, preds>; + defm _S_C : F_ATOMIC_2, !listconcat([hasSM<80>], preds)>; defm _GEN : F_ATOMIC_2, preds>; } multiclass F_ATOMIC_3_AS preds = []> { defvar frag_pat = (frag node:$a, node:$b, n

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

2025-04-14 Thread Durgadoss R via cfe-commits
@@ -982,8 +982,9 @@ void NVPTXDAGToDAGISel::SelectAddrSpaceCast(SDNode *N) { case ADDRESS_SPACE_SHARED: Opc = TM.is64Bit() ? NVPTX::cvta_shared_64 : NVPTX::cvta_shared; break; -case ADDRESS_SPACE_DSHARED: - Opc = TM.is64Bit() ? NVPTX::cvta_dshared_64 :

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

2025-04-14 Thread Durgadoss R via cfe-commits
https://github.com/durga4github closed https://github.com/llvm/llvm-project/pull/135444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-04-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/133426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-04-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: A few mean comments, but the approach still seems solid here. I think this is a solid patch https://github.com/llvm/llvm-project/pull/133426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -407,6 +407,18 @@ class Sema; Third == ICK_Identity; } +bool isPerfect(const ASTContext &C) const { erichkeane wrote: I would LOVE a comment here, the implementation isn't particularly clear what is going on here. https://github.com/

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -979,6 +995,20 @@ class Sema; return false; } +bool isPerfectMatch(const ASTContext &Ctx) const { erichkeane wrote: `isPerfect` vs `isPerfectMatch` are... confusing. Work to make these easier to understand together would be appreciated. ht

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -1159,12 +1256,29 @@ class Sema; return reinterpret_cast(FreeSpaceStart); } +template T *allocateDeferredCandidate() { + T *C = slabAllocate(1); erichkeane wrote: Seems funny to me to `slab` allocate in increments of 1. I have a 'silly

[clang] [llvm] [OpenACC] Switch Clang to use the Flang 'appertainment' rules for cla… (PR #135372)

2025-04-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/135372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

2025-04-14 Thread Durgadoss R via cfe-commits
durga4github wrote: (Sorry I clicked the wrong button `Close` instead of `Comment`) https://github.com/llvm/llvm-project/pull/135444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

2025-04-14 Thread Durgadoss R via cfe-commits
https://github.com/durga4github reopened https://github.com/llvm/llvm-project/pull/135444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream ArraySubscriptExpr from function parameter with pointer base (PR #135493)

2025-04-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This seems reasonable to me, but also kinda short :) I fear it is missing stuff, so I want to let @andykaylor et-all do a final review. https://github.com/llvm/llvm-project/pull/135493 ___ cfe-commits mailing

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

2025-04-14 Thread Durgadoss R via cfe-commits
@@ -4704,6 +4754,43 @@ void llvm::UpgradeIntrinsicCall(CallBase *CI, Function *NewFn) { CI->eraseFromParent(); return; } + case Intrinsic::nvvm_mapa_shared_cluster: { +// Create a new call with the correct address space. +NewCall = +Builder.CreateCal

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s + +int __attribute__((not_tail_called)) foo1(int a) { +return a + 1; +} + + +int foo2(int a) { +[[clang::musttail]] +return foo1(a); // expected-error {{cannot perform a tail call to function 'foo1' bec

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-14 Thread Henrich Lauko via cfe-commits
@@ -67,6 +72,166 @@ void CIRDialect::printType(Type type, DialectAsmPrinter &os) const { llvm::report_fatal_error("printer is missing a handler for this type"); } +//===--===// +// RecordType Definitions +/

[libclc] 4cb1803 - [libclc][NFC] Fix typo in comment

2025-04-14 Thread Fraser Cormack via cfe-commits
Author: Fraser Cormack Date: 2025-04-14T14:38:58+01:00 New Revision: 4cb1803ff9d052f1b75d90d5be87345e54aebf92 URL: https://github.com/llvm/llvm-project/commit/4cb1803ff9d052f1b75d90d5be87345e54aebf92 DIFF: https://github.com/llvm/llvm-project/commit/4cb1803ff9d052f1b75d90d5be87345e54aebf92.diff

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-04-14 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 updated https://github.com/llvm/llvm-project/pull/130623 >From 978d9a153f9c5a98f6c20b94281f1acd02ecae4e Mon Sep 17 00:00:00 2001 From: Jack Styles Date: Fri, 7 Mar 2025 15:51:34 + Subject: [PATCH 1/9] [NFC][ARM] Split SIMD identifier away from MVE Previously, t

[clang] [Clang][AMDGPU] Enable `avail-extern-to-local` for ThinLTO in HIP (PR #134476)

2025-04-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/134476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] enhance loop analysis to handle variable changes inside lambdas (PR #135573)

2025-04-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/135573 >From fd46c6b9af7193376f294a3adae47d579de8503b Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Mon, 14 Apr 2025 14:05:25 +0300 Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes

[clang] [CIR] Upstream SelectOp and ShiftOp (PR #133405)

2025-04-14 Thread Morris Hafner via cfe-commits
@@ -1294,6 +1296,90 @@ mlir::LogicalResult CIRToLLVMCmpOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMShiftOpLowering::matchAndRewrite( +cir::ShiftOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewriter) const { +

[clang] [llvm] [LLVM] Add intrinsics for v_cvt_pk_norm_{i16, u16}_f16 (PR #135631)

2025-04-14 Thread Acim Maravic via cfe-commits
https://github.com/Acim-Maravic created https://github.com/llvm/llvm-project/pull/135631 Added builtin and intrinsic for v_cvt_pk_norm_i16_f16 and v_cvt_pk_norm_u16_f16 >From 86976f24c00ae6471c95edf21e4d55b35682 Mon Sep 17 00:00:00 2001 From: Acim Maravic Date: Mon, 14 Apr 2025 16:29:11 +0

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-04-14 Thread Dmitry Sidorov via cfe-commits
MrSidims wrote: > this change makes sense and it doesn't bring (known to me) regressions Actually, there is an incorrect behavior in the following test case: https://godbolt.org/z/dc3T7Mo3G , note __clang_ocl_kern_imp_sample_kernel_float was generated, but was never called. @lalaniket8 can thi

[clang] [Clang][AMDGPU] Enable `avail-extern-to-local` for ThinLTO in HIP (PR #134476)

2025-04-14 Thread Shilei Tian via cfe-commits
shiltian wrote: ping https://github.com/llvm/llvm-project/pull/134476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add the support for RetainPtrArc (PR #135532)

2025-04-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/135532 >From efd914e66352fdf7e9fac3355d0a06159e880987 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 13 Apr 2025 01:30:26 -0700 Subject: [PATCH 1/3] [alpha.webkit.UnretainedCallArgsChecker] Add the support for R

[clang] [flang] [llvm] [mlir] [NFC] Fix destroy typo. (PR #135640)

2025-04-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/135640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Use hlsl_device address space for getpointer. (PR #127675)

2025-04-14 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/127675 >From 81c31fcdee28482ceea703064b0103eccb2a93ad Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 12 Feb 2025 15:45:32 -0500 Subject: [PATCH 1/4] [HLSL] Use hlsl_device address space for getpointer. We ad

[clang] [CIR] Upstream ArraySubscriptExpr from function parameter with pointer base (PR #135493)

2025-04-14 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/135493 >From 650a2402bef4ef83abaaa2b5ae78a7bcdfb4b79f Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 11 Apr 2025 23:39:10 +0200 Subject: [PATCH 1/2] [CIR] Upstream ArraySubscriptExpr for base type as poin

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

2025-04-14 Thread Durgadoss R via cfe-commits
durga4github wrote: A general thought, Can we include the base changes in this PR and create a separate PR for the intrinsics-migration+MLIR changes? https://github.com/llvm/llvm-project/pull/135444 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -1015,6 +1045,62 @@ class Sema; RewriteKind(CRK_None) {} }; + struct DeferredTemplateOverloadCandidate { +DeferredTemplateOverloadCandidate *Next = nullptr; erichkeane wrote: Comment here + on the slab allocator function as to WHY we are d

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-14 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/135105 >From 3b19527073c656b631a990397a00030487b3f595 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 9 Apr 2025 12:45:57 -0700 Subject: [PATCH 1/8] [CIR] Upstream minimal support for structure types This cha

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -3170,6 +3170,8 @@ def note_musttail_mismatch : Note< "|has type mismatch at %ordinal3 parameter" "%diff{ (expected $ but has $)|}1,2" "|has different return type%diff{ ($ expected but has $)|}1,2}0">; +def note_musttail_disabled_by_not_tail_called : Note< + "'n

[clang] [clang][test] Improve unit tests for Fixed point AST matchers. (PR #134398)

2025-04-14 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov approved this pull request. https://github.com/llvm/llvm-project/pull/134398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-14 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > We have tracked down a new and spurious "This variable is used uninitialized" > to this PR. I'm working on a reduced test case now. It looks like this: > > ``` > .cpp:XXX+2:13: error: variable 'new_section' is uninitialized when > used here [-Werror,-Wuninitialized] > 572 |

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-14 Thread Tom Honermann via cfe-commits
@@ -732,6 +732,16 @@ CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType, RequiredArgs::All); } +const CGFunctionInfo & +CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType, +

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -732,6 +732,16 @@ CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType, RequiredArgs::All); } +const CGFunctionInfo & +CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType, +

[clang] [llvm] [NFC] Fix xmipscmov extension name (PR #135647)

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Djordje Todorovic (djtodoro) Changes The right name was used in riscv-toolchain-conventions docs. --- Full diff: https://github.com/llvm/llvm-project/pull/135647.diff 15 Files Affected: - (modified) clang/test/Driver/print-supported-extens

[clang] [CIR] Upstream ArraySubscriptExpr from function parameter with pointer base (PR #135493)

2025-04-14 Thread Andy Kaylor via cfe-commits
@@ -350,20 +350,87 @@ void func7() { // OGCG: %[[ARR:.*]] = alloca [1 x ptr], align 8 // OGCG: call void @llvm.memset.p0.i64(ptr align 8 %[[ARR]], i8 0, i64 8, i1 false) -void func8(int p[10]) {} -// CIR: cir.func @func8(%arg0: !cir.ptr -// CIR: cir.alloca !cir.ptr, !cir.ptr>

[clang] [CIR] Upstream ArraySubscriptExpr from function parameter with pointer base (PR #135493)

2025-04-14 Thread Andy Kaylor via cfe-commits
@@ -570,9 +570,17 @@ CIRGenFunction::emitArraySubscriptExpr(const clang::ArraySubscriptExpr *e) { } // The base must be a pointer; emit it with an estimate of its alignment. - cgm.errorNYI(e->getSourceRange(), - "emitArraySubscriptExpr: The base must be a p

[clang] [Modules] Fix an identifier hiding a function-like macro definition. (PR #135471)

2025-04-14 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > Thanks! Does the pr fix https://bugs.llvm.org//show_bug.cgi?id=32670 Nope. The test case in #32017 is still failing. I believe it is a different issue as we don't have any identifiers with the same names as macros. And seems like the behavior wasn't affected by d79514e24b4da11

[clang] [CIR] Upstream ArraySubscriptExpr from function parameter with pointer base (PR #135493)

2025-04-14 Thread Andy Kaylor via cfe-commits
@@ -570,9 +570,17 @@ CIRGenFunction::emitArraySubscriptExpr(const clang::ArraySubscriptExpr *e) { } // The base must be a pointer; emit it with an estimate of its alignment. - cgm.errorNYI(e->getSourceRange(), - "emitArraySubscriptExpr: The base must be a p

[clang] 9800c34 - [Interp] Mark inline-virtual.cpp as unsupported with ASan (#135402)

2025-04-14 Thread via cfe-commits
Author: Thurston Dang Date: 2025-04-14T09:55:36-07:00 New Revision: 9800c3489a06a285cbc469a9aab4601e57dac35a URL: https://github.com/llvm/llvm-project/commit/9800c3489a06a285cbc469a9aab4601e57dac35a DIFF: https://github.com/llvm/llvm-project/commit/9800c3489a06a285cbc469a9aab4601e57dac35a.diff

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2025-04-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Ah, derp, the issue was me not passing `-Wextra` (sorry!). Hmm, yeah, this does seem like a case we probably want to suppress, for similar reasons as we do for `dlsym`. https://github.com/llvm/llvm-project/pull/86131 ___ cfe-commi

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread via cfe-commits
https://github.com/MillePlateaux updated https://github.com/llvm/llvm-project/pull/134465 >From 596679a60bcae58ac1c9e1b3066b21399a58f24b Mon Sep 17 00:00:00 2001 From: MillePlateaux Date: Fri, 4 Apr 2025 16:26:25 -0700 Subject: [PATCH 1/8] [llvm][Stmt]:git clang format --- clang/lib/Sema/Sema

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-04-14 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: One thing that looks fishy, but that is even a different node, is this early return on `VisitSubstNonTypeTemplateParmPackExpr` in `ASTReaderStmt`. ```C++ if (ArgPack.getKind() != TemplateArgument::Pack) return; ``` This looks impossible to hit, because `getArgumentPack` c

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,89 @@ +//==-- ABIArgInfo.h - Abstract info regarding ABI-specific arguments ---==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -14794,9 +14803,36 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } -static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType, +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, +

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -18,9 +18,12 @@ using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create() { - // For now we just create an empty CIRGenFunctionInfo. - CIRGenFunctionInfo *fi = new CIRGenFunctionInfo(); +CIRGenFunctionInfo *CIRGenFunctionInfo:

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -87,9 +110,48 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo &funcInfo, assert(!cir::MissingFeatures::opCallMustTail()); assert(!cir::MissingFeatures::opCallReturn()); - // For now we just return nothing because we don't have support for return - // valu

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-14 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/135105 >From 3b19527073c656b631a990397a00030487b3f595 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 9 Apr 2025 12:45:57 -0700 Subject: [PATCH 1/7] [CIR] Upstream minimal support for structure types This cha

<    1   2   3   4   5   >