[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 This reduces

[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 This reduces

[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 This reduces

[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 This reduces

[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 This reduces

[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 This reduces

[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 This reduces

[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
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/134196 This reduces the size of the clang/unittests build directory by 64% and my overall build dir size by 5%. Static linking is the real driving factor here, but even if the default build configuration used shared librar

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

2025-04-02 Thread Reid Kleckner via cfe-commits
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/134195 This reapplies 5ffd9bdb50b57 (#133545) with fixes. The BUILD_SHARED_LIBS=ON build was fixed by adding missing LLVM dependencies to the InterpTests binary in unittests/AST/ByteCode/CMakeLists.txt . >From fe6604dc283

[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 dependencies

[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 dependencies

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

2025-03-28 Thread Reid Kleckner via cfe-commits
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/133545 Pass all the dependencies into add_clang_unittest. This is consistent with how it is done for LLDB. I borrowed the same named argument list structure from add_lldb_unittest. This is a necessary step towards consolid

[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
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/128592 cvise reimplements creduce in Python and bundles clang-delta and other tools. In my experience, it is generally a more robust reduction tool that is better maintained. I renamed the script to make it tool-neutral, w

[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

[clang] [clang] UEFI ABI fixes for X86_64 (PR #124992)

2025-02-04 Thread Reid Kleckner via cfe-commits
@@ -5193,12 +5193,12 @@ bool Sema::CheckCallingConvAttr(const ParsedAttr &Attrs, CallingConv &CC, CC = CC_X86RegCall; break; case ParsedAttr::AT_MSABI: -CC = Context.getTargetInfo().getTriple().isOSWindows() ? CC_C : -

[clang] [clang] UEFI ABI fixes for X86_64 (PR #124992)

2025-02-04 Thread Reid Kleckner via cfe-commits
@@ -74,7 +74,7 @@ static CCMangling getCallingConvMangling(const ASTContext &Context, if (FD->isMain() && FD->getNumParams() == 2) return CCM_WasmMainArgcArgv; - if (!Triple.isOSWindows() || !Triple.isX86()) + if (!Triple.isOSWindowsOrUEFI() || !Triple.isX86()

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-02-04 Thread Reid Kleckner via cfe-commits
rnk wrote: > The build is still broken (e.g. > https://lab.llvm.org/buildbot/#/builders/63/builds/3861). I'll back it out. Thank you for doing that. I missed all notifications because they got lost in the storm of failures due to the mismatch between my local build and what was on github. ht

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2025-02-04 Thread Reid Kleckner via cfe-commits
rnk wrote: > But one specific question: would you prefer me to land as a series of commits > or a single squashed commit for the entire PR? I'm happy either way. My mild > preference is to prefer the series of commits, but open to suggestions here. I would land it as the six-patch stack in thi

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

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

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2025-02-03 Thread Reid Kleckner via cfe-commits
@@ -482,17 +488,42 @@ void clang::EmitClangBuiltins(const RecordKeeper &Records, raw_ostream &OS) { for (const auto *BuiltinRecord : Records.getAllDerivedDefinitions("AtomicBuiltin")) collectBuiltins(BuiltinRecord, Builtins); - unsigned NumAtomicBuiltins = Buil

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2025-02-03 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks for optimizing the builtins! I feel like builtins have grown significantly since adding RISC-V and ARM MVE intrinsics, and few people until now have stopped to re-evaluate how we represent these things. While I was watching these clearl

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

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

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-02-03 Thread Reid Kleckner via cfe-commits
@@ -146,8 +146,13 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<256>], Features = "avx" in // current formulation is based on what was easiest to recognize from the // pre-TableGen version. -let Features = "mmx", Attributes = [NoThrow, Const] in { - def _mm_prefet

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-02-03 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/115099 >From e5f485ad8000c296229794346fdd627b90e504d2 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 5 Nov 2024 16:05:53 -0800 Subject: [PATCH 1/7] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts

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

2025-01-31 Thread Reid Kleckner via cfe-commits
rnk wrote: I assume it is safe for all device side compilations to ignore this attribute. Presumably device code uses fully general patterns to access global data that could live in any shared object. Most device ISAs are virtual anyway, it's not like they're going to use PC relative addressin

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-01-30 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/115099 >From e5f485ad8000c296229794346fdd627b90e504d2 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 5 Nov 2024 16:05:53 -0800 Subject: [PATCH 1/6] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-01-30 Thread Reid Kleckner via cfe-commits
@@ -2225,9 +2221,10 @@ _mm_storer_ps(float *__p, __m128 __a) ///be generated. \n ///_MM_HINT_T2: Move data using the T2 hint. The PREFETCHT2 instruction will ///be generated. -#define _mm_prefetch(a, sel) (__builtin_prefetch((const void *)(a), \ -

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-01-30 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/115099 >From e5f485ad8000c296229794346fdd627b90e504d2 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 5 Nov 2024 16:05:53 -0800 Subject: [PATCH 1/5] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-01-30 Thread Reid Kleckner via cfe-commits
@@ -146,8 +146,13 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<256>], Features = "avx" in // current formulation is based on what was easiest to recognize from the // pre-TableGen version. -let Features = "mmx", Attributes = [NoThrow, Const] in { - def _mm_prefet

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-01-30 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/115099 >From e5f485ad8000c296229794346fdd627b90e504d2 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 5 Nov 2024 16:05:53 -0800 Subject: [PATCH 1/4] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-01-30 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: I had to rebase this over the table-gen-ification of the builtins, but I think this is still relevant. https://github.com/llvm/llvm-project/pull/115099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-01-30 Thread Reid Kleckner via cfe-commits
@@ -31,10 +31,13 @@ // All MMX instructions will be generated via builtins. Any MMX vector // types (<1 x i64>, <2 x i32>, etc.) that aren't used by these builtins will be // expanded by the back-end. +// // FIXME: _mm_prefetch must be a built-in because it takes a compile-ti

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

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

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-01-30 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/115099 >From e5f485ad8000c296229794346fdd627b90e504d2 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 5 Nov 2024 16:05:53 -0800 Subject: [PATCH 1/3] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts

[clang] [clang] UEFI handle unsupported triples. (PR #124824)

2025-01-28 Thread Reid Kleckner via cfe-commits
@@ -637,6 +637,10 @@ static llvm::Triple computeTargetTriple(const Driver &D, } } + // Currently the only architecture supported by *-uefi triples are x86_64. + if(Target.isUEFI() && Target.getArch() != llvm::Triple::x86_64) rnk wrote: ```suggestion

[clang] [clang] UEFI handle unsupported triples. (PR #124824)

2025-01-28 Thread Reid Kleckner via cfe-commits
rnk wrote: +1 for a test https://github.com/llvm/llvm-project/pull/124824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

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

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-27 Thread Reid Kleckner via cfe-commits
@@ -51,28 +57,71 @@ class StringToOffsetTable { return II->second; } - // Emit the string using string literal concatenation, for better readability - // and searchability. - void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl, -co

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-27 Thread Reid Kleckner via cfe-commits
@@ -51,28 +57,71 @@ class StringToOffsetTable { return II->second; } - // Emit the string using string literal concatenation, for better readability - // and searchability. - void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl, -co

[clang] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2025-01-27 Thread Reid Kleckner via cfe-commits
rnk wrote: +1 to separating implementation from enablement. Enabling the warning by default will predictably generate pushback and folks may ask to revert, and it's a good best practice to be able to easily do that while leaving the implementation in place. https://github.com/llvm/llvm-projec

[clang] WIP: [clang] MicrosoftCXXABI: Fix exception copy constructor LUT after loading AST (PR #114075)

2025-01-23 Thread Reid Kleckner via cfe-commits
@@ -2316,6 +2316,20 @@ void ASTDeclReader::VisitCXXConstructorDecl(CXXConstructorDecl *D) { } VisitCXXMethodDecl(D); + + // Microsoft CXX ABI specific: + // Restore the RecordToCopyCtor sidecar LUT entry so that `throw` expressions + // find the correct copy constructo

[clang] WIP: [clang] MicrosoftCXXABI: Fix exception copy constructor LUT after loading AST (PR #114075)

2025-01-23 Thread Reid Kleckner via cfe-commits
@@ -2316,6 +2316,20 @@ void ASTDeclReader::VisitCXXConstructorDecl(CXXConstructorDecl *D) { } VisitCXXMethodDecl(D); + + // Microsoft CXX ABI specific: + // Restore the RecordToCopyCtor sidecar LUT entry so that `throw` expressions + // find the correct copy constructo

[clang] WIP: [clang] MicrosoftCXXABI: Fix exception copy constructor LUT after loading AST (PR #114075)

2025-01-22 Thread Reid Kleckner via cfe-commits
@@ -249,6 +249,11 @@ FIELD(HasDeclaredCopyAssignmentWithConstParam, 1, MERGE_OR) /// base classes or fields have a no-return destructor FIELD(IsAnyDestructorNoReturn, 1, NO_MERGE) +/// Microsoft CXX ABI specific: +/// Whether the copy constructor is used by a `throw` expressio

[clang] WIP: [clang] MicrosoftCXXABI: Fix exception copy constructor LUT after loading AST (PR #114075)

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

[clang] WIP: [clang] MicrosoftCXXABI: Fix exception copy constructor LUT after loading AST (PR #114075)

2025-01-22 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,19 @@ +// REQUIRES: system-windows, target={{.*-windows-msvc}} +// RUN: %clang_cc1 -x c++ -std=c++17 -fcxx-exceptions -fexceptions -triple=%ms_abi_triple -emit-pch -building-pch-with-obj -fmodules-codegen -o %t.pch %S/cxx-exception-copy-ctor-crash.h +// RUN: %clang_cc

[clang] WIP: [clang] MicrosoftCXXABI: Fix exception copy constructor LUT after loading AST (PR #114075)

2025-01-22 Thread Reid Kleckner via cfe-commits
@@ -2316,6 +2316,20 @@ void ASTDeclReader::VisitCXXConstructorDecl(CXXConstructorDecl *D) { } VisitCXXMethodDecl(D); + + // Microsoft CXX ABI specific: + // Restore the RecordToCopyCtor sidecar LUT entry so that `throw` expressions + // find the correct copy constructo

[clang] WIP: [clang] MicrosoftCXXABI: Fix exception copy constructor LUT after loading AST (PR #114075)

2025-01-22 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: I think @majnemer added the lookup table originally. I think we did things this way because, while it creates obvious serialization problems, it's the most straightforwardly correct approach if you think finding copy constructors is an ambiguous operation. It'

  1   2   3   4   5   6   7   8   9   10   >