[clang] [clang][AST] Fix end location of DeclarationNameInfo on instantiated methods (PR #92654)

2025-04-04 Thread Balazs Benics via cfe-commits
steakhal wrote: > @alejandro-alvarez-sonarsource @steakhal > > This breaks the type info loaded correctly in previous decl instantiation: > [...] Thank you for reporting @Abramo-Bagnara. Could you create a dedicated GH issue for this please? FYI: I don't have plans to work on it though, but s

[clang] [modules] Handle friend function that was a definition but became only a declaration during AST deserialization (PR #132214)

2025-04-04 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin commented: PTAL https://github.com/llvm/llvm-project/pull/132214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2025-04-04 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > It seems to be running on my .h files itself(?) In that case, I don't believe clang-tidy considers the header "a header", but actually "the main file" just like when analyzing a .cpp file. In that case, `ExcludeHeaderFilterRegex` won't work. https://github.com/llvm/llv

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-04 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/134434 >From a4919243c4dc2cfebb1494d0f46529b858c52ea0 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 4 Apr 2025 11:49:02 -0700 Subject: [PATCH] [fatlto] Use the ThinLTO default pipeline for FatLTO When coroutine

[clang] [NFC][analyzer] Multipart checker refactor 2: NullabilityChecker (PR #132250)

2025-04-04 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/132250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [clang][dataflow] Fix unsupported types always being equal (PR #131575)

2025-04-04 Thread Jan Voung via cfe-commits
jvoung wrote: Hi, just checking if you wanted to merge this, or if there were any other issues. Thanks! https://github.com/llvm/llvm-project/pull/131575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] 561dcb2 - [Clang] Permit `-Xarch_` to be used with `--offload-arch` (#131884)

2025-04-04 Thread via cfe-commits
Author: Joseph Huber Date: 2025-03-21T08:25:52-05:00 New Revision: 561dcb26d4597b592caa417d36c1a4e09fb2be2d URL: https://github.com/llvm/llvm-project/commit/561dcb26d4597b592caa417d36c1a4e09fb2be2d DIFF: https://github.com/llvm/llvm-project/commit/561dcb26d4597b592caa417d36c1a4e09fb2be2d.diff

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,85 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.2-library %s -fnative-half-type -emit-llvm -O1 -o - | FileCheck %s + + +// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z12dstWithFloatDv4_fS_( +// CHECK-SAME: <4

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-04 Thread Paul Kirth via cfe-commits
@@ -1692,6 +1692,19 @@ PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, if (ThinLTO && PGOOpt && PGOOpt->Action == PGOOptions::SampleUse) MPM.addPass(buildThinLTODefaultPipeline(Level, /*ImportSummary=*/nullptr)); else { +// ModuleSimp

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-04 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/134434 >From 80c36153e55398bee01e0167e722c930732b48e7 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 4 Apr 2025 11:49:02 -0700 Subject: [PATCH] [fatlto] Add coroutine passes when using FatLTO with ThinLTO When c

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-04-04 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,3329 @@ +// RUN: %clang_cc1 -triple nvptx-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +#include "../Headers/Inputs/include/cuda.h" ---

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ +dst(p0, p0, p0); + // expected-error@-1 {{no matching function

[clang] 335a461 - Revert "[clang] NFC: Clear some uses of MemberPointerType::getClass" (#132281)

2025-04-04 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-03-20T17:54:21-03:00 New Revision: 335a4614dee4123ff4f86e6400fc6a305766e227 URL: https://github.com/llvm/llvm-project/commit/335a4614dee4123ff4f86e6400fc6a305766e227 DIFF: https://github.com/llvm/llvm-project/commit/335a4614dee4123ff4f86e6400fc6a305766e227.dif

[clang] [clang] Add SPIR-V to some OpenMP clang tests (PR #133503)

2025-04-04 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/133503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move lgamma, lgamma_r & tgamma to CLC library (PR #134053)

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

[clang] a187060 - Allow direct dispatch for the ObjFW runtime (#126382)

2025-04-04 Thread via cfe-commits
Author: Jonathan Schleifer Date: 2025-03-23T10:45:18-07:00 New Revision: a187060de9193ad3ff356195feb04b16f1f28ff0 URL: https://github.com/llvm/llvm-project/commit/a187060de9193ad3ff356195feb04b16f1f28ff0 DIFF: https://github.com/llvm/llvm-project/commit/a187060de9193ad3ff356195feb04b16f1f28ff0.

[clang] [Clang] Fix a lambda pattern comparison mismatch after ecc7e6ce4 (PR #133863)

2025-04-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/133863 In ecc7e6ce4, we tried to inspect the `LambdaScopeInfo` on stack to recover the instantiating lambda captures. However, there was a mismatch in how we compared the pattern declarations of lambdas: the constrain

[clang] [NFC] [ASTMatchers] Share code of `forEachArgumentWithParamType` with UnsafeBufferUsage (PR #132387)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ilya Biryukov (ilya-biryukov) Changes This changes exposes a low-level helper that is used to implement `forEachArgumentWithParamType` but can also be used without matchers, e.g. if performance is a concern. Commit f5ee10538b68835112323c

[clang] Bypass alignment option based on architecture features instead of command-line flags (PR #134099)

2025-04-04 Thread Victor Campos via cfe-commits
https://github.com/vhscampos edited https://github.com/llvm/llvm-project/pull/134099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Introduce helpers for defining compatibilty warnings (PR #132129)

2025-04-04 Thread via cfe-commits
Sirraide wrote: > As a followup perhaps, I would LOVE it if we could modify the > DiagnosticsEmitter to make the calls here be `CompatDiag(SrcLoc, DiagBASE)`. > > WHERE: 1- It determines the C++ standard version itself, so it checks > LangOpts so we don't have to actually tell it what standard

[clang] [clang-format] Don't wrap before attributes in parameter lists (PR #132519)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fix #132240 --- Full diff: https://github.com/llvm/llvm-project/pull/132519.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+14) - (modified) clang/unittests/Format/FormatTest.c

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Fraser Cormack (frasercrmck) Changes These builtins are modeled on the clzg/ctzg builtins, which accept an optional second argument. This second argument is returned if the first argument is 0. --- Full diff: https://github.com/ll

[clang] [CIR] Upstream support for promoted types with unary plus/minus (PR #133829)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes The initial upstreaming of unary operations left promoted types unhandled for the unary plus and minus operators. This change implements support for promoted types and performs a bit of related code clea

[clang] [Clang][BPF] Add tests for btf_type_tag c2x-style attributes (PR #133666)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yonghong-song) Changes For btf_type_tag implementation, in order to have the same results with clang (__attribute__((btf_type_tag("...", gcc intends to use c2x syntax '[[...]]'. Clang also supports similar c2x syntax. Currently,

[clang] 10c6ebc - Reapply "[Clang] [NFC] Introduce a helper for emitting compatibility diagnostics (#132348)" (#134043)

2025-04-04 Thread via cfe-commits
Author: Sirraide Date: 2025-04-02T10:40:05+02:00 New Revision: 10c6ebc42711fa12ff790f3462cbce0e02538ab7 URL: https://github.com/llvm/llvm-project/commit/10c6ebc42711fa12ff790f3462cbce0e02538ab7 DIFF: https://github.com/llvm/llvm-project/commit/10c6ebc42711fa12ff790f3462cbce0e02538ab7.diff LOG:

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-04 Thread Deric C. via cfe-commits
@@ -253,6 +253,37 @@ const inline float length(__detail::HLSL_FIXED_VECTOR X) { return __detail::length_vec_impl(X); } +//===--===// +// lit builtins +//===--

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -135,6 +135,55 @@ mlir::Location CIRGenFunction::getLoc(mlir::Location lhs, mlir::Location rhs) { return mlir::FusedLoc::get(locs, metadata, &getMLIRContext()); } +bool CIRGenFunction::ContainsLabel(const Stmt *s, bool ignoreCaseStmts) { bcardosolopes wr

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -135,6 +135,55 @@ mlir::Location CIRGenFunction::getLoc(mlir::Location lhs, mlir::Location rhs) { return mlir::FusedLoc::get(locs, metadata, &getMLIRContext()); } +bool CIRGenFunction::ContainsLabel(const Stmt *s, bool ignoreCaseStmts) { + // Null statement, not a label

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-04-04 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,20 @@ +set(LLVM_LINK_COMPONENTS + support + ) + +add_clang_library(clangTidyCustomModule STATIC + CustomTidyModule.cpp + QueryCheck.cpp + + LINK_LIBS + clangTidy + clangTidyUtils + + DEPENDS + ClangDriverOptions + ) + +clang_target_link_libraries(clangTidyCust

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: @Andres-Salamanca thanks for working on this. We usually write tests that exercise any possible different paths codegen can take. For next rounds: it's fine if you add less things in one go and make it more incremental with the use of (a) errorNYI and (b) assert on missing

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -263,6 +264,72 @@ static void terminateBody(CIRGenBuilderTy &builder, mlir::Region &r, b->erase(); } +mlir::LogicalResult CIRGenFunction::emitIfStmt(const IfStmt &s) { + mlir::LogicalResult res = mlir::success(); + // The else branch of a consteval if statement is al

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread via cfe-commits
https://github.com/metkarpoonam edited https://github.com/llvm/llvm-project/pull/133828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread via cfe-commits
https://github.com/metkarpoonam edited https://github.com/llvm/llvm-project/pull/133828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread via cfe-commits
https://github.com/metkarpoonam edited https://github.com/llvm/llvm-project/pull/133828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread via cfe-commits
https://github.com/metkarpoonam edited https://github.com/llvm/llvm-project/pull/133828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread via cfe-commits
https://github.com/metkarpoonam edited https://github.com/llvm/llvm-project/pull/133828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -462,6 +462,58 @@ def ReturnOp : CIR_Op<"return", [ParentOneOf<["FuncOp", "ScopeOp", "DoWhileOp", let hasVerifier = 1; } +//===--===// +// IfOp +//===-

[clang] [clang][bytecode] Reject constexpr-unknown values from comparisons (PR #133701)

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

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

2025-04-04 Thread via cfe-commits
https://github.com/joaosaffran edited https://github.com/llvm/llvm-project/pull/133800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-04 Thread via cfe-commits
https://github.com/joaosaffran commented: Few questions to help me understand better the changes being introduced here. https://github.com/llvm/llvm-project/pull/133800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

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

2025-04-04 Thread via cfe-commits
@@ -89,37 +88,178 @@ bool RootSignatureParser::parseDescriptorTableClause() { CurToken.TokKind == TokenKind::kw_UAV || CurToken.TokKind == TokenKind::kw_Sampler) && "Expects to only be invoked starting at given keyword"); + TokenKind ParamKind = Cu

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

2025-04-04 Thread via cfe-commits
@@ -89,37 +88,178 @@ bool RootSignatureParser::parseDescriptorTableClause() { CurToken.TokKind == TokenKind::kw_UAV || CurToken.TokKind == TokenKind::kw_Sampler) && "Expects to only be invoked starting at given keyword"); + TokenKind ParamKind = Cu

[clang] [clang][doc]: Merge the contents of identical entries. (PR #134089)

2025-04-04 Thread via cfe-commits
YLChenZ wrote: > But as it stands, I think this is better than repeating the same information > 15 times. Couldn't agree more. https://github.com/llvm/llvm-project/pull/134089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[libclc] [libclc] Skip opt command if opt_flags is empty (PR #130882)

2025-04-04 Thread Wenju He via cfe-commits
@@ -342,22 +342,32 @@ function(add_libclc_builtin_set) set( builtins_opt_lib_tgt builtins.opt.${ARG_ARCH_SUFFIX} ) - # Add opt target - add_custom_command( OUTPUT ${builtins_opt_lib_tgt}.bc -COMMAND ${opt_exe} ${ARG_OPT_FLAGS} -o ${builtins_opt_lib_tgt}.bc - ${bu

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

2025-04-04 Thread via cfe-commits
@@ -10043,12 +10043,19 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( // When [...] the constructor [...] is a candidate by //- [over.match.copy] (in all cases) if (TD) { - SmallVector TmpInits; - for (Expr *E : Inits) + + // As

[clang] [NFC][FMV][AArch64] Tidy up codegen tests. (PR #132273)

2025-04-04 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/132273 Removes attr-target-version.c which doesn't have a clear purpose. Introduces AArch64/fmv-detection.c to check detection bitmasks. Adds coverage in AArch64/fmv-resolver-emission.c >From d5f250d42f908ecae74b474

[libclc] [libclc]: clspv: add a dummy implememtation for mul_hi (PR #134094)

2025-04-04 Thread Romaric Jodin via cfe-commits
https://github.com/rjodinchr created https://github.com/llvm/llvm-project/pull/134094 clspv uses a better implementation that is not using a bigger side when not available. Add a dummy implementation for mul_hi to avoid to override the implementation of clspv with the one in libclc. >From 46d

[clang] 8a691cc - [MS][clang] Make sure vector deleting dtor calls correct operator delete (#133950)

2025-04-04 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2025-04-02T09:25:43+02:00 New Revision: 8a691cc6157b2c3bc91af767eb1154d7a715562a URL: https://github.com/llvm/llvm-project/commit/8a691cc6157b2c3bc91af767eb1154d7a715562a DIFF: https://github.com/llvm/llvm-project/commit/8a691cc6157b2c3bc91af767eb1154d7a71556

[clang] [CMAKE][AMDGPU] fix build failure caused by PR #133619 (PR #133776)

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

[clang] [llvm] [HLSL] Buffer handle globals should not be constants (PR #130231)

2025-04-04 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/130231 >From bf5e5b4b1060f51d37b05c905b4327a40316f158 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 6 Mar 2025 17:50:12 -0800 Subject: [PATCH 1/2] [HLSL] Buffer handle globals should not be constants If these

[clang] Optimize Module Dependency Handling for Efficient Memory Usage (PR #132287)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ayush Pareek (ayushpareek2003) Changes Optimized addModuleFiles functions for both CompilerInvocation and CowCompilerInvocation to reduce redundant function calls and improve efficiency Introduced memory preallocation using reserve() when

[clang] [clang][ExtractAPI] fix a couple crashes when used via libclang (PR #132297)

2025-04-04 Thread via cfe-commits
https://github.com/QuietMisdreavus updated https://github.com/llvm/llvm-project/pull/132297 >From 0a9499213cb3a59f55187cab7862fe181d05c537 Mon Sep 17 00:00:00 2001 From: Vera Mitchell Date: Thu, 20 Mar 2025 10:22:12 -0600 Subject: [PATCH 1/2] collect template argument locs ahead of time to nul

[clang] [analyzer] Remove deprecated option VirtualCall:PureOnly (PR #131823)

2025-04-04 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. LGTM thanks, https://github.com/llvm/llvm-project/pull/131823 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-04 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,115 @@ +//===--- RunOnNewStack.cpp - Crash Recovery ---===// +// +// 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-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-04-04 Thread Mohamed Emad via cfe-commits
@@ -516,15 +518,16 @@ writeFileDefinition(const Location &L, std::make_unique(HTMLTag::TAG_A, std::to_string(L.LineNumber)); // The links to a specific line in the source code use the github / // googlesource notation so it won't work for all hosting pages. - // FIXM

[clang-tools-extra] [clang-tidy] Fix broken HeaderFilterRegex when read from config file (PR #133582)

2025-04-04 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1 @@ +HeaderFilterRegex: '.*' carlosgalvezp wrote: It appears this use case was broken by this [patch](https://github.com/llvm/llvm-project/commit/0249554ee1ac49e6f1d93fa78a55971fc706f635), @HerrCai0907 . There may be more things to fix. https:/

[clang] [llvm] [NVPTX] Add intrinsics for cvt .f6x2 and .ue8m0x2 variants (PR #134345)

2025-04-04 Thread Artem Belevich via cfe-commits
@@ -596,6 +605,28 @@ def __nvvm_e4m3x2_to_f16x2_rn_relu : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>(sh def __nvvm_e5m2x2_to_f16x2_rn : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>(short)", SM_89, PTX81>; def __nvvm_e5m2x2_to_f16x2_rn_relu : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>

[clang] [llvm] [NVPTX] Add intrinsics for cvt .f6x2 and .ue8m0x2 variants (PR #134345)

2025-04-04 Thread Artem Belevich via cfe-commits
@@ -1021,6 +1036,174 @@ __device__ void nvvm_cvt_sm89() { __nvvm_e5m2x2_to_f16x2_rn(0x4c4c); // CHECK_PTX81_SM89: call <2 x half> @llvm.nvvm.e5m2x2.to.f16x2.rn.relu(i16 19532) __nvvm_e5m2x2_to_f16x2_rn_relu(0x4c4c); + + // CHECK_PTX81_SM89: call i32 @llvm.nvvm.f2tf32.rn

[clang] [llvm] [NVPTX] Add intrinsics for cvt .f6x2 and .ue8m0x2 variants (PR #134345)

2025-04-04 Thread Artem Belevich via cfe-commits
@@ -703,6 +703,53 @@ let hasSideEffects = false in { defm CVT_to_tf32_rz_satf : CVT_TO_TF32<"rz.satfinite", [hasPTX<86>, hasSM<100>]>; defm CVT_to_tf32_rn_relu_satf : CVT_TO_TF32<"rn.relu.satfinite", [hasPTX<86>, hasSM<100>]>; defm CVT_to_tf32_rz_relu_satf : CVT_TO_TF

[clang] [llvm] [NVPTX] Add intrinsics for cvt .f6x2 and .ue8m0x2 variants (PR #134345)

2025-04-04 Thread Artem Belevich via cfe-commits
@@ -580,6 +580,15 @@ def __nvvm_f2bf16_rz : NVPTXBuiltinSMAndPTX<"__bf16(float)", SM_80, PTX70>; def __nvvm_f2bf16_rz_relu : NVPTXBuiltinSMAndPTX<"__bf16(float)", SM_80, PTX70>; def __nvvm_f2tf32_rna : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_80, PTX70>; +def __nvvm_f2tf32_

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ +dst(p0, p0, p0); + // expected-error@-1 {{no matching function

[clang] refactor OffloadAction constructor for memory efficiency & cleaner access (PR #134447)

2025-04-04 Thread Ayush Pareek via cfe-commits
https://github.com/ayushpareek2003 created https://github.com/llvm/llvm-project/pull/134447 Avoided repeated DeviceDependences getter calls by using const auto & references No functional changes; pure memory and readability optimization >From 2689233873e3c0d998bbfb7bb240d39d1654a973 Mon Sep 17

[clang] refactor OffloadAction constructor for memory efficiency & cleaner access (PR #134447)

2025-04-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] Optimize Module Dependency Handling for Efficient Memory Usage (PR #132287)

2025-04-04 Thread Ayush Pareek via cfe-commits
https://github.com/ayushpareek2003 closed https://github.com/llvm/llvm-project/pull/132287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/133828 >From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Mon, 31 Mar 2025 16:49:18 -0700 Subject: [PATCH 01/10] Implement a dst function with test cases for HL

[clang] [flang] [clang][driver] Fix -fveclib=ArmPL issue: with -nostdlib do not link against libm (PR #133578)

2025-04-04 Thread Paul Osmialowski via cfe-commits
@@ -116,11 +116,17 @@ /// Verify that vectorized routines library is being linked in. // RUN: %clang -### --target=aarch64-pc-windows-msvc -fveclib=ArmPL %s 2>&1 | FileCheck --check-prefix=CHECK-LINKING-ARMPL-MSVC %s // RUN: %clang -### --target=aarch64-linux-gnu -fveclib=ArmP

[clang] refactor OffloadAction constructor for memory efficiency & cleaner access (PR #134447)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Ayush Pareek (ayushpareek2003) Changes Avoided repeated DeviceDependences getter calls by using const auto & references No functional changes; pure memory and readability optimization --- Full diff: http

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -442,6 +457,25 @@ class CIRGenFunction : public CIRGenTypeCache { mlir::LogicalResult emitDeclStmt(const clang::DeclStmt &s); LValue emitDeclRefLValue(const clang::DeclRefExpr *e); + /// Emit an if on a boolean condition to the specified blocks. + /// FIXME: Based on

[clang-tools-extra] [Clang-tidy][NFC] Remove dead code detected by code sanitizer. (PR #134385)

2025-04-04 Thread Oliver Stöneberg via cfe-commits
firewave wrote: Based on the message it seems the "sanitizer" was Coverity. Is my assumption correct? https://github.com/llvm/llvm-project/pull/134385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/134333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -263,6 +264,72 @@ static void terminateBody(CIRGenBuilderTy &builder, mlir::Region &r, b->erase(); } +mlir::LogicalResult CIRGenFunction::emitIfStmt(const IfStmt &s) { + mlir::LogicalResult res = mlir::success(); + // The else branch of a consteval if statement is al

[clang] [modules] Handle friend function that was a definition but became only a declaration during AST deserialization (PR #132214)

2025-04-04 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/132214 >From 91e057bf990e2c454b897982ed0b4e823bb3faba Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Thu, 20 Mar 2025 06:51:46 -0700 Subject: [PATCH 01/11] [clang] Fix for regression #130917 Changes in #11199

[clang] 428fc2c - [NFC][HLSL][RootSignature] Make the Lexer adhere to naming conventions (#134136)

2025-04-04 Thread via cfe-commits
Author: Finn Plummer Date: 2025-04-04T13:43:45-07:00 New Revision: 428fc2c8875eca42b4803fe100791270ec971e4d URL: https://github.com/llvm/llvm-project/commit/428fc2c8875eca42b4803fe100791270ec971e4d DIFF: https://github.com/llvm/llvm-project/commit/428fc2c8875eca42b4803fe100791270ec971e4d.diff

[clang] [NFC][HLSL][RootSignature] Make the Lexer adhere to naming conventions (PR #134136)

2025-04-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/134136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Introduce a helper for emitting compatibility diagnostics (PR #132348)

2025-04-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/13837 Here is the relevant pi

[clang] [clang-tools-extra] [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #131965)

2025-04-04 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @aeubanks Done, reverted, needed to revert another PR first. https://github.com/llvm/llvm-project/pull/131965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix `thread_local` false positives in `misc-use-internal-linkage` check (PR #132573)

2025-04-04 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/132573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Suppress pedantic diagnostic for a file not ending in EOL (PR #131794)

2025-04-04 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -triple

[clang] [clang] Use DenseMap::insert_range (NFC) (PR #133655)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/133655.diff 3 Files Affected: - (modified) clang/lib/AST/VTableBuilder.cpp (+2-4) - (modified) clang/lib/CodeGen/CodeGenModule.cpp (

[libclc] [libclc] add --only-needed to llvm-link when INTERNALIZE flag is set (PR #130871)

2025-04-04 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: Interesting - I'm not seeing any change in bytecode modules before and after this change. https://github.com/llvm/llvm-project/pull/130871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [flang] [clang][driver] Fix -fveclib=ArmPL issue: with -nostdlib do not link against libm (PR #133578)

2025-04-04 Thread Paul Osmialowski via cfe-commits
@@ -515,17 +515,19 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, // // 1. On Linux, link only when actually needed. // - // 2. Prefer libm functions over libamath. + // 2. Prefer libm functions over libamath (when

[libclc] [libclc] Relicense gen_convert.py (PR #132213)

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

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

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

[clang] [HLSL][RootSignature] Define and integrate `HLSLRootSignatureAttr` (PR #134124)

2025-04-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building `clang` at step 6 "build stage 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/13939 Here is the relevant pi

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-04-04 Thread Craig Topper via cfe-commits
@@ -0,0 +1,1079 @@ +//===-- RISCVInstrInfoP.td - RISC-V 'P' instructions ---*- 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: A

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [clang] Do not infer lifetimebound for functions with void return type (PR #131997)

2025-04-04 Thread Ilya Biryukov via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++20 -Wno-ignored-attributes -Wno-unused-value -verify %s +// expected-no-diagnostics +namespace std { +template +constexpr const T& as_const(T&) noexcept; + +// We need two declarations to see the error for some reason *shrug*

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-04-04 Thread Paul Kirth via cfe-commits
@@ -516,15 +518,16 @@ writeFileDefinition(const Location &L, std::make_unique(HTMLTag::TAG_A, std::to_string(L.LineNumber)); // The links to a specific line in the source code use the github / // googlesource notation so it won't work for all hosting pages. - // FIXM

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -164,6 +165,20 @@ class CIRGenFunction : public CIRGenTypeCache { /// that it requires no code to be generated. bool isTrivialInitializer(const Expr *init); + /// If the specified expression does not fold to a constant, or if it does but + /// contains a label, retur

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -442,6 +457,25 @@ class CIRGenFunction : public CIRGenTypeCache { mlir::LogicalResult emitDeclStmt(const clang::DeclStmt &s); LValue emitDeclRefLValue(const clang::DeclRefExpr *e); + /// Emit an if on a boolean condition to the specified blocks. + /// FIXME: Based on

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -263,6 +264,72 @@ static void terminateBody(CIRGenBuilderTy &builder, mlir::Region &r, b->erase(); } +mlir::LogicalResult CIRGenFunction::emitIfStmt(const IfStmt &s) { + mlir::LogicalResult res = mlir::success(); + // The else branch of a consteval if statement is al

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -263,6 +264,72 @@ static void terminateBody(CIRGenBuilderTy &builder, mlir::Region &r, b->erase(); } +mlir::LogicalResult CIRGenFunction::emitIfStmt(const IfStmt &s) { + mlir::LogicalResult res = mlir::success(); + // The else branch of a consteval if statement is al

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

<    3   4   5   6   7   8   9   >