[clang] [Clang codegen][PPC] Produce AIX-specific "target features" only for AIX (PR #130864)

2025-03-13 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/130864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-13 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: -- A few more tests added covering alloca access into aggregate type with half elements with getelementptr. atomicrmw Would a test for { half, half, half, half } in Swift-return.ll make sense? I think testing coverage now is fairly ok - can't think of any more instructions to

[clang] [Clang] Fixed UnresolvedLookupExpr propagating into the codegen phase (PR #124609)

2025-03-13 Thread via cfe-commits
https://github.com/TilakChad updated https://github.com/llvm/llvm-project/pull/124609 >From c865ba50fd3c1a5d427069e29e035c1d6e3d21d3 Mon Sep 17 00:00:00 2001 From: Tilak Chad Date: Fri, 14 Mar 2025 00:44:10 +0545 Subject: [PATCH] [Clang] Dependent CallExpr having UnresolvedLookupExpr are not c

[clang] [compiler-rt] [lld] [llvm] [InstrProf] Remove -forder-file-instrumentation (PR #130192)

2025-03-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-win` running on `as-worker-93` while building `clang,compiler-rt,lld,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/2481 He

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-ubuntu-fast` running on `as-builder-4` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/33/builds/13013 Here is th

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-13 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > > not everything should end up in Clang, even though it is individually > > "convenient" > > We should at least have some builtins for those SPIR-V intrinsics you listed. > I think right now we only have `reflect`. Probably, I think there's a sense that in general it's desira

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-13 Thread via cfe-commits
higher-performance wrote: Just merged this, thanks everyone for the reviews! If I hadn't gotten the pushback earlier, I may have never spotted the simplification and optimization. https://github.com/llvm/llvm-project/pull/129934 ___ cfe-commits mailin

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-13 Thread via cfe-commits
https://github.com/higher-performance closed https://github.com/llvm/llvm-project/pull/129934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-13 Thread Joseph Huber via cfe-commits
@@ -4770,6 +4770,35 @@ def GetDeviceSideMangledName : LangBuiltin<"CUDA_LANG"> { let Prototype = "char const*(...)"; } +// GPU intrinsics +class GPUBuiltin : Builtin { jhuber6 wrote: We need a way to make these only emitted on 'gpu' compilations. https://g

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-13 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,501 @@ +//===- LowerGPUIntrinsic.cpp --===// +// +// 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] [SPIRV] GPU intrinsics (PR #131190)

2025-03-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: So this is basically a serialization of the headers in `gpuintrin.h` as IR? I'll need to defer to the people more familiar with the backend / IR layer but I have a few comments. https://github.com/llvm/llvm-project/pull/131190 _

[clang] [clang-tools-extra] [clang][modules] Introduce new `ModuleCache` interface (PR #131193)

2025-03-13 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/131193 This PR adds new `ModuleCache` interface to Clang's implicitly-built modules machinery. The main motivation for this change is to create a second implementation that uses a more efficient kind of `llvm::Ad

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-13 Thread Jan Voung via cfe-commits
@@ -3185,6 +3185,53 @@ TEST_F(TokenAnnotatorTest, UnderstandsAttributes) { EXPECT_TOKEN(Tokens[5], tok::r_paren, TT_AttributeRParen); } +TEST_F(TokenAnnotatorTest, UnderstandsNullabilityAttributes) { + auto Tokens = annotate("x = (foo *_Nullable)*v;"); + ASSERT_EQ(Tokens.s

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-13 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield edited https://github.com/llvm/llvm-project/pull/131190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][modules] Introduce new `ModuleCache` interface (PR #131193)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clangd Author: Jan Svoboda (jansvoboda11) Changes This PR adds new `ModuleCache` interface to Clang's implicitly-built modules machinery. The main motivation for this change is to create a second implementation that u

[clang] [clang-tools-extra] [clang][modules] Introduce new `ModuleCache` interface (PR #131193)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes This PR adds new `ModuleCache` interface to Clang's implicitly-built modules machinery. The main motivation for this change is to create a second implementation that uses a more efficient kind of `llvm::

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-13 Thread via cfe-commits
@@ -131,17 +131,21 @@ def note_constexpr_past_end : Note< "dereferenced pointer past the end of %select{|subobject of }0" "%select{temporary|%2}1 is not a constant expression">; def note_constexpr_past_end_subobject : Note< - "cannot %select{access base class of|access der

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > > not everything should end up in Clang, even though it is individually > > > "convenient" > > > > > > We should at least have some builtins for those SPIR-V intrinsics you > > listed. I think right now we only have `reflect`. > > Probably, I think there's a sense that in

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-13 Thread Jon Chesterfield via cfe-commits
@@ -0,0 +1,501 @@ +//===- LowerGPUIntrinsic.cpp --===// +// +// 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] Reapply "Use global TimerGroups for both new pass manager and old pas… (PR #131217)

2025-03-13 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 created https://github.com/llvm/llvm-project/pull/131217 …s manager timers" (#131173) This reverts commit 31ebe6647b7f1fc7f6778a5438175b12f82357ae. The reason for the test failure is likely due to `Name2PairMap::getTimerGroup(...)` not holding a lock. >From 3734f8

[clang] [llvm] Reapply "Use global TimerGroups for both new pass manager and old pass manager timers" (#131173) (PR #131217)

2025-03-13 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Let's wait until CI passes before merging as the test repro is kind of flaky on my machine. https://github.com/llvm/llvm-project/pull/131217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [llvm] Reapply "Use global TimerGroups for both new pass manager and old pass manager timers" (#131173) (PR #131217)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alan Zhao (alanzhao1) Changes This reverts commit 31ebe6647b7f1fc7f6778a5438175b12f82357ae. The reason for the test failure is likely due to `Name2PairMap::getTimerGroup(...)` not holding a lock. --- Full diff: https://github.com/llvm/llv

[clang] [llvm] Reapply "Use global TimerGroups for both new pass manager and old pass manager timers" (#131173) (PR #131217)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Alan Zhao (alanzhao1) Changes This reverts commit 31ebe6647b7f1fc7f6778a5438175b12f82357ae. The reason for the test failure is likely due to `Name2PairMap::getTimerGroup(...)` not holding a lock. --- Full diff: https://github.com/llvm/l

[clang] [llvm] Reapply "Use global TimerGroups for both new pass manager and old pass manager timers" (#131173) (PR #131217)

2025-03-13 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. not locking causing the test failures makes sense https://github.com/llvm/llvm-project/pull/131217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [HLSL] Add bounds checks for the HLSL `fmod` vector arguments and return types (PR #131035)

2025-03-13 Thread Sarah Spall via cfe-commits
@@ -58,9 +58,7 @@ constexpr vector reflect_vec_impl(vector I, vector N) { #endif } -template -constexpr enable_if_t::value || is_same::value, T> -fmod_impl(T X, T Y) { +template constexpr T fmod_impl(T X, T Y) { spall wrote: The code on line 61 is still ne

[clang] [Clang codegen][PPC] Produce AIX-specific "target features" only for AIX (PR #130864)

2025-03-13 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast closed https://github.com/llvm/llvm-project/pull/130864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Support alternative sections for patchable function entries (PR #131230)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Sami Tolvanen (samitolvanen) Changes With -fpatchable-function-entry (or the patchable_function_entry function attribute), we emit records of patchable entry locations to the __patchable_function_entries section. Add an additional

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-13 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM pending on question left in one comment https://github.com/llvm/llvm-project/pull/130690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

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

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir bcardosolopes wrote: Has this been addressed? https://github.com/llvm/llvm-project/pull/130690 ___ cfe

[clang] [Clang driver] Diagnose `-maix-shared-lib-tls-model-opt` on wrong targets (PR #130865)

2025-03-13 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast edited https://github.com/llvm/llvm-project/pull/130865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e0e80db - [Clang codegen][PPC] Produce AIX-specific "target features" only for AIX (#130864)

2025-03-13 Thread via cfe-commits
Author: Hubert Tong Date: 2025-03-13T18:13:03-04:00 New Revision: e0e80dbe432008b280b3b77ac142cc915bd42472 URL: https://github.com/llvm/llvm-project/commit/e0e80dbe432008b280b3b77ac142cc915bd42472 DIFF: https://github.com/llvm/llvm-project/commit/e0e80dbe432008b280b3b77ac142cc915bd42472.diff L

[clang] [CIR] Add cir-translate and cir-lsp-server tools (PR #131181)

2025-03-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,166 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [Clang driver] Diagnose `-maix-shared-lib-tls-model-opt` on wrong targets (PR #130865)

2025-03-13 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast updated https://github.com/llvm/llvm-project/pull/130865 >From 45827d5b7e0f98f52280191d79d72a5698adb312 Mon Sep 17 00:00:00 2001 From: Hubert Tong Date: Sun, 9 Mar 2025 21:44:53 -0400 Subject: [PATCH] [Clang driver] Diagnose -maix-shared-lib-tls-model-o

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-03-13 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Just ran into some related code: see 3d0a540857edbd510e329f40581f6b2c1968ccca . Maybe using IgnoreParenCasts() like that code does is appropriate. (I don't really like using IgnoreParenCasts() because there's such a big variety of casts, but it's probably okay in this co

[clang-tools-extra] [clang-tidy] Add new check bugprone-capture-this-by-field (PR #130297)

2025-03-13 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,144 @@ +// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-capturing-this-by-field %t -- -config="{CheckOptions: {bugprone-capturing-this-by-field.FunctionWrapperTypes: '::std::function;::Fn'}}" -- denzor200 wrote: Created issues about bind a

[clang] [llvm] Support alternative sections for patchable function entries (PR #131230)

2025-03-13 Thread Sami Tolvanen via cfe-commits
samitolvanen wrote: @MaskRay here's a draft implementation of the patchable function entry extension [discussed in LKML](https://lore.kernel.org/lkml/y1qezk%2fa41pkl...@hirez.programming.kicks-ass.net/) a couple of years ago. Could you please take a look and see if this seems reasonable? htt

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

2025-03-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -11,6 +11,9 @@ add_clang_library(clangCIRFrontendAction DEPENDS MLIRCIROpsIncGen MLIRCIROpInterfacesIncGen + # Add mlir-generic-headers dependency as the header CIRGenAction.h needs to + # include BuiltinOps.h + mlir-generic-headers bcardosolopes wr

[clang] [llvm] Reapply "Use global TimerGroups for both new pass manager and old pas… (PR #131217)

2025-03-13 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 edited https://github.com/llvm/llvm-project/pull/131217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add cir-translate and cir-lsp-server tools (PR #131181)

2025-03-13 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/131181 >From 5847660fc62645844e009f6b67a0c238b66f99ae Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Thu, 13 Mar 2025 10:57:12 -0700 Subject: [PATCH 1/3] [CIR] Add cir-translate tool --- clang/test/CIR/Tools/cir-tran

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -833,6 +833,12 @@ def BuiltinVaStart : Builtin { let Prototype = "void(__builtin_va_list_ref, ...)"; } +def BuiltinC32VaStart : LangBuiltin<"C23_LANG"> { erichkeane wrote: Actually KIND OF sad that this is C23 only. a `va_start` macro having to change

[clang] [Headers] Create stub spirvintrin.h (PR #131164)

2025-03-13 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield edited https://github.com/llvm/llvm-project/pull/131164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

2025-03-13 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Perhaps a release note makes sense as well. https://github.com/llvm/llvm-project/pull/130993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)

2025-03-13 Thread Hank Chang via cfe-commits
HankChang736 wrote: [#130733](https://github.com/llvm/llvm-project/pull/130733) is merged. This pr will be marked as closed. https://github.com/llvm/llvm-project/pull/128636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/131166 >From 92e26f7fd99774ea9716389d3108547dbb878f90 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 13 Mar 2025 12:24:18 -0400 Subject: [PATCH 1/2] [C23] Add __builtin_c23_va_start This builtin is suppo

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-13 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/129934 >From d3923bdd318e6d466650a107d80272765a7e24cd Mon Sep 17 00:00:00 2001 From: higher-performance Date: Wed, 5 Mar 2025 15:49:06 -0500 Subject: [PATCH] Reduce memory usage in AST parent map generation

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

2025-03-13 Thread Helena Kotas via cfe-commits
@@ -214,12 +213,12 @@ void CGHLSLRuntime::addBuffer(const HLSLBufferDecl *BufDecl) { llvm::TargetExtType *TargetTy = cast(convertHLSLSpecificType( ResHandleTy, BufDecl->hasValidPackoffset() ? &Layout : nullptr)); - llvm::GlobalVariable *BufGV = - new Gl

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread via cfe-commits
@@ -17261,33 +17261,50 @@ void Sema::DiagnoseStaticAssertDetails(const Expr *E) { } } -bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, - std::string &Result, - ASTConte

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-nvptx64-nvidia-ubuntu` running on `as-builder-7` while building `clang,llvm` at step 6 "test-build-unified-tree-check-llvm". Full details are available at: https://lab.llvm.org/buildbot/#/builders/160/builds/14607 Here

[clang] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-13 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm. https://github.com/llvm/llvm-project/pull/130989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cb0d9fc - [HLSL][NFC] Update HLSL AST tests to be more readable (#130910)

2025-03-13 Thread via cfe-commits
Author: Helena Kotas Date: 2025-03-13T09:52:20-07:00 New Revision: cb0d9fcd72be45141c74598e2f609dd06462dd8d URL: https://github.com/llvm/llvm-project/commit/cb0d9fcd72be45141c74598e2f609dd06462dd8d DIFF: https://github.com/llvm/llvm-project/commit/cb0d9fcd72be45141c74598e2f609dd06462dd8d.diff

[clang] [HLSL][NFC] Update HLSL AST tests to be more readable (PR #130910)

2025-03-13 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/130910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both %s -triple i386-pc-unknown +// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both %s -triple x86_64-apple-darwin9 +// RUN: %clang_cc1 -std=c23 -fsyntax-only

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -4864,14 +4877,22 @@ bool Sema::BuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall) { return true; // Verify that the second argument to the builtin is the last argument of the erichkeane wrote: ```suggestion // Verify that the second argument t

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes Implements GCC's constexpr string ASM extension https://gcc.gnu.org/onlinedocs/gcc/Asm-constexprs.html --- Patch is 77.41 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/p

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: cor3ntin (cor3ntin) Changes Implements GCC's constexpr string ASM extension https://gcc.gnu.org/onlinedocs/gcc/Asm-constexprs.html --- Patch is 77.41 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-p

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: cor3ntin (cor3ntin) Changes Implements GCC's constexpr string ASM extension https://gcc.gnu.org/onlinedocs/gcc/Asm-constexprs.html --- Patch is 77.41 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-p

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -833,6 +833,12 @@ def BuiltinVaStart : Builtin { let Prototype = "void(__builtin_va_list_ref, ...)"; } +def BuiltinC32VaStart : LangBuiltin<"C23_LANG"> { erichkeane wrote: still KIND OF sad. https://github.com/llvm/llvm-project/pull/131166

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-13 Thread via cfe-commits
higher-performance wrote: > Interesting... this ends up just being a set-vector with a different identity > being stored for the set. So this ends up being ~4 ptr-sizes (IIRC you said > that DynTypedNode is 3x the size of a pointer) per-record (though the extra 1 > is only for those with memoi

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both %s -triple i386-pc-unknown +// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both %s -triple x86_64-apple-darwin9 +// RUN: %clang_cc1 -std=c23 -fsyntax-only

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -17261,33 +17261,50 @@ void Sema::DiagnoseStaticAssertDetails(const Expr *E) { } } -bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, - std::string &Result, - ASTConte

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -17300,7 +17317,8 @@ bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, std::optional SizeMember = FindMember("size", SizeNotFound); std::optional DataMember = FindMember("data", DataNotFound); if (SizeNotFound || DataNotFound) { erichkeane

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread via cfe-commits
https://github.com/cor3ntin ready_for_review https://github.com/llvm/llvm-project/pull/131003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][NFC] Update HLSL AST tests to be more readable (PR #130910)

2025-03-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/14545 Here is the relevant piec

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -4864,14 +4877,22 @@ bool Sema::BuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall) { return true; // Verify that the second argument to the builtin is the last argument of the - // current function or method. In C23 mode, if the second argument is an - // intege

[clang] [HLSL] add extra scalar vector overloads for clamp (PR #129939)

2025-03-13 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/129939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] add extra scalar vector overloads for clamp (PR #129939)

2025-03-13 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/129939 >From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Tue, 4 Mar 2025 09:53:56 -0800 Subject: [PATCH 01/11] extra scalar vector overloads for clamp --- .../lib/Headers/h

[clang] [clang][driver][NFC] Remove else after return (PR #131182)

2025-03-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. https://github.com/llvm/llvm-project/pull/131182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] add extra scalar vector overloads for clamp (PR #129939)

2025-03-13 Thread Sarah Spall via cfe-commits
@@ -94,6 +109,9 @@ uint64_t3 test_clamp_ulong3(uint64_t3 p0, uint64_t3 p1) { return clamp(p0, p1,p1 // CHECK: define [[FNATTRS]] <4 x i64> @_Z17test_clamp_ulong4 // CHECK: call <4 x i64> @llvm.[[TARGET]].uclamp.v4i64 uint64_t4 test_clamp_ulong4(uint64_t4 p0, uint64_t4 p1) { re

[clang] [clang][driver][NFC] Remove else after return (PR #131182)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paul Kirth (ilovepi) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/131182.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Arch/RISCV.cpp (+10-12) ``diff diff --git a/clang/lib/Driver/ToolCh

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both %s -triple i386-pc-unknown +// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both %s -triple x86_64-apple-darwin9 +// RUN: %clang_cc1 -std=c23 -fsyntax-only

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both %s -triple i386-pc-unknown +// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both %s -triple x86_64-apple-darwin9 +// RUN: %clang_cc1 -std=c23 -fsyntax-only

[clang] [Headers] Create stub spirvintrin.h (PR #131164)

2025-03-13 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield updated https://github.com/llvm/llvm-project/pull/131164 >From d91671fdbb2aa9204f728747009459373bfd6553 Mon Sep 17 00:00:00 2001 From: Jon Chesterfield Date: Thu, 13 Mar 2025 15:44:52 + Subject: [PATCH] [Headers] Create stub spirintrin.h --- clang/lib/He

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

2025-03-13 Thread Hans Wennborg via cfe-commits
zmodem wrote: > It turns out another issue (https://crbug.com/402425841) also bisected to > this PR. That one is a run-time problem, so it may be trickier to figure out, > but I will look into it next. The bugs seem related by both involving the ICU library, and if squinting a bit it seems th

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/131166 >From 92e26f7fd99774ea9716389d3108547dbb878f90 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 13 Mar 2025 12:24:18 -0400 Subject: [PATCH 1/3] [C23] Add __builtin_c23_va_start This builtin is suppo

[clang] [Headers] Create stub spirv64intrin.h (PR #131164)

2025-03-13 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: > Name should be `spirvintrin.h` but if we can't support 32 for now just error > in the preprocessor. Yep, you're right. It'll be caught by only checking for the SPIRV64 macro, but nothing in this file is 32 vs 64 bit dependent as that's part of what gpuintrin.h gives u

[clang] [NFC][analyzer] Framework for multipart checkers (PR #130985)

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

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Aaron Ballman via cfe-commits
@@ -4864,14 +4877,22 @@ bool Sema::BuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall) { return true; // Verify that the second argument to the builtin is the last argument of the AaronBallman wrote: Yup, I'll fix. https://github.com/llvm/llvm-proje

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Aaron Ballman via cfe-commits
@@ -833,6 +833,12 @@ def BuiltinVaStart : Builtin { let Prototype = "void(__builtin_va_list_ref, ...)"; } +def BuiltinC32VaStart : LangBuiltin<"C23_LANG"> { AaronBallman wrote: This matches GCC's behavior: https://godbolt.org/z/K8Tdqa9v4 https://github.com

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Aaron Ballman via cfe-commits
@@ -4864,14 +4877,22 @@ bool Sema::BuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall) { return true; // Verify that the second argument to the builtin is the last argument of the - // current function or method. In C23 mode, if the second argument is an - // intege

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-13 Thread via cfe-commits
@@ -69,17 +70,22 @@ class ParentMapContext::ParentMap { for (; N > 0; --N) push_back(Value); } -bool contains(const DynTypedNode &Value) { - return Seen.contains(Value); +bool contains(const DynTypedNode &Value) const { + const void *Identity

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread via cfe-commits
@@ -609,9 +632,10 @@ int GCCAsmStmt::getNamedOperand(StringRef SymbolicName) const { /// true, otherwise return false. unsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl&Pieces, const ASTContext &C, unsigned &DiagOffs) const { - StringRef S

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/131166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -17261,33 +17261,50 @@ void Sema::DiagnoseStaticAssertDetails(const Expr *E) { } } -bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, - std::string &Result, - ASTConte

[clang] [clang][lit] mkdir before mkstemp in is_filesystem_case_insensitive() (PR #131036)

2025-03-13 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/131036 >From 6ab707eec90cbe1d8a8f5ddf19765f514b275095 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Wed, 12 Mar 2025 21:42:47 + Subject: [PATCH 1/2] [clang][lit] mkdir before mkstemp in is_filesystem_case_i

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both %s -triple i386-pc-unknown +// RUN: %clang_cc1 -std=c23 -fsyntax-only -ffreestanding -verify=expected,both %s -triple x86_64-apple-darwin9 +// RUN: %clang_cc1 -std=c23 -fsyntax-only

[clang] 09d8e44 - [llvm][Timer] Use global TimerGroups for both new pass manager and old pass manager timers (#130375)

2025-03-13 Thread via cfe-commits
Author: Alan Zhao Date: 2025-03-13T10:13:28-07:00 New Revision: 09d8e442ac2884aabe4cdfb01d1444b54cff7147 URL: https://github.com/llvm/llvm-project/commit/09d8e442ac2884aabe4cdfb01d1444b54cff7147 DIFF: https://github.com/llvm/llvm-project/commit/09d8e442ac2884aabe4cdfb01d1444b54cff7147.diff LOG

[clang] [NFC] Fix formatting for #80963 (PR #131100)

2025-03-13 Thread via cfe-commits
https://github.com/Megan0704-1 updated https://github.com/llvm/llvm-project/pull/131100 >From d71f03f02bb97d12dfd5b02516418d802e588a8c Mon Sep 17 00:00:00 2001 From: Megan Date: Tue, 11 Mar 2025 17:09:04 -0700 Subject: [PATCH 1/3] [Sema] Diagnose by-value copy constructors in template instanti

[clang-tools-extra] [clang-tidy] 'modernize-use-starts-ends-with': fixed false positives on `find` and `rfind` (PR #129564)

2025-03-13 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank approved this pull request. I saw you have a pending commit access request -- I'll just let you merge this when you are able to. https://github.com/llvm/llvm-project/pull/129564 ___ cfe-commits mailing list cfe-commits@list

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

2025-03-13 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: New version also includes the release notes for this. https://github.com/llvm/llvm-project/pull/130993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

2025-03-13 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd updated https://github.com/llvm/llvm-project/pull/130993 >From 1021d05a73cb990bcbdd1948fd372fdf4b1a21ec Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 12 Mar 2025 09:52:58 -0700 Subject: [PATCH] Lex: add support for `i128` and `ui128` suffixes Microsof

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-nvptx-nvidia-ubuntu` running on `as-builder-7` while building `clang,llvm` at step 6 "test-build-unified-tree-check-llvm". Full details are available at: https://lab.llvm.org/buildbot/#/builders/180/builds/14604 Here i

[clang] [llvm] Revert "Use global TimerGroups for both new pass manager and old pass manager timers" (PR #131173)

2025-03-13 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/131173 Reverts llvm/llvm-project#130375 Causes breakages, e.g. https://lab.llvm.org/buildbot/#/builders/160/builds/14607 >From 747535b6fd8b3bbee0c8a34a7d92fd47a89d65f5 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks D

[clang] [HLSL] Add bounds checks for the HLSL `fmod` vector arguments and return types (PR #131035)

2025-03-13 Thread Sarah Spall via cfe-commits
@@ -58,9 +58,7 @@ constexpr vector reflect_vec_impl(vector I, vector N) { #endif } -template -constexpr enable_if_t::value || is_same::value, T> -fmod_impl(T X, T Y) { +template constexpr T fmod_impl(T X, T Y) { spall wrote: Why is this needed along with t

[clang] [llvm] [analysis] Software Bill of Mitigations (PR #130103)

2025-03-13 Thread Oskar Wirga via cfe-commits
@@ -0,0 +1,304 @@ +#include "llvm/Analysis/MitigationAnalysis.h" +#include "llvm/IR/DebugInfo.h" +#include "llvm/IR/DebugLoc.h" +#include "llvm/IR/Function.h" +#include "llvm/IR/InstIterator.h" +#include "llvm/IR/Metadata.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support

[clang] [llvm] [analysis] Software Bill of Mitigations (PR #130103)

2025-03-13 Thread Oskar Wirga via cfe-commits
@@ -0,0 +1,304 @@ +#include "llvm/Analysis/MitigationAnalysis.h" +#include "llvm/IR/DebugInfo.h" +#include "llvm/IR/DebugLoc.h" +#include "llvm/IR/Function.h" +#include "llvm/IR/InstIterator.h" +#include "llvm/IR/Metadata.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support

[clang] e93e0dd - [NFC] Fix formatting for #80963 (#131100)

2025-03-13 Thread via cfe-commits
Author: Kuo, Mei-Chun Date: 2025-03-13T19:02:42+01:00 New Revision: e93e0dd10cdab03941a363e53aaee925a9d2c0c1 URL: https://github.com/llvm/llvm-project/commit/e93e0dd10cdab03941a363e53aaee925a9d2c0c1 DIFF: https://github.com/llvm/llvm-project/commit/e93e0dd10cdab03941a363e53aaee925a9d2c0c1.diff

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-13 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Hmm...the bot breakages look like LLD test failures. Will investigate further. https://github.com/llvm/llvm-project/pull/130375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] 5af5fb0 - [C2y] Claim conformance to WG14 N3482

2025-03-13 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-03-13T13:59:17-04:00 New Revision: 5af5fb055527f3145af08cf7f1fbacd97701ff36 URL: https://github.com/llvm/llvm-project/commit/5af5fb055527f3145af08cf7f1fbacd97701ff36 DIFF: https://github.com/llvm/llvm-project/commit/5af5fb055527f3145af08cf7f1fbacd97701ff36.diff

[clang] [llvm] [analysis] Software Bill of Mitigations (PR #130103)

2025-03-13 Thread Oskar Wirga via cfe-commits
https://github.com/oskarwirga commented: Added some comments for other reviewers to highlight some of the tradeoffs we had to make + if they could be improved upon. CC: @devincoughlin https://github.com/llvm/llvm-project/pull/130103 ___ cfe-commits m

<    1   2   3   4   5   >