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

2025-04-10 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng edited https://github.com/llvm/llvm-project/pull/134171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 27c099b - Move CodeGen cuda.h to Inputs from include (#134706)

2025-04-10 Thread via cfe-commits
Author: Drew Lewis Date: 2025-04-07T12:23:10-07:00 New Revision: 27c099bc84d1432752b3828f1ba95de24db76c5e URL: https://github.com/llvm/llvm-project/commit/27c099bc84d1432752b3828f1ba95de24db76c5e DIFF: https://github.com/llvm/llvm-project/commit/27c099bc84d1432752b3828f1ba95de24db76c5e.diff LO

[clang] [CIR] Upstream support for cir.get_global (PR #135095)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This adds basic support for referencing global variables from within functions via the cir.get_global operation. --- Full diff: https://github.com/llvm/llvm-project/pull/135095

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: I'm concerned though, that MSVC calls SOME destructor and doesn't error out which seems like a bug. See https://godbolt.org/z/q8znTG5aa . https://github.com/llvm/llvm-project/pull/135041 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [clang] [sanitizer] predict trap checks succeed (PR #134310)

2025-04-10 Thread Vitaly Buka via cfe-commits
@@ -41,31 +41,31 @@ void caller(void (*f)(void)) { // CHECK: [[CONT1]]: // CHECK: %[[NOT_1:.*]] = icmp ne i8 %[[KIND]], 1 -// CHECK: br i1 %[[NOT_1]], label %[[CONT2:.*]], label %[[HANDLE1:.*]], !nosanitize +// CHECK: br i1 %[[NOT_1]], label %[[CONT2:.*]], label %[[HAND

[clang] [C99] Remove the tgmath.h header (PR #135236)

2025-04-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/135236 Clang provides a number of headers which are required because the compiler is the only part of the implementation which can provide the correct macro definitions. Things like or are such headers. is no

[clang] [C99] Remove the tgmath.h header (PR #135236)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes Clang provides a number of headers which are required because the compiler is the only part of the implementation which can provide the correct macro definitions. Things like or a

[clang] [C99] Remove the tgmath.h header (PR #135236)

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

[clang] [Clang][CodeGen][X86] don't coerce int128 into `{i64,i64}` for SysV-like ABIs (PR #135230)

2025-04-10 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: I haven't checked the implementation, but conceptually this looks fine. Passing as i128 instead of {i64, i64} is better for optimization purposes. Rust already passes these as i128, so we know that works, and change will improve x-lang LTO. (Clang also passe

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

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

[clang] [HLSL] Desugar ConstantArrayType when calculating cbuffer field layout (PR #134683)

2025-04-10 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! One suggestion to use `getUnqualifiedDesugaredType` instead of `getDesugaredType` that requires a context. https://github.com/llvm/llvm-project/pull/134683 ___ cfe-commits mailing list cfe-co

[clang] [C99] Remove the tgmath.h header (PR #135236)

2025-04-10 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Background: it's not clear to me which C Standard Library headers Clang should or should not provide, so perhaps this change is wrong for reasons I don't understand. However, we have a number of open bug reports about our implementation of tgmath.h, and there are further ch

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/135041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen][X86] don't coerce int128 into `{i64,i64}` for SysV-like ABIs (PR #135230)

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

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

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

[clang] [Clang][CodeGen][X86] don't coerce int128 into `{i64,i64}` for SysV-like ABIs (PR #135230)

2025-04-10 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: There isn't any reason we can't do this... but it doesn't really solve the issue in general. And there are a lot of other ways to trip over this. CC @dblaike @hvdijk @jmorse Do we want to try to handle _BitInt, or a struct containing an i128? https://github.com/llvm/ll

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-10 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 >From a05af192052de8503fb4945bfb853b3f2c14e4c9 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Mon, 7 Apr 2025 13:58:25 -0500 Subject: [PATCH 1/2] Codegen for Reduction over private variables with reduc

[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-10 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: Talked a bit offline, but the patch LGTM, assuming it is purely restoring the previous behavior before https://github.com/llvm/llvm-project/commit/55323ca6c8b9d21d85591f3499b299b62463321f, which would result in performance parity with the release compiler. > I suggest we

[clang] [C99] Remove the tgmath.h header (PR #135236)

2025-04-10 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > Today, that's no longer the case. IBM's AIX ships a `tgmath.h` that only works with the IBM non-Clang-based XL compiler. https://github.com/llvm/llvm-project/pull/135236 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-04-10 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/106321 >From b17b93dc917077cb588befde683a621e096c4f85 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Thu, 15 Aug 2024 16:33:04 -0700 Subject: [PATCH] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on po

[clang] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-10 Thread Viktoriia Bakalova via cfe-commits
https://github.com/VitaNuo updated https://github.com/llvm/llvm-project/pull/133910 >From cfa057b4d43ebe7f94ccd4f387a94359beaa29b2 Mon Sep 17 00:00:00 2001 From: Viktoriia Bakalova Date: Fri, 4 Apr 2025 17:45:24 +0200 Subject: [PATCH 1/8] This commit implements a CC1 flag `-dump-deserialized-d

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-10 Thread Alexey Bataev via cfe-commits
@@ -5201,6 +5345,9 @@ void CGOpenMPRuntime::emitReduction(CodeGenFunction &CGF, SourceLocation Loc, CGF.EmitBranch(DefaultBB); CGF.EmitBlock(DefaultBB, /*IsFinished=*/true); + if (Options.IsPrivateVarReduction) { +emitPrivateReduction(CGF, Loc, Privates, LHSExprs, RH

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-10 Thread Nick Sarnie via cfe-commits
@@ -37,8 +37,8 @@ static const unsigned SPIRDefIsPrivMap[] = { 0, // cuda_device 0, // cuda_constant 0, // cuda_shared -// SYCL address space values for this map are dummy -0, // sycl_global +// Most SYCL address space values for this map are dummy -

[clang] Implement `-dump-minimization-hints` flag. (PR #133910)

2025-04-10 Thread Viktoriia Bakalova via cfe-commits
@@ -49,6 +54,185 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

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

2025-04-10 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,186 @@ +// RUN: %clang_cc1 -fsycl-is-host -emit-llvm -triple x86_64-unknown-linux-gnu %s -o - | FileCheck --check-prefixes=CHECK-HOST,CHECK-HOST-LINUX %s +// RUN: %clang_cc1 -fsycl-is-device -emit-llvm -aux-triple x86_64-unknown-linux-gnu -triple amdgcn-amd-amdhsa %s

[clang] [clang-tools-extra] [clang] Improved canonicalization for template specialization types (PR #135119)

2025-04-10 Thread Dmitry Vasilyev via cfe-commits
slydiman wrote: Please note we got the assert (ASTContext.cpp, line 5619) at least on the following buildbots: [lldb-remote-linux-win](https://lab.llvm.org/buildbot/#/builders/197): ``` UNSUPPORTED: LLDB (C:\buildbot\as-builder-10\lldb-x-aarch64\build\bin\clang.exe-aarch64) :: test_dsym (Test

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-10 Thread Deepak Eachempati via cfe-commits
@@ -11899,6 +11899,9 @@ def err_omp_clause_requires_dispatch_construct : Error< "'%0' clause requires 'dispatch' context selector">; def err_omp_append_args_with_varargs : Error< "'append_args' is not allowed with varargs functions">; +def warn_omp_dispatch_clause_novariant

[clang] [CIR] Handle NullStmt (PR #134889)

2025-04-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 2 nits, else its fine. https://github.com/llvm/llvm-project/pull/134889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-10 Thread Nick Sarnie via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) sarnex wr

[clang-tools-extra] [clang-tidy] Fix `cert-err33-c` to ignore functions with same prefixes as target (PR #135160)

2025-04-10 Thread Carlos Galvez via cfe-commits
=?utf-8?q?Björn?= Svensson Message-ID: In-Reply-To: @@ -50,183 +50,183 @@ namespace { // with NULL argument and in this case the check is not applicable: // `mblen, mbrlen, mbrtowc, mbtowc, wctomb, wctomb_s`. // FIXME: The check can be improved to handle such cases. -const l

[clang-tools-extra] [clang-tidy] Fix `cert-err33-c` to ignore functions with same prefixes as target (PR #135160)

2025-04-10 Thread Carlos Galvez via cfe-commits
=?utf-8?q?Bj=C3=B6rn?= Svensson Message-ID: In-Reply-To: https://github.com/carlosgalvezp approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/135160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-10 Thread Joseph Huber via cfe-commits
@@ -9360,6 +9362,19 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(LinkArg); addOffloadCompressArgs(Args, CmdArgs); + + // Default to half of hardware threads if users do not specify it. + if (Arg *A = Args.getLastArg(opti

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

2025-04-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. I think the PR is in pretty good shape and it's becoming counter productive to nitpick this giant piece of work. Thanks a lot for sticking with it. Hopefully the GitHub workflow can be less surprising in the future. Looks Good To Me. S

[clang-tools-extra] [clang-tidy] Fix `cert-err33-c` to ignore functions with same prefixes as target (PR #135160)

2025-04-10 Thread Baranov Victor via cfe-commits
=?utf-8?q?Björn?= Svensson Message-ID: In-Reply-To: https://github.com/vbvictor commented: I think we should provide an entry in `ReleaseNotes.rst` since the change alters behavior of the check. https://github.com/llvm/llvm-project/pull/135160 ___

[clang] 589e1c7 - [HLSL] Add support for modulo of floating point scalar and vectors (#135125)

2025-04-10 Thread via cfe-commits
Author: Farzon Lotfi Date: 2025-04-10T14:27:49-04:00 New Revision: 589e1c73d0fa2692cf997a7a9c2286996ad2fec7 URL: https://github.com/llvm/llvm-project/commit/589e1c73d0fa2692cf997a7a9c2286996ad2fec7 DIFF: https://github.com/llvm/llvm-project/commit/589e1c73d0fa2692cf997a7a9c2286996ad2fec7.diff

[clang] [HLSL] Add support for modulo of floating point scalar and vectors (PR #135125)

2025-04-10 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/135125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support '-fmodule-file-home-is-cwd' for C++ header units. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
mpark wrote: > > > If you did `-fmodule-file==` for header units, I think it is > > > better to upstream that first. I think it is more fundamental. > > > > > > We don't do anything special downstream. As far as I know it already works > > today. > > If `-fmodule-file==` already works for he

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-10 Thread Alexey Bataev via cfe-commits
@@ -11899,6 +11899,9 @@ def err_omp_clause_requires_dispatch_construct : Error< "'%0' clause requires 'dispatch' context selector">; def err_omp_append_args_with_varargs : Error< "'append_args' is not allowed with varargs functions">; +def warn_omp_dispatch_clause_novariant

[clang] [clang] [sanitizer] predict trap checks succeed (PR #134310)

2025-04-10 Thread Florian Mayer via cfe-commits
@@ -41,31 +41,31 @@ void caller(void (*f)(void)) { // CHECK: [[CONT1]]: // CHECK: %[[NOT_1:.*]] = icmp ne i8 %[[KIND]], 1 -// CHECK: br i1 %[[NOT_1]], label %[[CONT2:.*]], label %[[HANDLE1:.*]], !nosanitize +// CHECK: br i1 %[[NOT_1]], label %[[CONT2:.*]], label %[[HAND

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-10 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/135229 for specifying number of threads for clang-linker-wrapper. By default it uses half of hardware threads. >From aaa6b0b3fbcff1c2f6bc8983c7c0abee1e63eb6a Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Th

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes for specifying number of threads for clang-linker-wrapper. By default it uses half of hardware threads. --- Full diff: https://github.com/llvm/llvm-project/pull/135229.diff 3 Files Affected: - (modifi

[clang] [Clang][P1061] Fix invalid pack binding crash (PR #135129)

2025-04-10 Thread via cfe-commits
cor3ntin wrote: thanks! do you need us to merge that for you? https://github.com/llvm/llvm-project/pull/135129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-04-10 Thread Reid Kleckner via cfe-commits
https://github.com/rnk ready_for_review https://github.com/llvm/llvm-project/pull/134196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen][X86] don't coerce int128 into `{i64,i64}` for SysV-like ABIs (PR #135230)

2025-04-10 Thread via cfe-commits
https://github.com/T0b1-iOS created https://github.com/llvm/llvm-project/pull/135230 Currently, clang coerces (u)int128_t to two i64 IR parameters when they are passed in registers. This leads to broken debug info for them after applying SROA+InstCombine. SROA generates IR like this ([godbolt

[clang] [Clang][P1061] Fix invalid pack binding crash (PR #135129)

2025-04-10 Thread Jason Rice via cfe-commits
ricejasonf wrote: Yes, please, merge it when you can. https://github.com/llvm/llvm-project/pull/135129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen][X86] don't coerce int128 into `{i64,i64}` for SysV-like ABIs (PR #135230)

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

[clang] [Clang][CodeGen][X86] don't coerce int128 into `{i64,i64}` for SysV-like ABIs (PR #135230)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (T0b1-iOS) Changes Currently, clang coerces (u)int128_t to two i64 IR parameters when they are passed in registers. This leads to broken debug info for them after applying SROA+InstCombine. SROA generates IR like this ([godbolt](htt

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-10 Thread Matt Arsenault via cfe-commits
@@ -1233,6 +1233,10 @@ def offload_compression_level_EQ : Joined<["--"], "offload-compression-level=">, Flags<[HelpHidden]>, HelpText<"Compression level for offload device binaries (HIP only)">; +def offload_jobs_EQ : Joined<["--"], "offload-jobs=">, + HelpText<"Set the

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-10 Thread Joseph Huber via cfe-commits
@@ -1233,6 +1233,10 @@ def offload_compression_level_EQ : Joined<["--"], "offload-compression-level=">, Flags<[HelpHidden]>, HelpText<"Compression level for offload device binaries (HIP only)">; +def offload_jobs_EQ : Joined<["--"], "offload-jobs=">, + HelpText<"Set the

[clang] Support '-fmodule-file-home-is-cwd' for C++ header units. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
mpark wrote: Separately, even with named modules, with or without `-fmodules-embed-all-files`, the `INPUT_FILE` paths in the PCM are still absolute. I guess with `-fmodules-embed-all-files` those paths are not used since the source files are embedded, which I suppose is how it avoids problems

[clang] Treat ipynb as json (PR #135137)

2025-04-10 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/135137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Treat ipynb as json (PR #135137)

2025-04-10 Thread via cfe-commits
github-actions[bot] wrote: @Timple Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang] Treat ipynb as json (PR #135137)

2025-04-10 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks closed https://github.com/llvm/llvm-project/pull/135137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c893f1d - Treat ipynb as json (#135137)

2025-04-10 Thread via cfe-commits
Author: Tim Clephas Date: 2025-04-10T20:40:43+02:00 New Revision: c893f1d18da6547027648f44592f61c08570d80f URL: https://github.com/llvm/llvm-project/commit/c893f1d18da6547027648f44592f61c08570d80f DIFF: https://github.com/llvm/llvm-project/commit/c893f1d18da6547027648f44592f61c08570d80f.diff L

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-04-10 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/134196 >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH 1/8] [clang] Merge gtest binaries into AllClangUnitTests This reduces

[clang] [clang-format] Add 'cl' to enable OpenCL kernel file formatting (PR #134529)

2025-04-10 Thread Wenju He via cfe-commits
wenju-he wrote: @owenca could you please help me to merge? Thanks. I don't have commit permission. https://github.com/llvm/llvm-project/pull/134529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -400,13 +400,126 @@ def VoidPtr : Type< "cir::VoidType::get($_builder.getContext()))"> { } +//===--===// +// StructType +// +// The base type for all RecordDecls. +//===---

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: cir-opt %s | FileCheck %s + +!s32i = !cir.int andykaylor wrote: Oops! That was a copy-paste error. https://github.com/llvm/llvm-project/pull/135105 ___ cfe-commits mailing list cfe-commits@list

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -37,6 +50,32 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("Unsupported format for long double"); } + /// Get a CIR record kind from a AST declaration tag. + cir::StructType::RecordKind getRecordKind(const clang::TagTypeKind kind) { +

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,116 @@ +//===--===// +// +// 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] Upstream minimal support for structure types (PR #135105)

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -86,10 +86,80 @@ mlir::Type CIRGenTypes::convertFunctionTypeInternal(QualType qft) { return cir::FuncType::get(SmallVector{}, cgm.VoidTy); } +// This is CIR's version of CodeGenTypes::addRecordTypeName. It isn't shareable +// because CIR has different uniquing requiremen

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -37,6 +50,32 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("Unsupported format for long double"); } + /// Get a CIR record kind from a AST declaration tag. + cir::StructType::RecordKind getRecordKind(const clang::TagTypeKind kind) { +

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -400,13 +400,126 @@ def VoidPtr : Type< "cir::VoidType::get($_builder.getContext()))"> { } +//===--===// +// StructType +// +// The base type for all RecordDecls. +//===---

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -86,10 +86,80 @@ mlir::Type CIRGenTypes::convertFunctionTypeInternal(QualType qft) { return cir::FuncType::get(SmallVector{}, cgm.VoidTy); } +// This is CIR's version of CodeGenTypes::addRecordTypeName. It isn't shareable +// because CIR has different uniquing requiremen

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -400,13 +400,126 @@ def VoidPtr : Type< "cir::VoidType::get($_builder.getContext()))"> { } +//===--===// +// StructType +// +// The base type for all RecordDecls. +//===---

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -400,13 +400,126 @@ def VoidPtr : Type< "cir::VoidType::get($_builder.getContext()))"> { } +//===--===// +// StructType +// +// The base type for all RecordDecls. +//===---

[clang] [C99] Remove the tgmath.h header (PR #135236)

2025-04-10 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Today, that's no longer the case. > > IBM's AIX ships a `tgmath.h` that only works with the IBM non-Clang-based XL > compiler. Thank you for pointing that out! So IBM still needs Clang to vend this for now, I take it? Is IBM planning to update their tgmath.h so that it

[clang] [OpenACC][CIR] Implement 'device_type' clause lowering for 'init'/'sh… (PR #135102)

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -96,18 +173,21 @@ mlir::LogicalResult CIRGenFunction::emitOpenACCOpAssociatedStmt( template mlir::LogicalResult -CIRGenFunction::emitOpenACCOp(mlir::Location start, +CIRGenFunction::emitOpenACCOp(OpenACCDirectiveKind dirKind, + SourceLocation

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

2025-04-10 Thread Erich Keane via cfe-commits
@@ -400,13 +400,126 @@ def VoidPtr : Type< "cir::VoidType::get($_builder.getContext()))"> { } +//===--===// +// StructType +// +// The base type for all RecordDecls. +//===---

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

2025-04-10 Thread Chris B 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] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-10 Thread Erich Keane via cfe-commits
@@ -400,13 +400,126 @@ def VoidPtr : Type< "cir::VoidType::get($_builder.getContext()))"> { } +//===--===// +// StructType +// +// The base type for all RecordDecls. +//===---

[clang] [OpenACC][CIR] Implement 'device_type' clause lowering for 'init'/'sh… (PR #135102)

2025-04-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/135102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test][NFC] Use -fdriver-only over /dev/null (PR #135255)

2025-04-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane requested changes to this pull request. This one shouldn't work. We explicitly don't diagnose this in non-codegen invocations. https://github.com/llvm/llvm-project/pull/135255 ___ cfe-commits mailing list cfe-commits@list

[clang] [Clang] [Sema] Document invariant in Sema::AddOverloadCandidate (PR #135256)

2025-04-10 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/135256 Static analysis flagged 1 - ArgIdx in Sema::AddOverloadCandidate for its potential to overflow. Turns out this is intentional since when PO == OverloadCandidateParamOrder::Reversed Args.size() is always two, so

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
mpark wrote: By the way @zygoloid, it looks like you reviewed https://reviews.llvm.org/D51568 which had a similar goal, back in 2018 that didn't get committed. Looks like `-fmodule-file-home-is-cwd` was added in 2022. https://github.com/llvm/llvm-project/pull/135147 ___

[clang] [llvm] [NVPTX] Improve NVVMReflect Efficiency (PR #134416)

2025-04-10 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B commented: Almost there. Few more test nits. https://github.com/llvm/llvm-project/pull/134416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Improve NVVMReflect Efficiency (PR #134416)

2025-04-10 Thread Artem Belevich via cfe-commits
@@ -1,26 +1,53 @@ -; Verify that when passing in command-line options to NVVMReflect, that reflect calls are replaced with -; the appropriate command line values. +; Test the NVVM reflect pass functionality: verifying that reflect calls are replaced with +; appropriate values b

[clang] [llvm] [NVPTX] Improve NVVMReflect Efficiency (PR #134416)

2025-04-10 Thread Artem Belevich via cfe-commits
@@ -1,26 +1,53 @@ -; Verify that when passing in command-line options to NVVMReflect, that reflect calls are replaced with -; the appropriate command line values. +; Test the NVVM reflect pass functionality: verifying that reflect calls are replaced with +; appropriate values b

[clang] [llvm] [NVPTX] Improve NVVMReflect Efficiency (PR #134416)

2025-04-10 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/134416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Improve NVVMReflect Efficiency (PR #134416)

2025-04-10 Thread Artem Belevich via cfe-commits
@@ -1,26 +1,53 @@ -; Verify that when passing in command-line options to NVVMReflect, that reflect calls are replaced with -; the appropriate command line values. +; Test the NVVM reflect pass functionality: verifying that reflect calls are replaced with +; appropriate values b

[clang] db22909 - [CIR] Upstream support for cir.get_global (#135095)

2025-04-10 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-04-10T14:15:10-07:00 New Revision: db22909089dbc28d072e8cba6183f5a51f418bf0 URL: https://github.com/llvm/llvm-project/commit/db22909089dbc28d072e8cba6183f5a51f418bf0 DIFF: https://github.com/llvm/llvm-project/commit/db22909089dbc28d072e8cba6183f5a51f418bf0.diff L

[clang] [C99] Remove the tgmath.h header (PR #135236)

2025-04-10 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > We could add a builtin matching the GCC `__builtin_tgmath` builtin and remove > our header for at least those targets, though. Clang would either need to change its `__GNUC__` value or the glibc header would need to add a `__has_builtin` query. Oddly enough, `__

[clang] [C99] Remove the tgmath.h header (PR #135236)

2025-04-10 Thread Richard Smith via cfe-commits
zygoloid wrote: A few datapoints: * uClibc [uses `__builtin_classify_type`](https://git.uclibc.org/uClibc/tree/include/tgmath.h) and it looks like that'd work fine for us. * newlib [uses `__builtin_choose_expr`](https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/tgmat

[clang] [CIR] Upstream support for cir.get_global (PR #135095)

2025-04-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/135095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test][NFC] Use -fdriver-only over /dev/null (PR #135255)

2025-04-10 Thread Eli Friedman via cfe-commits
@@ -1,6 +1,6 @@ -// RUN: %clang -fopenacc -S %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=ERROR -// RUN: %clang -fclangir -fopenacc -S %s -o /dev/null 2>&1 | FileCheck %s --allow-empty -check-prefix=NOERROR -// RUN: %clang -fopenacc -fclangir -S %s -o /dev/null 2>&1 | FileC

[clang] [C99] Remove the tgmath.h header (PR #135236)

2025-04-10 Thread Richard Smith via cfe-commits
zygoloid wrote: > > For some reason, WG21 has trampled over that meaning of "freestanding" and > > we no longer have such a separation for C++, but it still exists for C > > See #132232. Sigh. So we can't use "freestanding" as the line between compiler and standard library anywhere any more,

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-04-10 Thread Erich Keane via cfe-commits
@@ -11399,6 +11400,22 @@ static QualType mergeEnumWithInteger(ASTContext &Context, const EnumType *ET, return {}; } +QualType ASTContext::mergeTagTypes(QualType LHS, QualType RHS) { erichkeane wrote: What about `mergeTagDefinitions`? I don't have a good i

[clang] Move CodeGen cuda.h to Inputs from include (PR #134706)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Drew Lewis (calewis) Changes Mirrors the behavior of CodeGenCUDA directory and the location of other .h files in CodeGen. --- Full diff: https://github.com/llvm/llvm-project/pull/134706.diff 2 Files Affected: - (renamed) clang/test/Cod

[clang] cuda clang: Move nvptx-surface.cu test to CodeGenCUDA (PR #134758)

2025-04-10 Thread Austin Schuh via cfe-commits
@@ -2,6 +2,170 @@ // RUN: %clang_cc1 -triple nvptx64-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s #include "Inputs/cuda.h" +struct char1 { AustinSchuh wrote: I tried that round 1 of this review, and it went quite poorly: https://b

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -37,6 +50,32 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("Unsupported format for long double"); } + /// Get a CIR record kind from a AST declaration tag. + cir::StructType::RecordKind getRecordKind(const clang::TagTypeKind kind) { +

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-04-10 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/131070 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc][NFC] refactor out file helpers (PR #134298)

2025-04-10 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/134298 >From fa35468f673ace035036a1c15d2d6ab756c2581e Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 3 Apr 2025 15:59:34 -0400 Subject: [PATCH 1/6] factor out file helpers --- clang-tools-extra/clang-doc/CMa

[clang] [clang-format] Handle C++ keywords in other languages better (PR #132941)

2025-04-10 Thread via cfe-commits
https://github.com/sstwcw updated https://github.com/llvm/llvm-project/pull/132941 >From 560f9e4a981b67482e32a60c4b373dc18d242dc3 Mon Sep 17 00:00:00 2001 From: sstwcw Date: Tue, 25 Mar 2025 14:10:08 + Subject: [PATCH] [clang-format] Handle C++ keywords in other languages better There is s

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

2025-04-10 Thread Erich Keane via cfe-commits
@@ -400,13 +400,126 @@ def VoidPtr : Type< "cir::VoidType::get($_builder.getContext()))"> { } +//===--===// +// StructType +// +// The base type for all RecordDecls. +//===---

[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-10 Thread Min-Yih Hsu via cfe-commits
@@ -0,0 +1,358 @@ +//===-- RISCVInstrInfoXAndes.td *- tablegen -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CIR] Upstream support for cir.get_global (PR #135095)

2025-04-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/135095 >From 43f2d5e73037559055dcbe65d8871c05c532d9f0 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 9 Apr 2025 14:25:35 -0700 Subject: [PATCH 1/2] [CIR] Upstream support for cir.get_global This adds basic s

[clang] [Clang][CodeGen][X86] don't coerce int128 into `{i64,i64}` for SysV-like ABIs (PR #135230)

2025-04-10 Thread Harald van Dijk via cfe-commits
hvdijk wrote: Both agreed with @nikic that this PR is a good idea and with @efriedma-quic that this does not solve the problem in general. I don't think the latter should stop this from being merged but it would be nice to find something that addresses all cases. > Another fix may be to gener

[clang] [clang] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-10 Thread Pranav Kant via cfe-commits
pranavk wrote: > @pranavk this test case is fixed by the same fix as for the first mangling > issue: https://github.com/llvm/llvm-project/pull/135111 I could still repro this issue after #135111 https://github.com/llvm/llvm-project/pull/132748 ___ c

[clang] dcb9078 - [clang][index] Skip over `#include UNDEF_IDENT` in single-file-parse mode (#135218)

2025-04-10 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-04-10T12:32:01-07:00 New Revision: dcb90780817461ba30ced78338b2270fd3307873 URL: https://github.com/llvm/llvm-project/commit/dcb90780817461ba30ced78338b2270fd3307873 DIFF: https://github.com/llvm/llvm-project/commit/dcb90780817461ba30ced78338b2270fd3307873.diff L

[clang] [clang][index] Skip over `#include UNDEF_IDENT` in single-file-parse mode (PR #135218)

2025-04-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/135218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   7   8   >