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

2025-04-10 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/134698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement the dst HLSL Function (PR #133828)

2025-04-10 Thread via cfe-commits
@@ -0,0 +1,57 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.2-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -o - | FileCheck %s + + +// CHECK-LABEL: define {{.*}} <4 x float> @{{[A-Za-z1-9_]+}}dst_impl{{[A-Za-z1-9_]*}}( +//

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

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

[clang] 85614e1 - [CIR] Upstream initial function call support (#134673)

2025-04-10 Thread via cfe-commits
Author: Sirui Mu Date: 2025-04-10T22:41:00+08:00 New Revision: 85614e160ba569d719452ec80b842a0edc5ab930 URL: https://github.com/llvm/llvm-project/commit/85614e160ba569d719452ec80b842a0edc5ab930 DIFF: https://github.com/llvm/llvm-project/commit/85614e160ba569d719452ec80b842a0edc5ab930.diff LOG:

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

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-webassembly Author: Steven Perron (s-perron) Changes We add the hlsl_device address space to represent the device memory space as defined in section 1.7.1.3 of the [HLSL spec](https://microsoft.github.io/hlsl-specs/specs/hlsl.pdf). Fixes https:/

[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] [OpenACC][CIR] Implement 'device_type' clause lowering for 'init'/'sh… (PR #135102)

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

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -585,15 +585,16 @@ class CIRGenFunction : public CIRGenTypeCache { private: template mlir::LogicalResult - emitOpenACCOp(mlir::Location start, + emitOpenACCOp(OpenACCDirectiveKind dirKind, SourceLocation dirLoc, +mlir::Location start,

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -57,31 +75,90 @@ class OpenACCClauseCIREmitter final } } + mlir::acc::DeviceType decodeDeviceType(const IdentifierInfo *II) { andykaylor wrote: ```suggestion mlir::acc::DeviceType decodeDeviceType(const IdentifierInfo *ii) { ``` I don't think we m

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -57,31 +75,90 @@ class OpenACCClauseCIREmitter final } } + mlir::acc::DeviceType decodeDeviceType(const IdentifierInfo *II) { + +// '*' case leaves no identifier-info, just a nullptr. +if (!II) + return mlir::acc::DeviceType::Star; +return llvm::Stri

[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] [OpenACC][CIR] Implement 'device_type' clause lowering for 'init'/'sh… (PR #135102)

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -57,31 +75,90 @@ class OpenACCClauseCIREmitter final } } + mlir::acc::DeviceType decodeDeviceType(const IdentifierInfo *II) { + +// '*' case leaves no identifier-info, just a nullptr. +if (!II) + return mlir::acc::DeviceType::Star; +return llvm::Stri

[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 edited https://github.com/llvm/llvm-project/pull/134709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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
@@ -325,6 +325,9 @@ Improvements to Clang's diagnostics - Now correctly diagnose a tentative definition of an array with static storage duration in pedantic mode in C. (#GH50661) +- The ``-err-musttail-mismatch`` error is emitted when a musttail call is made to a function m

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-10 Thread Amr Hesham via cfe-commits
@@ -390,6 +391,148 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { llvm_unreachable("Unknown unary operator kind!"); } +/// If the specified expr is a simple decay from an array to pointer, +/// return the array subexpression. +/// FIXME: this could be

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

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

[clang] [clang][ast]: Add DynamicAllocLValue and TypeInfoLValue support to APValue::dump(). (PR #135178)

2025-04-10 Thread via cfe-commits
https://github.com/YLChenZ created https://github.com/llvm/llvm-project/pull/135178 Closes #134996. The crash about `TypeInfoLValue` is https://godbolt.org/z/73WY31s55. The crash about `DynamicAllocLValue` I don't know how to reproduce it yet. Before the patch: ``` .. `-VarDecl 0x118857f0

[clang] Mark CXX module initializer with PACBTI attributes (PR #133716)

2025-04-10 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,72 @@ +// RUN: %clang_cc1 -triple thumbv8.1m.main-unknown-none-eabi -emit-module-interface -target-feature +pacbti -mbranch-target-enforce -std=c++20 %s -o %t.pcm efriedma-quic wrote: I don't think we need all the combinations here in RUN lines; we v

[clang] [llvm] [fatlto] Add coroutine passes when using FatLTO with ThinLTO (PR #134434)

2025-04-10 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#134711 https://github.com/llvm/llvm-project/pull/134434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] give dummy path when create ClangTidyContext (PR #134670)

2025-04-10 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. This should work, thanks! I still feel the whole framework needs a bit of refactoring, the logic and data flow is a bit hidden and it's hard to spot these dependencies that break because things are done in the wrong order. https://gi

[clang] 9102ccd - [CXX Safe Buffer] Update the documentation for unsafe_buffer_usage attribute (#135087)

2025-04-10 Thread via cfe-commits
Author: Malavika Samak Date: 2025-04-10T11:00:02-07:00 New Revision: 9102ccd2f7025dff6b858b813d089bec152365ba URL: https://github.com/llvm/llvm-project/commit/9102ccd2f7025dff6b858b813d089bec152365ba DIFF: https://github.com/llvm/llvm-project/commit/9102ccd2f7025dff6b858b813d089bec152365ba.diff

[clang] [CXX Safe Buffer] Update the documentation for unsafe_buffer_usage attribute (PR #135087)

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

[clang] 954ccee - [clang] fix partial ordering of NTTP packs (#134461)

2025-04-10 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-04-07T12:30:51-03:00 New Revision: 954ccee5d53032f1cdea23368e11922edc20615d URL: https://github.com/llvm/llvm-project/commit/954ccee5d53032f1cdea23368e11922edc20615d DIFF: https://github.com/llvm/llvm-project/commit/954ccee5d53032f1cdea23368e11922edc20615d.dif

[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 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][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
AaronBallman wrote: > @AaronBallman @erichkeane Thank you for your comments. There's a question > here about whether to report an error or a warning here, and you're in a > divided opinion. My opinion is that it is better to use the error report > here. Because these are two mutually exclusive

[clang] [Clang] [NFC] Tablegen component diags headers (PR #134777)

2025-04-10 Thread Erich Keane via cfe-commits
@@ -1562,6 +1563,60 @@ void clang::EmitClangDiagsCompatIDs(const llvm::RecordKeeper &Records, OS << "DIAG_COMPAT_IDS_END()\n"; } +/// ClangDiagsIntefaceEmitter - Emit the diagnostics interface header for +/// a Clang component. +void clang::EmitClangDiagsInterface(llvm::r

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -57,31 +75,90 @@ class OpenACCClauseCIREmitter final } } + mlir::acc::DeviceType decodeDeviceType(const IdentifierInfo *II) { + +// '*' case leaves no identifier-info, just a nullptr. +if (!II) + return mlir::acc::DeviceType::Star; +return llvm::Stri

[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 769344277c6a870b149467fedbe6bcd668c83e95 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] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/134536 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 Subject: [PATCH 1/7] [CIR] Upstream ArraySubscriptExpr for fixed size array -

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/134536 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 Subject: [PATCH 1/7] [CIR] Upstream ArraySubscriptExpr for fixed size array -

[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 81c31fcdee28482ceea703064b0103eccb2a93ad 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] [CIR] Upstream support for cir.get_global (PR #135095)

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -200,6 +200,105 @@ void CIRGenModule::emitGlobalFunctionDefinition(clang::GlobalDecl gd, } } +mlir::Operation *CIRGenModule::getGlobalValue(StringRef name) { + mlir::Operation *global = mlir::SymbolTable::lookupSymbolIn(theModule, name); + if (!global) +return null

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -200,6 +200,105 @@ void CIRGenModule::emitGlobalFunctionDefinition(clang::GlobalDecl gd, } } +mlir::Operation *CIRGenModule::getGlobalValue(StringRef name) { + mlir::Operation *global = mlir::SymbolTable::lookupSymbolIn(theModule, name); + if (!global)

[clang] 3954d25 - [clang] Improved canonicalization for template specialization types (#135119)

2025-04-10 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-04-10T14:23:02-03:00 New Revision: 3954d258a5d20c418718bb2f655665e02e6a7475 URL: https://github.com/llvm/llvm-project/commit/3954d258a5d20c418718bb2f655665e02e6a7475 DIFF: https://github.com/llvm/llvm-project/commit/3954d258a5d20c418718bb2f655665e02e6a7475.dif

[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 closed 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] implement printing of canonical template arguments of expression kind (PR #135133)

2025-04-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/135133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][clang][llvm] Add structured sparsity outer product (TMOP) intrinsics (PR #135145)

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

[clang] [llvm] [AArch64][clang][llvm] Add structured sparsity outer product (TMOP) intrinsics (PR #135145)

2025-04-10 Thread via cfe-commits
https://github.com/CarolineConcatto commented: Thank you Jonathan, I left some comments, let me know if something is not clear. https://github.com/llvm/llvm-project/pull/135145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [llvm] [AArch64][clang][llvm] Add structured sparsity outer product (TMOP) intrinsics (PR #135145)

2025-04-10 Thread via cfe-commits
@@ -0,0 +1,112 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py + +// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme-tmop -target-feature +sme-f16f16 -target-feature +sme-b16b16

[clang] [llvm] [AArch64][clang][llvm] Add structured sparsity outer product (TMOP) intrinsics (PR #135145)

2025-04-10 Thread via cfe-commits
@@ -0,0 +1,176 @@ +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2 -target-feature +bf16 -target-feature +sme-f16f16 -target-feature +sme-b16b16 -verify -emit-llvm -o - %s + +// REQUIRES: aarch64-registered-target + +#include + +void test_features(

[clang] [llvm] [AArch64][clang][llvm] Add structured sparsity outer product (TMOP) intrinsics (PR #135145)

2025-04-10 Thread via cfe-commits
@@ -0,0 +1,176 @@ +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2 -target-feature +bf16 -target-feature +sme-f16f16 -target-feature +sme-b16b16 -verify -emit-llvm -o - %s + +// REQUIRES: aarch64-registered-target + +#include + +void test_features(

[clang] [llvm] [AArch64][clang][llvm] Add structured sparsity outer product (TMOP) intrinsics (PR #135145)

2025-04-10 Thread via cfe-commits
@@ -3593,6 +3578,25 @@ class sme_tmopa_32b opc, RegisterOperand zn_ty, RegisterOperand zm_ty, s let Constraints = "$ZAda = $_ZAda"; } +multiclass sme_tmopa_16b opc, RegisterOperand zn_ty, RegisterOperand zm_ty, ValueType vt, string mnemonic, string intrinsic> { + def NAME

[clang] [clang] fix partial ordering of NTTP packs (PR #134461)

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

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-04-10 Thread Damian Andrei via cfe-commits
@@ -52,6 +54,7 @@ typedef struct { * to `std::string::c_str()`. */ CINDEX_LINKAGE const char *clang_getCString(CXString string); +CINDEX_LINKAGE const char *clang_getCString2(CXString string, size_t *length); xTachyon wrote: I tried to find a macro that wrap

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

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. I don't think I have anything to add to the existing feedback. https://github.com/llvm/llvm-project/pull/133030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/134536 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 Subject: [PATCH 1/8] [CIR] Upstream ArraySubscriptExpr for fixed size array -

[libclc] libclc: frexp: fix implementation regarding denormals (PR #134823)

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

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

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

[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 ready_for_review https://github.com/llvm/llvm-project/pull/127675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-10 Thread Eli Friedman via cfe-commits
Jan =?utf-8?q?Górski?= , Jan =?utf-8?q?Górski?= , Jan =?utf-8?q?Górski?= , Jan =?utf-8?q?Górski?= , Jan =?utf-8?q?Górski?= Message-ID: In-Reply-To: efriedma-quic wrote: I don't really understand what the new version of the patch is doing... instcombine can infer `nuw` on `trunc` if the operan

[clang] [clang][ast]: Add DynamicAllocLValue and TypeInfoLValue support to APValue::dump(). (PR #135178)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (YLChenZ) Changes Closes #134996. The crash about `TypeInfoLValue` is https://godbolt.org/z/73WY31s55. The crash about `DynamicAllocLValue` I don't know how to reproduce it yet. Before the patch: ``` .. `-VarDecl 0x118857f0 <

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

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 h,cpp -- clang/lib/CIR/CodeGen/CIRGenBuilder.cpp clang/incl

[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] [NFC][analyzer] Document configuration options (PR #135169)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Donát Nagy (NagyDonat) Changes This commit documents the process of specifying values for the analyzer options and checker options implemented in the static analyzer, and adds a script which includes the documentation of the analyzer opti

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

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

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

2025-04-10 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM for the code. Tests could use a bit more polishing. https://github.com/llvm/llvm-project/pull/134416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

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

2025-04-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/135102 >From e7ee7372e9e5df14b6aa893005e842eaa2ae49ff Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 9 Apr 2025 16:35:06 -0700 Subject: [PATCH 1/2] [OpenACC][CIR] Implement 'device_type' clause lowering for '

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

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

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

2025-04-10 Thread Erich Keane via cfe-commits
@@ -57,31 +75,90 @@ class OpenACCClauseCIREmitter final } } + mlir::acc::DeviceType decodeDeviceType(const IdentifierInfo *II) { + erichkeane wrote: I'm not sure there is a style guidance here. But I'll remove it as it is probably wrong. https://git

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

2025-04-10 Thread Erich Keane via cfe-commits
@@ -57,31 +75,90 @@ class OpenACCClauseCIREmitter final } } + mlir::acc::DeviceType decodeDeviceType(const IdentifierInfo *II) { + +// '*' case leaves no identifier-info, just a nullptr. +if (!II) + return mlir::acc::DeviceType::Star; +return llvm::Stri

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

2025-04-10 Thread Erich Keane via cfe-commits
@@ -57,31 +75,90 @@ class OpenACCClauseCIREmitter final } } + mlir::acc::DeviceType decodeDeviceType(const IdentifierInfo *II) { + +// '*' case leaves no identifier-info, just a nullptr. +if (!II) + return mlir::acc::DeviceType::Star; +return llvm::Stri

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

2025-04-10 Thread Erich Keane via cfe-commits
@@ -57,31 +75,90 @@ class OpenACCClauseCIREmitter final } } + mlir::acc::DeviceType decodeDeviceType(const IdentifierInfo *II) { + +// '*' case leaves no identifier-info, just a nullptr. +if (!II) + return mlir::acc::DeviceType::Star; +return llvm::Stri

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

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

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

2025-04-10 Thread Artem Belevich via cfe-commits
@@ -39,186 +39,201 @@ #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Utils/Local.h" -#include #define NVVM_REFLECT_FUNCTION "__nvvm_reflect" #define NVVM_REFLECT_OCL_FUNCTION "__nvvm_reflect_ocl" +// Argument

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

2025-04-10 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,26 @@ +; Verify that when passing in command-line options to NVVMReflect, that reflect calls are replaced with Artem-B wrote: The test is functionally fine, but it also makes me stop and think "what exactly are we doing here and why?". Two points: -

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

2025-04-10 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,26 @@ +; Verify that when passing in command-line options to NVVMReflect, that reflect calls are replaced with +; the appropriate command line values. + +declare i32 @__nvvm_reflect(ptr) +@ftz = private unnamed_addr addrspace(1) constant [11 x i8] c"__CUDA_FTZ\00" +@ar

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -57,31 +75,90 @@ class OpenACCClauseCIREmitter final } } + mlir::acc::DeviceType decodeDeviceType(const IdentifierInfo *II) { + +// '*' case leaves no identifier-info, just a nullptr. +if (!II) + return mlir::acc::DeviceType::Star; +return llvm::Stri

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -57,31 +75,90 @@ class OpenACCClauseCIREmitter final } } + mlir::acc::DeviceType decodeDeviceType(const IdentifierInfo *II) { + andykaylor wrote: I've been telling people not to put a blank line here because it seemed inconsistent with the prevaili

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

2025-04-10 Thread Deric C. via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/131070 >From 81196e016dbf1209637dd13315efff7eac461d42 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Fri, 14 Mar 2025 00:24:26 + Subject: [PATCH 01/10] Implement ResMayNotAlias DXIL shader flag analysis --- cla

[clang] [clang-tools-extra] [clang] implement printing of canonical template arguments of expression kind (PR #135133)

2025-04-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/135133 >From e5422e4b48b64e695f5ae8c7502370db1be84d50 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Thu, 10 Apr 2025 02:52:36 -0300 Subject: [PATCH] [clang] implement printing of canonical template arguments of

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

2025-04-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/135218 In the 'single-file-parse' mode, seeing `#include UNDEFINED_IDENTIFIER` should not be treated as an error. The identifier might be defined in a header that we decided to skip, resulting in a nonsensical di

[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] [clang][index] Skip over `#include UNDEF_IDENT` in single-file-parse mode (PR #135218)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes In the 'single-file-parse' mode, seeing `#include UNDEFINED_IDENTIFIER` should not be treated as an error. The identifier might be defined in a header that we decided to skip, resulting in a nonsensical

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

2025-04-10 Thread Paul Walker 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] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-10 Thread Paul Walker 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] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

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

[clang] [clang][analyzer] Fix a possible crash in CastSizeChecker (PR #134387)

2025-04-10 Thread Balázs Kéri via cfe-commits
https://github.com/balazske closed https://github.com/llvm/llvm-project/pull/134387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add support for template as type parameter (PR #127654)

2025-04-10 Thread via cfe-commits
ykhatav wrote: Closing due to lack of downstream support. https://github.com/llvm/llvm-project/pull/127654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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] [llvm][Stmt]: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
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/134465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add support for template as type parameter (PR #127654)

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

[clang] Mark CXX module initializer with PACBTI attributes (PR #133716)

2025-04-10 Thread Eli Friedman via cfe-commits
@@ -447,6 +447,8 @@ llvm::Function *CodeGenModule::CreateGlobalInitOrCleanUpFunction( if (Linkage == llvm::GlobalVariable::InternalLinkage) SetInternalFunctionAttributes(GlobalDecl(), Fn, FI); + else +getTargetCodeGenInfo().setTargetAttributes(nullptr, Fn, *this);

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/134536 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 Subject: [PATCH 1/8] [CIR] Upstream ArraySubscriptExpr for fixed size array -

[clang] [llvm] [AArch64][clang][llvm] Add structured sparsity outer product (TMOP) intrinsics (PR #135145)

2025-04-10 Thread via cfe-commits
@@ -907,6 +907,48 @@ let SMETargetGuard = "sme-f16f16" in { } + +// SME2 - TMOP, SUTMOP, USTMOP + +multiclass USTMOP checks> { + def _ : SInst<"svtmopa_lane_" # za # "[_{d}_{3}]", +

[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

2025-04-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/113368 >From 114455c05ea84fc47fd22a34490d388ba8d5ddc6 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 16 Oct 2024 14:48:25 -0700 Subject: [PATCH] [libunwind][AArch64] Protect PC within libunwind's conte

[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 David Green 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] Initialize member variable; NFC (PR #135167)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes This was found via a Coverity static analysis pass. There's no indication this was being used incorrectly in practice, but there are public interfaces which require `BR` to be non-null and valid, and `

[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 created https://github.com/llvm/llvm-project/pull/135125 fixes #135122 SemaExpr.cpp - Make all doubles fail. Add sema support for float scalars and vectors when language mode is HLSL. CGExprScalar.cpp - Allow emit frem when language mode is HLSL. >From cb40adc19bf48

[clang] [clang-format] Keep the space between `not` and a unary operator (PR #135035)

2025-04-10 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/135035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC][CIR] Implement 'data' construct lowering (PR #135038)

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

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-04-10 Thread via cfe-commits
@@ -6011,10 +6011,27 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, } } + // These will be emitted as Intrinsic later. + auto NeedsDeviceOverload = [&](unsigned BuiltinID) { +if (getTarget().getTriple().isAMDGCN()) { + switc

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

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

[clang] [Clang] add ext warning for missing return in 'main' for C89 mode (PR #134617)

2025-04-10 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/134617 >From 64210203803f7ba9deec06d467ee570bff761108 Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Sun, 6 Apr 2025 00:17:38 +0300 Subject: [PATCH] [Clang] add ext warning for missing return in 'main' for

[clang] 3086546 - [Clang][NFC] Move some static functions into CodeGenFunction (#134634)

2025-04-10 Thread Orlando Cazalet-Hyams via cfe-commits
Author: Orlando Cazalet-Hyams Date: 2025-04-08T08:44:10+01:00 New Revision: 308654608cb8bc5bbd5d4b3779cb7d92920dd6b7 URL: https://github.com/llvm/llvm-project/commit/308654608cb8bc5bbd5d4b3779cb7d92920dd6b7 DIFF: https://github.com/llvm/llvm-project/commit/308654608cb8bc5bbd5d4b3779cb7d92920dd6

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

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

[clang] [llvm][Stmt]: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
@@ -717,6 +717,14 @@ bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) { return false; } + if (const FunctionDecl *CalleeDecl = CE->getDirectCallee()) { +if (CalleeDecl->hasAttr()) { + Diag(St->getBeginLoc(), diag::err_musttail_conflicts_with_not_

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

2025-04-10 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: The change itself makes sense to me. But AFAIK this is a workaround for misconfigured Xcode projects, so I suggest we carry this patch downstream (and possibly only in the current release branch while working to fix the build system or projects in the next release). https:

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

2025-04-10 Thread Sirui Mu via cfe-commits
@@ -0,0 +1,34 @@ +//==-- CIRGenFunctionInfo.h - Representation of fn argument/return types ---==// +// +// 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][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-04-10 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/130473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   7   8   >