[clang] [Clang][DirectX] Always use Diagnostic Printer (PR #135655)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Farzon Lotfi (farzonl) Changes fixes #135654 In #128613 we added safe guards to prevent the lowering of just any intrinsic in the backend. We used `DiagnosticInfoUnsupported` to do this. What we found was when using `opt` the diagnostic

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

2025-04-15 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] [MS][clang] Revert vector deleting destructors support (PR #135611)

2025-04-15 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: @zmodem , @DKLoehr , please feel free to hit the submit button once the pre-commit is green. The revert was not clean, so I would prefer to wait for it. I'm feeling ill and may end up offline after some time. https://github.com/llvm/llvm-project/pull/135611 ___

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

2025-04-15 Thread Amr Hesham 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] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-15 Thread Jan Svoboda via cfe-commits
@@ -108,6 +108,32 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache::diagnoseNegativeStatCachedPaths( +llvm::raw_ostream &OS, llvm::vfs::FileSystem &UnderlyingFS) const { + /

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

2025-04-15 Thread Sirui Mu 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] [Clang] Handle default template arguments for alias CTAD guides (PR #134807)

2025-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/134807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-15 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/135703 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/C++] Fix clang_File_isEqual for in-memory files (PR #135773)

2025-04-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/135773 Add tests for clang_File_isEqual (on-disk and in-memory) >From 62dcfb1cb9bd0918bd471fddc1ffd849c2d604ac Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Tue, 15 Apr 2025 19:17:43 +0900 Subject: [PATCH]

[clang-tools-extra] [clang-doc] Add regression test for test comments in macros (PR #132510)

2025-04-15 Thread via cfe-commits
https://github.com/ZhongUncle edited https://github.com/llvm/llvm-project/pull/132510 ___ 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-15 Thread Erich Keane via cfe-commits
@@ -1043,6 +1141,8 @@ class Sema; /// C++ [over.match.call.general] /// Resolve a call through the address of an overload set. CSK_AddressOfOverloadSet, + + CSK_CodeCompletion, erichkeane wrote: Ah, I see. Can you clarify that in a comm

[clang] [Clang] Add support for GCC bound member functions extension (PR #135649)

2025-04-15 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/135649 >From 6f0a3ba5852134d8bd04679438866e6f373f494a Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 15 Apr 2025 12:12:19 +0800 Subject: [PATCH 1/4] [Clang] Add support for GCC bound member functions extensio

[clang] [Clang] Add support for GCC bound member functions extension (PR #135649)

2025-04-15 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/135649 >From 445c08bcb007f157f6c66c5fabb01c2aa88b3a89 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 15 Apr 2025 22:58:44 +0800 Subject: [PATCH 1/2] [Clang] Add support for GCC bound member functions extensio

[clang] [llvm] [AArch64][clang][llvm] Add structured sparsity outer product (TMOP) intrinsics (PR #135145)

2025-04-15 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray deleted https://github.com/llvm/llvm-project/pull/135145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Explicitly mark constexpr-unknown variables as such (PR #135806)

2025-04-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/135806 Instead of trying to figure out what's constexpr-unknown later on. >From 17b01c64357ecddcf64144ab28ffd85ac7126acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 14 Apr 2025 17:18:50 +0

[clang] [CLANG] Enable alignas after GNU attributes (PR #133107)

2025-04-15 Thread Aaron Ballman via cfe-commits
@@ -3062,13 +3062,16 @@ class Parser : public CodeCompletionHandler { bool CouldBeBitField = false); Decl *ParseHLSLBuffer(SourceLocation &DeclEnd); - void MaybeParseMicrosoftAttributes(ParsedAttributes &Attrs) { + bool MaybeParseMicrosoftAttrib

[clang] [clang][bytecode] Explicitly mark constexpr-unknown variables as such (PR #135806)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Instead of trying to figure out what's constexpr-unknown later on. --- Full diff: https://github.com/llvm/llvm-project/pull/135806.diff 7 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+

[clang] Allow some attributes on declarations after definitions (PR #135791)

2025-04-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/135791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ece10a6 - Allow some attributes on declarations after definitions (#135791)

2025-04-15 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-04-15T12:21:04-04:00 New Revision: ece10a64cb180ba931b60cbd939d80412973eada URL: https://github.com/llvm/llvm-project/commit/ece10a64cb180ba931b60cbd939d80412973eada DIFF: https://github.com/llvm/llvm-project/commit/ece10a64cb180ba931b60cbd939d80412973eada.diff

[clang] [CLANG] Enable alignas after GNU attributes (PR #133107)

2025-04-15 Thread Aaron Ballman via cfe-commits
@@ -2,3 +2,26 @@ _Alignas(int) struct c1; // expected-warning {{'_Alignas' attribute ignored}} alignas(int) struct c1; // expected-warning {{'alignas' attribute ignored}} + + +__attribute__(()) [[]] alignas(int) int a; // expected-none TODO: actually this line should be an er

[clang] [CLANG] Enable alignas after GNU attributes (PR #133107)

2025-04-15 Thread Aaron Ballman via cfe-commits
@@ -24,7 +24,7 @@ int templateFunction(T value) __attribute__((annotate("works"))); // CHECK: ClassDecl=Test:3:7 (Definition) Extent=[3:1 - 17:2] // CHECK-NEXT: CXXAccessSpecifier=:4:1 (Definition) Extent=[4:1 - 4:8] -// CHECK-NEXT: CXXMethod=aMethod:5:51 Extent=[5:3 - 5:60]

[clang] [llvm] [Offload][SYCL] Refactor OffloadKind implementation (PR #135809)

2025-04-15 Thread Joseph Huber via cfe-commits
@@ -923,10 +923,9 @@ Expected> linkAndWrapDeviceFiles( }); auto LinkerArgs = getLinkerArgs(Input, BaseArgs); -DenseSet ActiveOffloadKinds; +uint16_t ActiveOffloadKindMask = 0u; jhuber6 wrote: This code doesn't need to be modified, but I gu

[clang] [llvm] [Offload][SYCL] Refactor OffloadKind implementation (PR #135809)

2025-04-15 Thread Joseph Huber via cfe-commits
@@ -32,10 +32,12 @@ namespace object { /// The producer of the associated offloading image. enum OffloadKind : uint16_t { OFK_None = 0, - OFK_OpenMP, - OFK_Cuda, - OFK_HIP, - OFK_LAST, + OFK_OpenMP = (1 << 1), jhuber6 wrote: This is 2, not 1. https://g

[clang] [llvm] [Offload][SYCL] Refactor OffloadKind implementation (PR #135809)

2025-04-15 Thread Joseph Huber via cfe-commits
@@ -32,10 +32,12 @@ namespace object { /// The producer of the associated offloading image. enum OffloadKind : uint16_t { OFK_None = 0, - OFK_OpenMP, - OFK_Cuda, - OFK_HIP, - OFK_LAST, + OFK_OpenMP = (1 << 1), + OFK_FIRST = OFK_OpenMP, jhuber6 wrote: W

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

2025-04-15 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Done. Thank you for your contribution! https://github.com/llvm/llvm-project/pull/135420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-04-15 Thread marius doerner via cfe-commits
https://github.com/mariusdr updated https://github.com/llvm/llvm-project/pull/133574 >From bcf038103c717edfdcf633ac8f3f6f1f306d927a Mon Sep 17 00:00:00 2001 From: marius doerner Date: Sat, 29 Mar 2025 09:21:20 +0100 Subject: [PATCH 1/3] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMa

[clang] 3192ecf - [CodeComplete] Don't drop ArrayToPointerDecay when doing member completion (#134951)

2025-04-15 Thread via cfe-commits
Author: Akira Hatanaka Date: 2025-04-15T10:12:18-07:00 New Revision: 3192ecfa89a48b5f56ff36956abe7e84327ced5d URL: https://github.com/llvm/llvm-project/commit/3192ecfa89a48b5f56ff36956abe7e84327ced5d DIFF: https://github.com/llvm/llvm-project/commit/3192ecfa89a48b5f56ff36956abe7e84327ced5d.diff

[clang] [CodeComplete] Don't drop ArrayToPointerDecay when doing member completion (PR #134951)

2025-04-15 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/134951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Unify `SourceLocation` and `IdentifierInfo*` pair-like data structures to `IdentifierLoc` (PR #135808)

2025-04-15 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. lgtm, but make sure to address Matheus's comments https://github.com/llvm/llvm-project/pull/135808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

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

2025-04-15 Thread John McCall 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] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-04-15 Thread marius doerner via cfe-commits
mariusdr wrote: > LGTM - sorry for the delayed response. > > Will you need me to merge that for you (once the merge conflict is resolved)? Yes, thanks! https://github.com/llvm/llvm-project/pull/133574 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [CodeComplete] Don't drop ArrayToPointerDecay when doing member completion (PR #134951)

2025-04-15 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/16064 Here is the relevant piece of the

[clang] [CLANG-CL] ignores Wpadded (PR #134426)

2025-04-15 Thread Devon Loehr via cfe-commits
=?utf-8?q?Th=C3=A9o?= De Magalhaes , =?utf-8?q?Th=C3=A9o?= De Magalhaes , =?utf-8?q?Th=C3=A9o?= De Magalhaes , =?utf-8?q?Th=C3=A9o?= De Magalhaes , =?utf-8?q?Th=C3=A9o?= De Magalhaes , =?utf-8?q?Th=C3=A9o?= De Magalhaes , =?utf-8?q?Th=C3=A9o?= De Magalhaes , =?utf-8?q?Th=C3=A9o?= De Magalhaes ,Theo

[clang] [OpenACC][CIR] Implement 'self' lowering on compute constructs (PR #135851)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes This is our first attempt at lowering a clause that is an 'operand' in the OpenACC operand, so it does quite a bit of refactoring. My previous plans on how to emit the clauses was not viable, so we instea

[clang] [OpenACC][CIR] Implement 'self' lowering on compute constructs (PR #135851)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Erich Keane (erichkeane) Changes This is our first attempt at lowering a clause that is an 'operand' in the OpenACC operand, so it does quite a bit of refactoring. My previous plans on how to emit the clauses was not viable, so we inst

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

2025-04-15 Thread Andy Kaylor 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] [OpenACC][CIR] Implement 'self' lowering on compute constructs (PR #135851)

2025-04-15 Thread Valentin Clement バレンタイン クレメン via cfe-commits
@@ -89,64 +95,70 @@ class OpenACCClauseCIREmitter final } void VisitDeviceTypeClause(const OpenACCDeviceTypeClause &clause) { +if constexpr (isOneOfTypes) { + llvm::SmallVector deviceTypes; + std::optional existingDeviceTypes = + operation.getDeviceT

[clang] [OpenACC][CIR] Implement 'self' lowering on compute constructs (PR #135851)

2025-04-15 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/135851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for complete record types (PR #135844)

2025-04-15 Thread Erich Keane via cfe-commits
@@ -0,0 +1,212 @@ +//===--===// +// +// 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-15 Thread Erich Keane 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-15 Thread Erich Keane via cfe-commits
@@ -0,0 +1,92 @@ +//==-- 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-15 Thread Erich Keane via cfe-commits
@@ -303,14 +305,23 @@ const CIRGenFunctionInfo &CIRGenTypes::arrangeCIRFunctionInfo() { assert(!cir::MissingFeatures::opCallCallConv()); // Construction the function info. We co-allocate the ArgInfos. - fi = CIRGenFunctionInfo::create(); + fi = CIRGenFunctionInfo::creat

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

2025-04-15 Thread Erich Keane via cfe-commits
@@ -303,14 +305,23 @@ const CIRGenFunctionInfo &CIRGenTypes::arrangeCIRFunctionInfo() { assert(!cir::MissingFeatures::opCallCallConv()); // Construction the function info. We co-allocate the ArgInfos. - fi = CIRGenFunctionInfo::create(); + fi = CIRGenFunctionInfo::creat

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

2025-04-15 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I have some concerns with how the `CIRGenFunctionInfo` objects are being created, then turned into a reference/never deleted. https://github.com/llvm/llvm-project/pull/135552 ___ cfe-commits mailing list cfe-

[clang] [OpenACC][CIR] Implement 'self' lowering on compute constructs (PR #135851)

2025-04-15 Thread Erich Keane via cfe-commits
@@ -32,46 +32,52 @@ constexpr bool isOneOfTypes = template constexpr bool isOneOfTypes = std::is_same_v; +template class OpenACCClauseCIREmitter final -: public OpenACCClauseVisitor { - CIRGenModule &cgm; +: public OpenACCClauseVisitor> { + OpTy &operation; + CIR

[clang] [OpenACC][CIR] Implement 'self' lowering on compute constructs (PR #135851)

2025-04-15 Thread Erich Keane via cfe-commits
@@ -89,64 +95,70 @@ class OpenACCClauseCIREmitter final } void VisitDeviceTypeClause(const OpenACCDeviceTypeClause &clause) { +if constexpr (isOneOfTypes) { + llvm::SmallVector deviceTypes; + std::optional existingDeviceTypes = + operation.getDeviceT

[clang] [OpenACC][CIR] Implement 'self' lowering on compute constructs (PR #135851)

2025-04-15 Thread Erich Keane via cfe-commits
@@ -32,46 +32,52 @@ constexpr bool isOneOfTypes = template constexpr bool isOneOfTypes = std::is_same_v; +template erichkeane wrote: We end up needing to template-ize this, since the visitor handler functions are not needing to `if-constexpr` instead of ju

[clang] [OpenACC][CIR] Implement 'self' lowering on compute constructs (PR #135851)

2025-04-15 Thread Erich Keane via cfe-commits
@@ -89,64 +95,70 @@ class OpenACCClauseCIREmitter final } void VisitDeviceTypeClause(const OpenACCDeviceTypeClause &clause) { +if constexpr (isOneOfTypes) { + llvm::SmallVector deviceTypes; + std::optional existingDeviceTypes = + operation.getDeviceT

[clang] [OpenACC][CIR] Implement 'self' lowering on compute constructs (PR #135851)

2025-04-15 Thread Erich Keane via cfe-commits
@@ -430,6 +430,11 @@ class OpenACCSelfClause final } bool isConditionExprClause() const { return HasConditionExpr.has_value(); } + bool isVarListClause() const { return !isConditionExprClause(); } + bool isEmptySelfClause() const { +return (isConditionExprClause() &&

[clang] [OpenACC][CIR] Implement 'self' lowering on compute constructs (PR #135851)

2025-04-15 Thread Erich Keane via cfe-commits
@@ -158,24 +170,27 @@ mlir::LogicalResult CIRGenFunction::emitOpenACCOpAssociatedStmt( llvm::SmallVector retTy; llvm::SmallVector operands; - - // Clause-emitter must be here because it might modify operands. - OpenACCClauseCIREmitter clauseEmitter(getCIRGenModule(), di

[clang] [OpenACC][CIR] Implement 'self' lowering on compute constructs (PR #135851)

2025-04-15 Thread Erich Keane via cfe-commits
erichkeane wrote: +Razvan/Valentin for review of the OpenACC-IR. https://github.com/llvm/llvm-project/pull/135851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-15 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: we're seeing the following after this patch: ``` /Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm/llvm/lib/Support/ProgramStack.cpp:67:34: error: this directive must appear between .cfi_startproc and .cfi_endproc directives 67 | "add x29, x0, #0x10\n\t"

[clang] [llvm] Introduce -funique-source-file-names flag. (PR #135728)

2025-04-15 Thread Vitaly Buka via cfe-commits
@@ -345,27 +345,25 @@ void llvm::filterDeadComdatFunctions( std::string llvm::getUniqueModuleId(Module *M) { MD5 Md5; - bool ExportsSymbols = false; - auto AddGlobal = [&](GlobalValue &GV) { -if (GV.isDeclaration() || GV.getName().starts_with("llvm.") || -!GV.h

[clang] [CIR] Upstream initial support for complete record types (PR #135844)

2025-04-15 Thread Erich Keane via cfe-commits
@@ -0,0 +1,212 @@ +//===--===// +// +// 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] [llvm] [NVPTX] Cleanup and document nvvm.fabs intrinsics, adding f16 support (PR #135644)

2025-04-15 Thread Alex MacLean via cfe-commits
@@ -411,6 +412,13 @@ static Instruction *convertNvvmIntrinsicToLlvm(InstCombiner &IC, } return nullptr; } + case SPC_Fabs: { +if (!II->getType()->isDoubleTy()) + return nullptr; +auto *Fabs = Intrinsic::getOrInsertDeclaration( +II->getModule(),

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

2025-04-15 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,llvm` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/16079 Here is the relevant piece o

[clang] [llvm] [NVPTX] Cleanup and document nvvm.fabs intrinsics, adding f16 support (PR #135644)

2025-04-15 Thread Alex MacLean via cfe-commits
@@ -1034,6 +1034,10 @@ Value *CodeGenFunction::EmitNVPTXBuiltinExpr(unsigned BuiltinID, case NVPTX::BI__nvvm_fmin_xorsign_abs_f16x2: return MakeHalfType(Intrinsic::nvvm_fmin_xorsign_abs_f16x2, BuiltinID, E, *this); + case NVPTX::BI__nvvm_abs_bf16

[clang] [llvm] Introduce -funique-source-file-names flag. (PR #135728)

2025-04-15 Thread Peter Collingbourne via cfe-commits
@@ -345,27 +345,25 @@ void llvm::filterDeadComdatFunctions( std::string llvm::getUniqueModuleId(Module *M) { MD5 Md5; - bool ExportsSymbols = false; - auto AddGlobal = [&](GlobalValue &GV) { -if (GV.isDeclaration() || GV.getName().starts_with("llvm.") || -!GV.h

[clang] [llvm] [Offload][SYCL] Refactor OffloadKind implementation (PR #135809)

2025-04-15 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/135809 >From ec072a0ef5b699c58dd2ac404c90a5078f4a774a Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Tue, 15 Apr 2025 09:27:27 -0700 Subject: [PATCH 1/3] [Offload][SYCL] Refactor OffloadKind implementation Si

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-15 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/135703 >From d4b1210c16b4fccc6faa9445bee457a1e330a025 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 14 Apr 2025 16:49:07 -0700 Subject: [PATCH 1/3] Initial commit. --- .../DependencyScanningFilesystem.h

[clang] [NFC][Clang] Introduce type aliases to replace use of auto in clang/lib/CodeGen/CGCall.cpp. (PR #135861)

2025-04-15 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann created https://github.com/llvm/llvm-project/pull/135861 `CGCall.cpp` declares several functions with a return type that is an explicitly spelled out specialization of `SmallVector`. Previously, `auto` was used in several places to avoid repeating the long type n

[clang] [NFC][Clang] Introduce type aliases to replace use of auto in clang/lib/CodeGen/CGCall.cpp. (PR #135861)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Honermann (tahonermann) Changes `CGCall.cpp` declares several functions with a return type that is an explicitly spelled out specialization of `SmallVector`. Previously, `auto` was used in several places to avoid repeating the long ty

[clang] [NFC][Clang] Introduce type aliases to replace use of auto in clang/lib/CodeGen/CGCall.cpp. (PR #135861)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Tom Honermann (tahonermann) Changes `CGCall.cpp` declares several functions with a return type that is an explicitly spelled out specialization of `SmallVector`. Previously, `auto` was used in several places to avoid repeating the

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-15 Thread Qiongsi Wu via cfe-commits
@@ -108,6 +108,31 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache::diagnoseNegativeStatCachedPaths( +llvm::raw_ostream &OS, llvm::vfs::FileSystem &UnderlyingFS) const { + /

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

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

[clang] [llvm] Introduce -funique-source-file-names flag. (PR #135728)

2025-04-15 Thread Vitaly Buka via cfe-commits
@@ -345,27 +345,25 @@ void llvm::filterDeadComdatFunctions( std::string llvm::getUniqueModuleId(Module *M) { MD5 Md5; - bool ExportsSymbols = false; - auto AddGlobal = [&](GlobalValue &GV) { -if (GV.isDeclaration() || GV.getName().starts_with("llvm.") || -!GV.h

[clang] [HLSL] Don't invoke `dxv` from `clang-dxc` for text output (PR #135876)

2025-04-15 Thread Justin Bogner via cfe-commits
https://github.com/bogner created https://github.com/llvm/llvm-project/pull/135876 Running `clang-dxc` with textual output was emitting various spurious warnings (if `dxv` wasn't on your path) or errors (if it was). Avoid these by not attempting to run this tool when it doesn't make sense to d

[clang] [Fuchsia] Not building llvm-mt when LIBXML2 is not enabled. (PR #135877)

2025-04-15 Thread via cfe-commits
https://github.com/zeroomega created https://github.com/llvm/llvm-project/pull/135877 This patch prevents including llvm-mt to LLVM_TOOLCHAIN_TOOLS when LIBXML2 is not explicitly enabled. >From 91c8f62bf432a296d29a2445c93738b5c4c85f63 Mon Sep 17 00:00:00 2001 From: Haowei Wu Date: Tue, 15 Apr

[clang] [HLSL] Don't invoke `dxv` from `clang-dxc` for text output (PR #135876)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Justin Bogner (bogner) Changes Running `clang-dxc` with textual output was emitting various spurious warnings (if `dxv` wasn't on your path) or errors (if it was). Avoid these by not attempting to run this tool when it doesn't make

[clang] [HLSL] Don't invoke `dxv` from `clang-dxc` for text output (PR #135876)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Justin Bogner (bogner) Changes Running `clang-dxc` with textual output was emitting various spurious warnings (if `dxv` wasn't on your path) or errors (if it was). Avoid these by not attempting to run this tool when it doesn't make sense

[clang] [Fuchsia] Not building llvm-mt when LIBXML2 is not enabled. (PR #135877)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haowei (zeroomega) Changes This patch prevents including llvm-mt to LLVM_TOOLCHAIN_TOOLS when LIBXML2 is not explicitly enabled. --- Full diff: https://github.com/llvm/llvm-project/pull/135877.diff 1 Files Affected: - (modified) clang/

[clang] af63e1b - [OpenACC][CIR] Implement 'self' lowering on compute constructs (#135851)

2025-04-15 Thread via cfe-commits
Author: Erich Keane Date: 2025-04-15T15:52:04-07:00 New Revision: af63e1b505453de3e6a281d1b72e62fa8d396b23 URL: https://github.com/llvm/llvm-project/commit/af63e1b505453de3e6a281d1b72e62fa8d396b23 DIFF: https://github.com/llvm/llvm-project/commit/af63e1b505453de3e6a281d1b72e62fa8d396b23.diff L

[clang] [OpenACC][CIR] Implement 'self' lowering on compute constructs (PR #135851)

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

[clang] [llvm] [HLSL] Implement the `faceforward` intrinsic (PR #135878)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-hlsl Author: Kaitlin Peng (kmpeng) Changes Resolves #99114. There will be a follow-up PR on pattern matching later. Tasks completed: - Implement `faceforward` in `hlsl_intrinsics.h`/`hlsl_int

[clang] [llvm] [HLSL] Implement the `faceforward` intrinsic (PR #135878)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-spir-v Author: Kaitlin Peng (kmpeng) Changes Resolves #99114. There will be a follow-up PR on pattern matching later. Tasks completed: - Implement `faceforward` in `hlsl_intrinsics.h`/`hlsl_intrinsic_helpers.h` - Implement `faceforward` SPIR-V t

[clang] [llvm] [HLSL] Implement the `faceforward` intrinsic (PR #135878)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kaitlin Peng (kmpeng) Changes Resolves #99114. There will be a follow-up PR on pattern matching later. Tasks completed: - Implement `faceforward` in `hlsl_intrinsics.h`/`hlsl_intrinsic_helpers.h` - Implement `faceforward` SPIR-V ta

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

2025-04-15 Thread Alex MacLean 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] [alpha.webkit.UnretainedCallArgsChecker] Add the support for RetainPtrArc (PR #135532)

2025-04-15 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/135532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement the `faceforward` intrinsic (PR #135878)

2025-04-15 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng created https://github.com/llvm/llvm-project/pull/135878 Resolves #99114. There will be a follow-up PR on pattern matching later. Tasks completed: - Implement `faceforward` in `hlsl_intrinsics.h`/`hlsl_intrinsic_helpers.h` - Implement `faceforward` SPIR-V target builti

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

2025-04-15 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-with-thin-lto-ubuntu` running on `as-worker-92` while building `clang,llvm` at step 6 "build-stage1-compiler". Full details are available at: https://lab.llvm.org/buildbot/#/builders/127/builds/3025 Here is the releva

[clang] [llvm] LowerTypeTests: Fix quadratic complexity. (PR #135875)

2025-04-15 Thread Peter Collingbourne via cfe-commits
https://github.com/pcc edited https://github.com/llvm/llvm-project/pull/135875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] LowerTypeTests: Fix quadratic complexity. (PR #135875)

2025-04-15 Thread Peter Collingbourne via cfe-commits
https://github.com/pcc closed https://github.com/llvm/llvm-project/pull/135875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for complete record types (PR #135844)

2025-04-15 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/135844 >From 6ffd93ef63e068b73f451af0a05cc471d5cca9fb Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 15 Apr 2025 12:08:37 -0700 Subject: [PATCH 1/3] [CIR] Upstream initial support for complete record types T

[clang] [HLSL] Don't invoke `dxv` from `clang-dxc` for text output (PR #135876)

2025-04-15 Thread Damyan Pepper via cfe-commits
@@ -309,6 +309,9 @@ HLSLToolChain::TranslateArgs(const DerivedArgList &Args, StringRef BoundArch, } bool HLSLToolChain::requiresValidation(DerivedArgList &Args) const { + if (!Args.hasArg(options::OPT_dxc_Fo)) +return false; damyanp wrote: Doesn't this

[clang] 2d98bdc - Revert "[llvm][clang] Allocate a new stack instead of spawning a new … (#135865)

2025-04-15 Thread via cfe-commits
Author: Daniel Thornburgh Date: 2025-04-15T14:46:55-07:00 New Revision: 2d98bdc12c291523c3543ceaf1c526e25dcaedc6 URL: https://github.com/llvm/llvm-project/commit/2d98bdc12c291523c3543ceaf1c526e25dcaedc6 DIFF: https://github.com/llvm/llvm-project/commit/2d98bdc12c291523c3543ceaf1c526e25dcaedc6.d

[clang] [llvm] Revert "[llvm][clang] Allocate a new stack instead of spawning a new … (PR #135865)

2025-04-15 Thread Daniel Thornburgh via cfe-commits
https://github.com/mysterymath closed https://github.com/llvm/llvm-project/pull/135865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[llvm][clang] Allocate a new stack instead of spawning a new … (PR #135865)

2025-04-15 Thread Daniel Thornburgh via cfe-commits
https://github.com/mysterymath created https://github.com/llvm/llvm-project/pull/135865 …thread to get more stack space (#133173)" This change breaks the Clang build on Mac AArch64. This reverts commit d0c973a7a0149db3b71767d4c5a20a31e6a8ed5b. This reverts commit 429a84f8a4bf559f43f50072747ef

[clang] [clang] Constant-evaluate format strings as last resort (PR #135864)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (apple-fcloutier) Changes I [asked on the forums](https://discourse.llvm.org/t/should-attribute-format-checking-try-to-const-evaluate-strings/85854/4) and people were generally supportive of the idea, so: Clang's -Wformat checker ca

[clang] [CIR] Upstream initial support for complete record types (PR #135844)

2025-04-15 Thread Andy Kaylor via cfe-commits
@@ -126,6 +130,12 @@ void CIRRecordLowering::lower() { return; } + if (isa(recordDecl)) { +cirGenTypes.getCGModule().errorNYI(recordDecl->getSourceRange(), andykaylor wrote: Eventually, yes. We aren't handling CXXRecordDecl in the code that gets he

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

2025-04-15 Thread Daniel Thornburgh via cfe-commits
mysterymath wrote: > we're seeing the following after this patch: > > ``` > /Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm/llvm/lib/Support/ProgramStack.cpp:67:34: > error: this directive must appear between .cfi_startproc and .cfi_endproc > directives >67 | "add x29,

[clang] [CIR] Upstream initial support for complete record types (PR #135844)

2025-04-15 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > still 1 comment request, else LGTM. Comment request? Am I still missing something? https://github.com/llvm/llvm-project/pull/135844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [llvm] Revert "[llvm][clang] Allocate a new stack instead of spawning a new … (PR #135865)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-support Author: Daniel Thornburgh (mysterymath) Changes …thread to get more stack space (#133173)" This change breaks the Clang build on Mac AArch64. This reverts commit d0c973a7a0149db3b71767d4c5a20a31e6a8ed5b. This rev

[clang] [llvm] Revert "[llvm][clang] Allocate a new stack instead of spawning a new … (PR #135865)

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

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

2025-04-15 Thread Tom Stellard via cfe-commits
tstellar wrote: @AaronBallman Were you able to manually cherry-pick this one? https://github.com/llvm/llvm-project/pull/135660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-04-15 Thread Eli Friedman via cfe-commits
@@ -5087,6 +5087,19 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, assert(EllipsisLoc.isInvalid() && "Friend ellipsis but not friend-specified?"); + if (DS.isExportSpecified()) { +VisibilityAttr *existingAttr = TagD->getAttr(); +if

[clang] [llvm] [RISCV] Add MC layer support for XSfmm*. (PR #133031)

2025-04-15 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/133031 >From bb123ff9401b517d877de4ed6fd9ea61edf49dbb Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 18 Mar 2025 20:53:19 -0700 Subject: [PATCH 1/4] [RISCV] Add MC layer support for XSfmm*. This adds assembler

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

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

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

2025-04-15 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: mgschossmann wrote: Thanks for your approval. As I do not have write permissions, can you please merge the PR for me? https://github.com/llvm

[clang] [llvm] [NVPTX] Cleanup and document nvvm.fabs intrinsics, adding f16 support (PR #135644)

2025-04-15 Thread Artem Belevich via cfe-commits
@@ -1034,6 +1034,10 @@ Value *CodeGenFunction::EmitNVPTXBuiltinExpr(unsigned BuiltinID, case NVPTX::BI__nvvm_fmin_xorsign_abs_f16x2: return MakeHalfType(Intrinsic::nvvm_fmin_xorsign_abs_f16x2, BuiltinID, E, *this); + case NVPTX::BI__nvvm_abs_bf16

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

2025-04-15 Thread 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

<    1   2   3   4   5   6   7   >