[clang] [HLSL] Resource initialization by constructors (PR #135120)

2025-04-10 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/135120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make enums trivially equality comparable (PR #133587)

2025-04-10 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > The summary should not merely link to an issue but describe the problem as > well. Two reasons: > > 1. for folks reading this in git log > > 2. The issue may not totally explain what is going on. > > > I actually did not get it at first b/c the issue talks about _

[clang] [compiler-rt] [libc] [libcxx] [llvm] [AMDGPU] Fix code object version not being set to 'none' (PR #135036)

2025-04-10 Thread Matt Arsenault via cfe-commits
@@ -62,7 +62,7 @@ Value *EmitAMDGPUWorkGroupSize(CodeGenFunction &CGF, unsigned Index) { auto Cov = CGF.getTarget().getTargetOpts().CodeObjectVersion; - if (Cov == CodeObjectVersionKind::COV_None) { + if (Cov == CodeObjectVersionKind::COV_None && !CGF.getLangOpts().OpenM

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

2025-04-10 Thread via cfe-commits
Author: sstwcw Date: 2025-04-10T12:51:10Z New Revision: ed858220276dd11f6c2d7a5d3e357c211f9c6190 URL: https://github.com/llvm/llvm-project/commit/ed858220276dd11f6c2d7a5d3e357c211f9c6190 DIFF: https://github.com/llvm/llvm-project/commit/ed858220276dd11f6c2d7a5d3e357c211f9c6190.diff LOG: [clang

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

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

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

2025-04-10 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2025-04-10T15:02:21+02:00 New Revision: 2b3aa56fd742775c5b05c3053778832aa76c0feb URL: https://github.com/llvm/llvm-project/commit/2b3aa56fd742775c5b05c3053778832aa76c0feb DIFF: https://github.com/llvm/llvm-project/commit/2b3aa56fd742775c5b05c3053778832aa76c0f

[clang] [CIR] Upstream initial function call support (PR #134673)

2025-04-10 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/134673 >From 88a41a88abbc32e02fb65efc64c830a723932302 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Tue, 8 Apr 2025 22:54:24 +0800 Subject: [PATCH] [CIR] Upstream initial function call support --- .../CIR/Dialect/Bui

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

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

[clang] [CIR] Upstream initial function call support (PR #134673)

2025-04-10 Thread Sirui Mu via cfe-commits
@@ -1342,6 +1342,47 @@ def FuncOp : CIR_Op<"func", [ let hasVerifier = 1; } +//===--===// +// CallOp +//===--===// + +class CIR_CallOpBase

[clang] [CIR] Upstream initial function call support (PR #134673)

2025-04-10 Thread Sirui Mu via cfe-commits
Lancern wrote: I'm going to merge this once the CI is green. https://github.com/llvm/llvm-project/pull/134673 ___ 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/3] [clang] Merge gtest binaries into AllClangUnitTests This reduces

[clang-tools-extra] [clang-doc] Add Start and End Line Numbers (PR #135081)

2025-04-10 Thread Paul Kirth via cfe-commits
ilovepi wrote: seems like some tests need to be updated w/ the new interface. https://github.com/llvm/llvm-project/pull/135081 ___ 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/4] [clang] Merge gtest binaries into AllClangUnitTests This reduces

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

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

[clang] [clang] 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] [CIR] Upstream initial function call support (PR #134673)

2025-04-10 Thread Sirui Mu via cfe-commits
https://github.com/Lancern closed https://github.com/llvm/llvm-project/pull/134673 ___ 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/6] [clang] Merge gtest binaries into AllClangUnitTests This reduces

[clang-tools-extra] [llvm] [clang-doc] Adds a mustache backend (PR #133161)

2025-04-10 Thread Paul Kirth via cfe-commits
ilovepi wrote: FYI the new GSOC period is going to start around May 8. We hope to have new students working on clang-doc, so this patch series needs to be landed by then so we don't have students blocked on this. While there has been some progress on the patch set, its been up in one form or a

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #135030)

2025-04-10 Thread Michael Klemm via cfe-commits
mjklemm wrote: I think the error message is still misleading because: - it refers to "bitwise operators" which is not something that goes into `notwait`, but rather an expression that should be of a logical type; and - it should IMHO not be "floating type", but "floating-point type". https://

[clang-tools-extra] [clang-tidy] Improve `bugprone-exception-escape`: add stacktrace of escaped exception (PR #134375)

2025-04-10 Thread Baranov Victor via cfe-commits
vbvictor wrote: Some more real-world examples how it was before ![image](https://github.com/user-attachments/assets/7fe19331-2baa-4615-90e1-6c763ad8179f) and after ![image](https://github.com/user-attachments/assets/970b387c-83c2-4569-b752-c5d66d46e237) https://github.com/llvm/llvm-project/pul

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

2025-04-10 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google approved this pull request. https://github.com/llvm/llvm-project/pull/133910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Fix commands in compile_to_bc are executed sequentially (PR #130755)

2025-04-10 Thread Wenju He via cfe-commits
@@ -63,13 +65,15 @@ function(compile_to_bc) ${ARG_DEPENDENCIES} DEPFILE ${ARG_OUTPUT}.d ) + add_custom_target( ${ARG_TARGET} DEPENDS ${ARG_OUTPUT}${TMP_SUFFIX} ) wenju-he wrote: I have simplified the code by removing ${ARG_TARGET}-as The issue we

[clang] [Clang][ARM] Ensure FPU Features are parsed when targeting `cc1as` (PR #134612)

2025-04-10 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 updated https://github.com/llvm/llvm-project/pull/134612 >From a5b81d22fef03a87f37b9f7c461f464a1c245df4 Mon Sep 17 00:00:00 2001 From: Jack Styles Date: Fri, 7 Mar 2025 15:49:00 + Subject: [PATCH 1/5] [Clang] [ARM] Ensure FPU Features are collected when using t

[clang] [Clang][ARM] Ensure FPU Features are parsed when targeting `cc1as` (PR #134612)

2025-04-10 Thread Jack Styles via cfe-commits
@@ -38,6 +38,9 @@ Potentially Breaking Changes - Fix missing diagnostics for uses of declarations when performing typename access, such as when performing member access on a '[[deprecated]]' type alias. (#GH58547) +- For ARM targets, when using cc1as, the features included

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-04-10 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux-multistage` running on `systemz-1` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/98/builds/1253 Here is the relevant piece of the

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

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed 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] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Mariya Podchishchaeva 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] [clang][CodeGen] Fix metadata when vectorization is disabled by pragma (PR #135163)

2025-04-10 Thread Ryotaro Kasuga via cfe-commits
@@ -194,7 +194,7 @@ void for_test_scalable(int *List, int Length) { } } -// Verify for loop is performing scalable vectorization +// Verify for loop is NOT performing vectorization because the width is 1 kasuga-fj wrote: You are right, I misunderstood the c

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-04-10 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Looks like this breaks tests on macOS: > http://45.33.8.238/macm1/104220/step_6.txt > > Please take a look and revert for now if it takes a while to fix. This should already be addressed by 5a1b4ec6f4b773f191e98183ae4628785729daa1, I'm watching the bots to make sure they

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

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

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-04-10 Thread Nico Weber via cfe-commits
nico wrote: Confirmed, bots are happy again. Thanks for the super fast fix, and sorry for the noise :) https://github.com/llvm/llvm-project/pull/133472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #135030)

2025-04-10 Thread Michael Klemm via cfe-commits
@@ -11530,6 +11530,8 @@ def note_omp_nested_teams_construct_here : Note< "nested teams construct here">; def note_omp_nested_statement_here : Note< "%select{statement|directive}0 outside teams construct here">; +def err_omp_nowait_with_arg_unsupported : Error< + "'nowait'

[clang] [Clang][ARM] Ensure FPU Features are parsed when targeting `cc1as` (PR #134612)

2025-04-10 Thread Martin Storsjö via cfe-commits
@@ -679,21 +679,17 @@ llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, CPUArgFPUKind != llvm::ARM::FK_INVALID ? CPUArgFPUKind : ArchArgFPUKind; (void)llvm::ARM::getFPUFeatures(FPUKind, Features); } else { -bool Generic = true; -if (!ForAS) {

[clang] [clang][CodeGen] Add range metadata for atomic load of boolean type. #131476 (PR #133546)

2025-04-10 Thread Jan Górski via cfe-commits
https://github.com/janagor updated https://github.com/llvm/llvm-project/pull/133546 From 4581169d6fbe72357bb83b95fe36c8cc606efa1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20G=C3=B3rski?= Date: Fri, 28 Mar 2025 23:36:18 +0100 Subject: [PATCH 1/6] [clang][CodeGen] Added llvm ir pre-commit tes

[clang] f7617f7 - [clang-format] Recognize TableGen paste operator on separate line (#133722)

2025-04-10 Thread via cfe-commits
Author: sstwcw Date: 2025-04-10T12:52:02Z New Revision: f7617f7f909102080f1a0cee46f8ca75ec8d14ff URL: https://github.com/llvm/llvm-project/commit/f7617f7f909102080f1a0cee46f8ca75ec8d14ff DIFF: https://github.com/llvm/llvm-project/commit/f7617f7f909102080f1a0cee46f8ca75ec8d14ff.diff LOG: [clang

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

2025-04-10 Thread Chris B via cfe-commits
@@ -3964,6 +3964,8 @@ Value *ScalarExprEmitter::EmitRem(const BinOpInfo &Ops) { if (Ops.Ty->hasUnsignedIntegerRepresentation()) return Builder.CreateURem(Ops.LHS, Ops.RHS, "rem"); + else if (CGF.getLangOpts().HLSL && Ops.Ty->hasFloatingRepresentation()) +return Buil

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

2025-04-10 Thread Tim Clephas via cfe-commits
@@ -33,7 +33,7 @@ to format C/C++/Java/JavaScript/JSON/Objective-C/Protobuf/C# code. Clang-format options: --Werror - If set, changes formatting warnings to errors ---Wno-error=- If set, don't error out on the specified warning ty

[clang] [clang][CodeGen] Fix metadata when vectorization is disabled by pragma (PR #135163)

2025-04-10 Thread Luke Lau via cfe-commits
@@ -194,7 +194,7 @@ void for_test_scalable(int *List, int Length) { } } -// Verify for loop is performing scalable vectorization +// Verify for loop is NOT performing vectorization because the width is 1 lukel97 wrote: > If taking the intent of the original

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

2025-04-10 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/135125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-10 Thread Sarah Spall via cfe-commits
https://github.com/spall approved this pull request. https://github.com/llvm/llvm-project/pull/135125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] [llvm] MCAsmStreamer: Replace the MCInstPrinter * parameter with unique_ptr (PR #135128)

2025-04-10 Thread Fangrui Song via cfe-commits
@@ -541,8 +542,8 @@ static bool ExecuteAssemblerImpl(AssemblerInvocation &Opts, // FIXME: There is a bit of code duplication with addPassesToEmitFile. if (Opts.OutputType == AssemblerInvocation::FT_Asm) { -MCInstPrinter *IP = TheTarget->createMCInstPrinter( -ll

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

2025-04-10 Thread Erich Keane via cfe-commits
@@ -168,6 +168,8 @@ class TemplateArgument { LLVM_PREFERRED_TYPE(bool) unsigned IsDefaulted : 1; uintptr_t V; +LLVM_PREFERRED_TYPE(bool) +unsigned IsCanonicalExpr : 1; erichkeane wrote: Oh, yeah, definitely agree there. It would be nice if

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

2025-04-10 Thread Erich Keane via cfe-commits
@@ -3250,8 +3251,7 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, TemplateArgument NumArgsArg = Converted[2]; if (NumArgsArg.isDependent()) - return Context.getCanonicalTemplateSpecializationType(TemplateName(BTD), -

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

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

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

2025-04-10 Thread Matheus Izvekov via cfe-commits
@@ -168,6 +168,8 @@ class TemplateArgument { LLVM_PREFERRED_TYPE(bool) unsigned IsDefaulted : 1; uintptr_t V; +LLVM_PREFERRED_TYPE(bool) +unsigned IsCanonicalExpr : 1; mizvekov wrote: Yeah sure. Though it's not going to make a difference in

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

2025-04-10 Thread Matheus Izvekov via cfe-commits
@@ -3250,8 +3251,7 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, TemplateArgument NumArgsArg = Converted[2]; if (NumArgsArg.isDependent()) - return Context.getCanonicalTemplateSpecializationType(TemplateName(BTD), -

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

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

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

2025-04-10 Thread Sarah Spall via cfe-commits
@@ -0,0 +1,110 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library %s \ +// RUN: -fnative-half-type -emit-llvm -disable-llvm-passes -o - | \ +// RUN: FileCheck %s +// RUN: %clang_cc1 -finclude-default-header -triple spirv-unknown-vulkan-compu

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

2025-04-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/135119 >From ee7360df51bdc8b0f9e9582d9cfa5ecd36a6df1d Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 17 Sep 2022 18:07:28 +0200 Subject: [PATCH] [clang] Improved canonicalization for template specialization

[clang] [llvm] MCAsmStreamer: Replace the MCInstPrinter * parameter with unique_ptr (PR #135128)

2025-04-10 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/135128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] MCAsmStreamer: Replace the MCInstPrinter * parameter with unique_ptr (PR #135128)

2025-04-10 Thread Sergei Barannikov via cfe-commits
@@ -541,8 +542,8 @@ static bool ExecuteAssemblerImpl(AssemblerInvocation &Opts, // FIXME: There is a bit of code duplication with addPassesToEmitFile. if (Opts.OutputType == AssemblerInvocation::FT_Asm) { -MCInstPrinter *IP = TheTarget->createMCInstPrinter( -ll

[clang] [llvm] MCAsmStreamer: Replace the MCInstPrinter * parameter with unique_ptr (PR #135128)

2025-04-10 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov edited https://github.com/llvm/llvm-project/pull/135128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream binary assignments and comma (PR #135115)

2025-04-10 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/135115 >From bcaeadf7fff01d2d92b0d234b40f8d5884974e4c Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Thu, 10 Apr 2025 03:53:43 +0200 Subject: [PATCH 1/2] [CIR] Upstream binary assignments and comma This patch adds `Vi

[clang] [CIR] Upstream binary assignments and comma (PR #135115)

2025-04-10 Thread Morris Hafner via cfe-commits
@@ -0,0 +1,53 @@ +// RUN: %clang_cc1 -std=c23 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR +// RUN: %clang_cc1 -std=c23 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-10 Thread Sander de Smalen via cfe-commits
@@ -1990,21 +2028,56 @@ static bool canConvertValue(const DataLayout &DL, Type *OldTy, Type *NewTy) { static Value *convertValue(const DataLayout &DL, IRBuilderTy &IRB, Value *V, Type *NewTy) { Type *OldTy = V->getType(); - assert(canConvertValue(

[clang] [HLSL] Use hlsl_device address space for getpointer. (PR #127675)

2025-04-10 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/127675 >From 7e1a486302d4029c926362287341cd79dcdc21cf Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 12 Feb 2025 15:45:32 -0500 Subject: [PATCH] [HLSL] Use hlsl_device address space for getpointer. We add th

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

2025-04-10 Thread Tim Clephas via cfe-commits
https://github.com/Timple updated https://github.com/llvm/llvm-project/pull/135137 >From a924a68f906a14ee479b547658f6633328427ecd Mon Sep 17 00:00:00 2001 From: Tim Clephas Date: Thu, 10 Apr 2025 08:53:20 +0200 Subject: [PATCH 1/4] Treat ipynb as json Fixes #110727 --- clang/lib/Format/Format

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

2025-04-10 Thread Alexey Bataev via cfe-commits
@@ -4280,6 +4282,18 @@ getTargetRegionParams(Sema &SemaRef) { return Params; } +static SmallVector +getDispatchRegionParams(Sema &SemaRef) { + ASTContext &Context = SemaRef.getASTContext(); + SmallVector Params; + + // QualType VoidPtrTy = Context.VoidPtrTy.withConst().w

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

2025-04-10 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/135125 >From cb40adc19bf488f73bfaa75c5417080bcb4b3967 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 10 Apr 2025 00:01:58 -0400 Subject: [PATCH 1/2] [HLSL] Add support for modulo of floating point scalar and v

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-10 Thread Sander de Smalen via cfe-commits
@@ -554,6 +554,22 @@ class VectorType : public Type { return VectorType::get(VTy->getElementType(), EltCnt * 2); } + /// This static method returns a VectorType with the same size-in-bits as + /// SizeTy but with an element type that matches the scalar type of EltTy. +

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

2025-04-10 Thread Alexey Bataev via cfe-commits
@@ -4899,6 +4899,151 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [llvm] [AArch64][SelectionDAG] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-04-10 Thread Rodolfo Wottrich via cfe-commits
rgwott wrote: @arichardson Yes, of course. It's just that this is low priority at work right now. I intend to come back to it in some days. https://github.com/llvm/llvm-project/pull/105669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

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

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

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

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

[clang] [clang] fix serialization of SubstNonTypeTemplateParmExpr (PR #134560)

2025-04-10 Thread via cfe-commits
bgra8 wrote: Heads-up @mizvekov we have bisected a non-deterministic compilation down to this change. We're working on a reproducer. https://github.com/llvm/llvm-project/pull/134560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

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

2025-04-10 Thread via cfe-commits
@@ -4528,6 +4528,115 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dyn_cast(SubExpr

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

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

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

2025-04-10 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,151 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

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

2025-04-10 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > BTW, I think `-fmodule-file=` is not a suggested way to introduce BMIs. It > > will load the BMIs eagerly. And for named modules, we will load them lazily > > according to their name. For header units, may be we can do something with > > FID. It matters for cases like: >

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-04-10 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: Hi @emaxx-google, any updates on the second minimization run? https://github.com/llvm/llvm-project/pull/133057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] [llvm] Add clang driver changes to support MTI RISC-V (PR #134065)

2025-04-10 Thread Djordje Todorovic via cfe-commits
@@ -1874,15 +1894,26 @@ static void findRISCVMultilibs(const Driver &D, MultilibBuilder("lib64/lp64f").flag("-m64").flag("-mabi=lp64f"); MultilibBuilder Lp64d = MultilibBuilder("lib64/lp64d").flag("-m64").flag("-mabi=lp64d"); + + SmallVector Endian; + if (Target

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

2025-04-10 Thread Alexey Bataev via cfe-commits
@@ -4528,6 +4528,115 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dyn_cast(SubExpr

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

2025-04-10 Thread Alexey Bataev via cfe-commits
@@ -4899,6 +4899,150 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

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

2025-04-10 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/135125 >From cb40adc19bf488f73bfaa75c5417080bcb4b3967 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 10 Apr 2025 00:01:58 -0400 Subject: [PATCH 1/3] [HLSL] Add support for modulo of floating point scalar and v

[libclc] 7d32d72 - [libclc][NFC] Remove blank line at end of file

2025-04-10 Thread Fraser Cormack via cfe-commits
Author: Fraser Cormack Date: 2025-04-10T10:02:51+01:00 New Revision: 7d32d72f10445657f598cbdf1bb5f3040373daf5 URL: https://github.com/llvm/llvm-project/commit/7d32d72f10445657f598cbdf1bb5f3040373daf5 DIFF: https://github.com/llvm/llvm-project/commit/7d32d72f10445657f598cbdf1bb5f3040373daf5.diff

[clang] [flang] [llvm] [clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (PR #126956)

2025-04-10 Thread Harald van Dijk via cfe-commits
hvdijk wrote: > Seems reasonable so long as we know that `SPIR-V` is always a GPU. I'll defer > to SPIR people. It's not. SPIR-V is mostly-device-agnostic and implementations may run it on GPU, on CPU, or on any other device. I'm looking at this while trying to update 94229, I think `isGPU()`

[clang] [flang] [llvm] [clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (PR #126956)

2025-04-10 Thread Matt Arsenault via cfe-commits
arsenm wrote: > > Seems reasonable so long as we know that sound reasonable to you? No. This is a bikeshedding problem on the isGPU name. SPIRV is functionally a "GPU" target. The abstract future physical device it nay run on is unimportant https://github.com/llvm/llvm-project/pull/126956 ___

[clang] [flang] [llvm] [clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (PR #126956)

2025-04-10 Thread Harald van Dijk via cfe-commits
hvdijk wrote: It's not a bikeshedding problem that it doesn't handle other SYCL targets consistently though. In some places there are checks for SYCL, in other places there are checks for SPIR-V. https://github.com/llvm/llvm-project/pull/126956 ___ c

[clang] [flang] [llvm] [clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (PR #126956)

2025-04-10 Thread Matt Arsenault via cfe-commits
arsenm wrote: > It's not a bikeshedding problem that it doesn't handle other SYCL targets > consistently though. In some places there are checks for SYCL, in other > places there are checks for SPIR-V. Usage context wrong is a different problem than whether SPIRV should count as "isGPU" http

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

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

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

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

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

2025-04-10 Thread Erich Keane via cfe-commits
@@ -0,0 +1,73 @@ +//===- CodeGenSYCL.cpp - Code for SYCL kernel generation --===// +// +// 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] [flang] [llvm] [clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (PR #126956)

2025-04-10 Thread Matt Arsenault via cfe-commits
arsenm wrote: > It's not a bikeshedding problem that it doesn't handle other SYCL targets > consistently though. In some places there are checks for SYCL, in other > places there are checks for SPIR-V. Usage context wrong is a different problem than whether SPIRV should count as "isGPU" http

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

2025-04-10 Thread Erich Keane via cfe-commits
@@ -3303,6 +3303,27 @@ void CodeGenModule::EmitDeferred() { CurDeclsToEmit.swap(DeferredDeclsToEmit); for (GlobalDecl &D : CurDeclsToEmit) { +// Functions declared with the sycl_kernel_entry_point attribute are +// emitted normally during host compilation. During d

[clang] [flang] [llvm] [clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (PR #126956)

2025-04-10 Thread Harald van Dijk via cfe-commits
hvdijk wrote: I did include "as non-SPIR-V SYCL targets need the same handling" already in my first comment, so not sure why it gets that strong immediate reaction that ignores that part of it. https://github.com/llvm/llvm-project/pull/126956 ___ cfe

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

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

[clang] No longer add enumeration constants to the wrong scope (PR #134998)

2025-04-10 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > It's not clear to me why the example in the PR description should be > rejected, given https://eel.is/c++draft/dcl.enum#12.sentence-1. I also don't > see a clear consensus on CWG reflector to determine whether this change moves > us in the right direction. Do we have to c

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

2025-04-10 Thread via cfe-commits
MillePlateaux wrote: > Thank you for this! Please be sure to add a release note to > `clang/docs/ReleaseNotes.rst` so user know about the fix. @AaronBallman I have modified the code and release note and completed the test cases according to your suggestions,could you review it? https://github

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

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

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

2025-04-10 Thread Erich Keane via cfe-commits
@@ -3250,8 +3251,7 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, TemplateArgument NumArgsArg = Converted[2]; if (NumArgsArg.isDependent()) - return Context.getCanonicalTemplateSpecializationType(TemplateName(BTD), -

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

2025-04-10 Thread Erich Keane via cfe-commits
@@ -168,6 +168,8 @@ class TemplateArgument { LLVM_PREFERRED_TYPE(bool) unsigned IsDefaulted : 1; uintptr_t V; +LLVM_PREFERRED_TYPE(bool) +unsigned IsCanonicalExpr : 1; erichkeane wrote: Can we put this ABOVE the `V` here? `uintptr_t` on so

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

2025-04-10 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: This change broke compiling with `-DLLVM_LINK_LLVM_DYLIB=ON`, as seen in the buildbot log above. Will revert later today if we don't have a fix. https://github.com/llvm/llvm-project/pull/134298 ___ cfe-commits mailing list cfe-commits@

[clang-tools-extra] [clang-tidy] Improve `bugprone-exception-escape`: add stacktrace of escaped exception (PR #134375)

2025-04-10 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/134375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #105479)

2025-04-10 Thread Budimir Aranđelović via cfe-commits
budimirarandjelovichtec wrote: Ping @vitalybuka @aaronpuchert https://github.com/llvm/llvm-project/pull/105479 ___ 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 via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/lib/CodeGen/BackendUtil.cpp clang/unittests/Dri

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-04-10 Thread David Green via cfe-commits
https://github.com/davemgreen updated https://github.com/llvm/llvm-project/pull/135064 >From 33a204bcc884178971c4327528b1e3b75336914e Mon Sep 17 00:00:00 2001 From: David Green Date: Wed, 9 Apr 2025 11:18:25 +0100 Subject: [PATCH 1/4] [AArch64] Add a test case for the coerced arguments. NFC --

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-04-10 Thread David Green via cfe-commits
@@ -485,6 +485,24 @@ ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty, bool IsVariadicFn, } Size = llvm::alignTo(Size, Alignment); +// If the Aggregate is made up of pointers, use an array of pointers for the +// coerced type. This prevents having

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

2025-04-10 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s + +int __attribute__((not_tail_called)) foo1(int a) { +return a + 1; +} + + +int foo2(int a) { +[[clang::musttail]] +return foo1(a); // expected-error{{cannot perform a tail call to function'musttail' b

  1   2   3   4   5   6   7   8   >