[clang] [clang] Split out and disable tests that break relative rpaths (PR #137411)

2025-04-25 Thread Reid Kleckner via cfe-commits
. Disable these tests if shared libraries are involved. Another way to make these tests work would be to update the loader search path environment variables, but it is difficult to do that portably. >From c2c8d11f82c384c35f422427f64173eef5332776 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri,

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

2025-04-25 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 T

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

2025-04-25 Thread Reid Kleckner via cfe-commits
@@ -304,7 +304,7 @@ getCodeModel(const CodeGenOptions &CodeGenOpts) { .Case("kernel", llvm::CodeModel::Kernel) .Case("medium", llvm::CodeModel::Medium) .Case("large", llvm::CodeModel::Large) -

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

2025-04-24 Thread Reid Kleckner via cfe-commits
rnk wrote: Ping, WDYT? 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] [BPF] Fix issues with external declarations of C++ structor decls (PR #137079)

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

[clang] [clang][ARM][AArch64] Don't require arm_acle header for universally defined intrinsics (PR #136742)

2025-04-24 Thread Reid Kleckner via cfe-commits
rnk wrote: Sure, but winnt.h declares and uses tons of x86 intrinsics already, and we have a way to make this work. Let me go look at what we did for `_m_prefetchw` and see if we can apply that here. We want to do something similar to a default-error-warning, where system headers like winnt.h

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

2025-04-24 Thread Reid Kleckner 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: rnk wrote: > the issue still repros for me with this change reverted. This was actually user error on my side, after messing around a bit I wa

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

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

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

2025-04-23 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,127 @@ +//===--- 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] [llvm] Reland: [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #136046)

2025-04-23 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. If we ever generalize this, it would make sense to have a standalone .s /.asm file in the build. https://github.com/llvm/llvm-project/pull/136046 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [BPF] Fix issues with external declarations of C++ structor decls (PR #137079)

2025-04-23 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/137079 >From e78b8012376798746b5cf4d664e656e22591acdb Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 23 Apr 2025 22:29:22 + Subject: [PATCH 1/3] [BPF] Fix issues with external declarations of C++ struc

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

2025-04-23 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= Message-ID: In-Reply-To: rnk wrote: We should be able to reland after #137079 lands https://github.com/llvm/llvm-project/pull/130674 __

[clang] [BPF] Fix issues with external declarations of C++ structor decls (PR #137079)

2025-04-23 Thread Reid Kleckner via cfe-commits
declarations. This fixes issues reported on #130674 by @lexi-nadia . >From e78b8012376798746b5cf4d664e656e22591acdb Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 23 Apr 2025 22:29:22 + Subject: [PATCH 1/2] [BPF] Fix issues with external declarations of C++ structor decls Use GetAddrOfGlo

[clang] 0e0a166 - Revert unintentional diff from cd826d6e840ed33ad88458c862da5f9fcc6e908c

2025-04-23 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2025-04-23T22:30:44Z New Revision: 0e0a1665fa340b9f1934d12aff818064aaf289ef URL: https://github.com/llvm/llvm-project/commit/0e0a1665fa340b9f1934d12aff818064aaf289ef DIFF: https://github.com/llvm/llvm-project/commit/0e0a1665fa340b9f1934d12aff818064aaf289ef.diff LOG

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

2025-04-23 Thread Reid Kleckner 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: rnk wrote: The actual underlying issue appears to come from ae0d224 / #91310 , which added `CodeGenModule::EmitExternalFunctionDeclaration`,

[clang] cd826d6 - Revert "[Clang,debuginfo] added vtt parameter in destructor DISubroutineType (#130674)"

2025-04-23 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2025-04-23T22:09:02Z New Revision: cd826d6e840ed33ad88458c862da5f9fcc6e908c URL: https://github.com/llvm/llvm-project/commit/cd826d6e840ed33ad88458c862da5f9fcc6e908c DIFF: https://github.com/llvm/llvm-project/commit/cd826d6e840ed33ad88458c862da5f9fcc6e908c.diff LOG

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

2025-04-23 Thread Reid Kleckner 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: rnk wrote: Hm, reverting this change doesn't fix the verifier error, the issue still repros for me with this change reverted. Are we sure this

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

2025-04-23 Thread Reid Kleckner 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: rnk wrote: Thanks! It looks like the new IR after this change doesn't pass verification, and presumably this causes the crash later: ``` $ cl

[clang] [clang][ARM][AArch64] Define intrinsics guarded by __has_builtin on all platforms (PR #128222)

2025-04-21 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks, I think this is a good direction. https://github.com/llvm/llvm-project/pull/128222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [Clang][MicrosoftMangle] Implement mangling for ConstantMatrixType (PR #134930)

2025-04-21 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks, looks good to me! I wanted to add llvm-cxxfilt to the test to confirm these all demnagle to something readable, but I see it doesn't work on Microsoft symbols today, which is unfortunate. The code I want is on github in @nico's https:

[clang] Generate empty .clang-format-ignore before running tests (PR #136154)

2025-04-17 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. https://github.com/llvm/llvm-project/pull/136154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2025-04-16 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Is this ready to go? I can't recall if we ultimately accepted the RFC. https://github.com/llvm/llvm-project/pull/118026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

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

2025-04-16 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= Message-ID: In-Reply-To: https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/130674 _

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

2025-04-15 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 %s -triple x86_64-windows -fsyntax-only -Wcast-function-type -Wno-cast-function-type-strict -verify=windows +// RUN: %clang_cc1 %s -triple x86_64-windows -fsyntax-only -Wcast-function-type -Wno-cast-function-type-strict -x c++ -verify=windows

[clang] [Clang][MicrosoftMangle] Implement mangling for ConstantMatrixType (PR #134930)

2025-04-15 Thread Reid Kleckner via cfe-commits
rnk wrote: We do a similar mangling for our extended vector types, so I would start by copying the clang/test/CodeGenCXX/mangle-ms-vector-types.cpp file to mangle-ms-matrix.cpp, and add a second RUN line that pipes the result to `llvm-cxxfilt` and uses a second FileCheck invocation to validate

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

2025-04-15 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= Message-ID: In-Reply-To: https://github.com/rnk approved this pull request. Thanks for the comment! https://github.com/llvm/llvm-project/pull/13067

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

2025-04-15 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited 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] Silence -Wcast-function-type warnings on idiomatic Windows code (PR #135660)

2025-04-15 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. I agree this is the practical thing to do. 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-c

[clang] [Clang][MicrosoftMangle] Implement mangling for ConstantMatrixType (PR #134930)

2025-04-15 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: I haven't actually directly implemented one of these, but this approach looks like the others. Please add tests. Also, I see that we use llvm-cxxfilt to validate that the mangling comes back the way we expect. Please add some tests with that utility to check t

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

2025-04-14 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks, looks good. https://github.com/llvm/llvm-project/pull/133173 ___ 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-14 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] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2025-04-14 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,180 @@ + +// RUN: %clang_cc1 -fsyntax-only -Wms-bitfield-compatibility -verify -triple armv8 -std=c++23 %s +// RUN: %clang_cc1 -fsyntax-only -DMS_BITFIELDS -mms-bitfields -verify=msbitfields -triple armv8-apple-macos10.15 -std=c++23 %s + +// msbitfields-no-diagnostics

[clang] [Clang][ARM] Only try to redefine builtins for non-CUDA (PR #128222)

2025-04-14 Thread Reid Kleckner via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + rnk wrote: > If we have to define them on non-windows targets anyways, perhaps a better > fix is to let clang define them everywhere, and avoid this special case in > the headers. Yes, we

[clang] Add back include for AutoConvert.h as it's needed for z/OS (PR #135430)

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

[clang] Add back include for AutoConvert.h as it's needed for z/OS (PR #135430)

2025-04-13 Thread Reid Kleckner via cfe-commits
rnk wrote: I just happened to look into the implementation of AutoConvert.h, and I see the entire interface is defined away when not targeting zOS. This means that all call sites need to be conditional on `ifdef __MVS__`, which means we have ugly ifdef droppings all over the codebase, which ha

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

2025-04-10 Thread Reid Kleckner via cfe-commits
@@ -13,10 +15,41 @@ struct Bar { struct Baz { virtual ~Baz() {} - static void operator delete[](void* ptr) = delete; // expected-note {{explicitly marked deleted here}} + static void operator delete[](void* ptr) = delete; // expected-note {{explicitly marked deleted here

[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] 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 T

[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] 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/7] [clang] Merge gtest binaries into AllClangUnitTests T

[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/6] [clang] Merge gtest binaries into AllClangUnitTests T

[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/5] [clang] Merge gtest binaries into AllClangUnitTests T

[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/4] [clang] Merge gtest binaries into AllClangUnitTests T

[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/3] [clang] Merge gtest binaries into AllClangUnitTests T

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

2025-04-10 Thread Reid Kleckner via cfe-commits
@@ -11045,15 +11045,18 @@ bool Sema::CheckDestructor(CXXDestructorDecl *Destructor) { DiagnoseUseOfDecl(OperatorDelete, Loc); MarkFunctionReferenced(Loc, OperatorDelete); Destructor->setOperatorDelete(OperatorDelete, ThisArg); - // Lookup delete[] too in

[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 approved this pull request. I have some minor suggestions, but please go ahead and land this without additional review since it is a forward-fix. https://github.com/llvm/llvm-project/pull/135041 ___ cfe-commits mailing list cfe-

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

2025-04-10 Thread Reid Kleckner via cfe-commits
@@ -11045,15 +11045,18 @@ bool Sema::CheckDestructor(CXXDestructorDecl *Destructor) { DiagnoseUseOfDecl(OperatorDelete, Loc); MarkFunctionReferenced(Loc, OperatorDelete); Destructor->setOperatorDelete(OperatorDelete, ThisArg); - // Lookup delete[] too in

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

2025-04-09 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: The premerge tests failed on a modules crash recovery test case on other platforms, and those seem like true positives that need to be fixed. Overall, I think the main risk with this approach is that it will break in-process, FP-based stack unwinders that vali

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

2025-04-05 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/2] [clang] Merge gtest binaries into AllClangUnitTests T

[clang] Reapply "[cmake] Refactor clang unittest cmake" (PR #134195)

2025-04-05 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/134195 ___ 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-05 Thread Reid Kleckner via cfe-commits
https://github.com/rnk converted_to_draft 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] a1935fd - [clang] Remove unused SourceManager.cpp includes, NFC (trying out clangd)

2025-04-04 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2025-04-04T22:10:19-07:00 New Revision: a1935fd3809772c06f9a09fa151181642ae92b20 URL: https://github.com/llvm/llvm-project/commit/a1935fd3809772c06f9a09fa151181642ae92b20 DIFF: https://github.com/llvm/llvm-project/commit/a1935fd3809772c06f9a09fa151181642ae92b20.diff

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-04-04 Thread Reid Kleckner via cfe-commits
rnk wrote: We have internal reports of incorrect mangling substitutions after updating to 537b6541e8067d7ef7aa38791989fca6303b7fd from 799e9053641a6478d3144866a97737b37b87c260, and this change seems like the likely culprit because it's touching the Itanium mangling code. We'll see if that can

[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] [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] [Clang,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)

2025-04-04 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s rnk wrote: Thanks, I looked at the files, and

[clang] [Clang] Fix unnecessary extra return block emmited during function epilog after musttail call (PR #134282)

2025-04-03 Thread Reid Kleckner via cfe-commits
@@ -3897,6 +3897,13 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI, return; } + // If there is no valid insert point, we won't emit a return. + // The insert point could be null if we have already emitted a return + // (e.g. if musttail) + if (

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

2025-04-02 Thread Reid Kleckner via cfe-commits
it. >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH] [clang] Merge gtest binaries into AllClangUnitTests This reduces the size of the clang/unittests build directory by 64% and my overall build dir size by 5%. Stat

[clang] Reapply "[cmake] Refactor clang unittest cmake" (PR #134195)

2025-04-02 Thread Reid Kleckner via cfe-commits
rom fe6604dc283a454c212b8e2cd21d94df96fb05d4 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 2 Apr 2025 18:34:05 + Subject: [PATCH] Reapply "[cmake] Refactor clang unittest cmake" This reapplies 5ffd9bdb50b57 (#133545) with fixes. The BUILD_SHARED_LIBS=ON build was fixed by adding

[clang] [cmake] Refactor clang unittest cmake (PR #133545)

2025-03-30 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/133545 >From e662d8d9483fdf82030ddec6969bc89ae2404060 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 16:49:09 -0700 Subject: [PATCH 1/2] [cmake] Refactor clang unittest cmake Pass all the dependenc

[clang] [cmake] Refactor clang unittest cmake (PR #133545)

2025-03-28 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/133545 >From e662d8d9483fdf82030ddec6969bc89ae2404060 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 16:49:09 -0700 Subject: [PATCH 1/2] [cmake] Refactor clang unittest cmake Pass all the dependenc

[clang] [cmake] Refactor clang unittest cmake (PR #133545)

2025-03-28 Thread Reid Kleckner via cfe-commits
consolidating unit tests into fewer binaries, but seems like a good refactoring in its own right. >From e662d8d9483fdf82030ddec6969bc89ae2404060 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 16:49:09 -0700 Subject: [PATCH] [cmake] Refactor clang unittest cmake Pass all

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

2025-03-27 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s rnk wrote: Please add a test for the MSVC ABI,

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

2025-03-26 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] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-03-26 Thread Reid Kleckner via cfe-commits
@@ -52,6 +56,7 @@ else() check_include_file(mach/mach.h HAVE_MACH_MACH_H) check_include_file(malloc/malloc.h HAVE_MALLOC_MALLOC_H) check_include_file(pthread.h HAVE_PTHREAD_H) + check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H) rnk wrote: Do we nee

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-26 Thread Reid Kleckner via cfe-commits
rnk wrote: I'll try to take a look at this when I get a chance, but that looks like it's not happening today. I read the comments a bit and found some codesearch links worth sharing for reference. Here's the original UnicodeString array new operation: https://source.chromium.org/chromium/chrom

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

2025-03-26 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] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-03-26 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] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-03-26 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: If split stacks are negatively impacting profiling, debugging, or other compiler development tasks, I have to ask, have we considered optimizing clang stack usage? There are multiple issues: * Clang is a recursive descent parser. This isn't going to change, it

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

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

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-14 Thread Reid Kleckner via cfe-commits
rnk wrote: I think the `.SCOV$M` section globals should be in the `??_EClassA@@UEAAPEXI@Z` comdat group. I think sanitizer coverage (sancov) is one of the lesser-used sanitizers here, and it may lack some sophistication when it comes to comdat groups. I wasn't aware of this creative use of `bl

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2025-03-06 Thread Reid Kleckner via cfe-commits
@@ -6519,6 +6519,13 @@ def warn_signed_bitfield_enum_conversion : Warning< InGroup, DefaultIgnore; def note_change_bitfield_sign : Note< "consider making the bit-field type %select{unsigned|signed}0">; +def warn_ms_bitfield_mismatched_storage_packing : Warning< + "bit-fiel

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

2025-03-05 Thread Reid Kleckner via cfe-commits
@@ -4769,31 +4769,32 @@ ExprResult Sema::CheckOSLogFormatStringArg(Expr *Arg) { /// Check that the user is calling the appropriate va_start builtin for the /// target and calling convention. static bool checkVAStartABI(Sema &S, unsigned BuiltinID, Expr *Fn) { - const llvm::Tri

[clang] [clang] Use TargetInfo to decide Mangling for C (PR #129920)

2025-03-05 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks, I spent a while thinking if this was correct, and then convincing myself that we ignore the relevant calling conventions on the appropriate platforms (we ignore `__fastcall` on x64 and ignore `__vectorcall` on Win ARM). https://github.

[clang] [clang] Pass fp128 indirectly and return in xmm0 on Windows (PR #115052)

2025-02-28 Thread Reid Kleckner via cfe-commits
rnk wrote: If you take the two PRs together, we're going to implement the indirection logic at both the frontend and backend level. If we do it in the backend, I think it's technically necessary to do it in the frontend, but it is consistent with how we handle all other types. I'd like to see

[clang] [clang] Pass fp128 indirectly and return in xmm0 on Windows (PR #115052)

2025-02-28 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. https://github.com/llvm/llvm-project/pull/115052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-27 Thread Reid Kleckner via cfe-commits
@@ -190,3 +210,38 @@ method some_class::good_coroutine_calls_custom_constructor(float) { // CHECK: invoke void @_ZNSt16coroutine_traitsIJ6methodR10some_classfEE12promise_typeC1ES2_f(ptr {{[^,]*}} %__promise, ptr noundef nonnull align 1 dereferenceable(1) %{{.+}}, float c

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-27 Thread Reid Kleckner via cfe-commits
@@ -855,6 +855,16 @@ void CodeGenFunction::EmitCoroutineBody(const CoroutineBodyStmt &S) { // Create parameter copies. We do it before creating a promise, since an // evolution of coroutine TS may allow promise constructor to observe // parameter copies. +for (

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

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

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-27 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. I think correctness comes first, so this prioritization makes sense. https://github.com/llvm/llvm-project/pull/127653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-27 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks! I approved it. https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-26 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: I resolved two conversations, but there are two actionable comments. https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-26 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: Hm, these comments didn't post. They may be stale. I will post them and revisit them. https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-26 Thread Reid Kleckner via cfe-commits
@@ -7919,3 +7919,38 @@ void CodeGenModule::moveLazyEmissionStates(CodeGenModule *NewBuilder) { NewBuilder->ABI->MangleCtx = std::move(ABI->MangleCtx); } + +bool CodeGenModule::classNeedsVectorDestructor(const CXXRecordDecl *RD) { + CXXDestructorDecl *Dtor = RD->getDestruct

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-26 Thread Reid Kleckner via cfe-commits
@@ -7919,3 +7919,38 @@ void CodeGenModule::moveLazyEmissionStates(CodeGenModule *NewBuilder) { NewBuilder->ABI->MangleCtx = std::move(ABI->MangleCtx); } + +bool CodeGenModule::classNeedsVectorDestructor(const CXXRecordDecl *RD) { + CXXDestructorDecl *Dtor = RD->getDestruct

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-26 Thread Reid Kleckner via cfe-commits
@@ -575,6 +576,12 @@ class CGCXXABI { QualType ElementType, llvm::Value *&NumElements, llvm::Value *&AllocPtr, CharUnits &CookieSize); + /// Reads the array cookie associated with the given pointer, + /// that sho

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-26 Thread Reid Kleckner via cfe-commits
@@ -2657,7 +2657,10 @@ class VFTableBuilder { MethodVFTableLocation Loc(MI.VBTableIndex, WhichVFPtr.getVBaseWithVPtr(), WhichVFPtr.NonVirtualOffset, MI.VFTableIndex); if (const CXXDestructorDecl *DD = dyn_cast(MD)) { -MethodVF

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

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

[clang] Generalize creduce-clang-crash.py script to look for cvise (PR #128592)

2025-02-25 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/128592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Generalize creduce-clang-crash.py script to look for cvise (PR #128592)

2025-02-24 Thread Reid Kleckner via cfe-commits
"vise" is not a verb, but the external facing text has been updated. >From 0c416d9af99af4c8983800faa4d253c545c3f0bb Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 24 Feb 2025 22:50:12 + Subject: [PATCH] Generalize creduce-clang-crash.py script to look for cvise cvise r

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-24 Thread Reid Kleckner via cfe-commits
rnk wrote: Re: sroa/mem2reg, that's a valid concern with Hans's intrinsic approach. > So it's not really a question of "improving" the existing algorithm; we need > markers in the IR, like coro_outside_frame, and the algorithm should be based > on that. To check my understanding, by explicit

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-20 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: In the issue (#127499) you pointed out that this issue applies to the MSVC ABI where all parameters are destroyed in the callee. Is it reasonable to construct the analogous test case in that environment? I tried to do this locally, but can't for unrelated buil

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-20 Thread Reid Kleckner via cfe-commits
rnk wrote: Thanks for the updates, I think this is almost done. @zmodem , this will probably have some impact on Chrome code size and will probably churn many crash stack traces. I think it's safe to rely on all the existing automated testing, but this is a high-risk change to keep in mind if

[clang] Remove xbegin and _xend (PR #126952)

2025-02-19 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/126952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-14 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks, I'm happy with this patch. https://github.com/llvm/llvm-project/pull/124834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-12 Thread Reid Kleckner via cfe-commits
@@ -2950,12 +2950,11 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } -static bool isValidCodeModelAttr(Sema &S, StringRef Str) { - if (S.Context.getTargetInfo().getTriple().isLoongArch()) { +static bool isValidCodeModelAttr(llvm::Triple Tripl

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-12 Thread Reid Kleckner via cfe-commits
@@ -2964,20 +2963,36 @@ static bool isValidCodeModelAttr(Sema &S, StringRef Str) { static void handleCodeModelAttr(Sema &S, Decl *D, const ParsedAttr &AL) { StringRef Str; SourceLocation LiteralLoc; + auto IsTripleSupported = [](const llvm::Triple Triple) { +return Tr

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-12 Thread Reid Kleckner via cfe-commits
@@ -2964,20 +2963,36 @@ static bool isValidCodeModelAttr(Sema &S, StringRef Str) { static void handleCodeModelAttr(Sema &S, Decl *D, const ParsedAttr &AL) { StringRef Str; SourceLocation LiteralLoc; + auto IsTripleSupported = [](const llvm::Triple Triple) { +return Tr

[clang] Remove xbegin and _xend (PR #126952)

2025-02-12 Thread Reid Kleckner via cfe-commits
rnk wrote: This is an observable behavior change, so it should have a test. There's a test for this header at clang/test/Headers/ms-intrins.cpp that you can extend. You probably need to add a new RUN line that adds `-mrtm` or some other micro-architectural feature so that rtmintrin.h declares

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-05 Thread Reid Kleckner via cfe-commits
@@ -2949,15 +2950,34 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } +static bool isValidCodeModelAttr(Sema &S, StringRef Str) { + if (S.Context.getTargetInfo().getTriple().isLoongArch()) { +return Str == "normal" || Str == "medium" || St

  1   2   3   4   5   6   7   8   9   10   >