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

2025-02-27 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 edited https://github.com/llvm/llvm-project/pull/115052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][AMDGPU] Use 32-bit index for SWMMAC builtins (PR #129101)

2025-02-27 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/129101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-27 Thread Ellis Hoag via cfe-commits
@@ -1617,6 +1617,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, } } + if (Sanitize.needsMemProfRt()) +if (hasExportSymbolDirective(Args)) + addExportedSymbol(CmdArgs, "___memprof_default_options_str"); ellishg wrote: @tere

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_or +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_and + + +bool t

[clang] [clang-tools-extra] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-27 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA edited https://github.com/llvm/llvm-project/pull/128437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream global variable linkage types (PR #129072)

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

[clang] [clang] Add #pragma clang __debug module_lookup (PR #129158)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Michael Spencer (Bigcheese) Changes This can be used to trigger implicit module map lookup without also importing the module. This can be useful for debugging as it avoids loading the module map from the AST file, which has slight

[clang] [clang] Add #pragma clang __debug module_lookup (PR #129158)

2025-02-27 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/129158 This can be used to trigger implicit module map lookup without also importing the module. This can be useful for debugging as it avoids loading the module map from the AST file, which has slightly different s

[clang] [flang] [flang][RISCV] Add target-abi ModuleFlag. (PR #126188)

2025-02-27 Thread Kelvin Li via cfe-commits
@@ -464,6 +464,7 @@ static void parseTargetArgs(TargetOptions &opts, llvm::opt::ArgList &args) { if (const llvm::opt::Arg *a = args.getLastArg(clang::driver::options::OPT_mabi_EQ)) { +opts.abi = a->getValue(); llvm::StringRef V = a->getValue(); if (V

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-27 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam deleted https://github.com/llvm/llvm-project/pull/127113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
@@ -117,6 +117,24 @@ static void printOmittedTerminatorRegion(mlir::OpAsmPrinter &printer, /*printBlockTerminators=*/!omitRegionTerm(region)); } +//===--===// +// AllocaOp +//===

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi commented: Most of the things I would have commented were already mentioned by someone else. Just a couple small additional items. https://github.com/llvm/llvm-project/pull/129072 ___ cfe-commits mailing list cfe-commit

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread David Olsen via cfe-commits
@@ -2,100 +2,100 @@ // RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - | FileCheck %s char c; -// CHECK: cir.global @c : !cir.int +// CHECK: cir.global external @c : !cir.int signed char sc; -// CHECK: cir.global @sc : !cir.int +//

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread David Olsen via cfe-commits
@@ -0,0 +1,63 @@ +//===- CIROpInterfaces.td - CIR Op Interface Definitions *- C++ -*-===// +// +// 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] Treat constexpr-unknown value as invalid in `EvaluateAsInitializer` (PR #128409)

2025-02-27 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/128409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/129020 >From 92861b903905d4f3d2fa39772033282b2dbad758 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Thu, 27 Feb 2025 03:09:45 + Subject: [PATCH 1/3] [WebAssembly] Generate __clang_call_terminate for Emscripten E

[clang] [HLSL] error on out of bounds vector accesses (PR #128952)

2025-02-27 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/128952 >From 656d6e87466bfc85246f7abaedfe6549e566717b Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 26 Feb 2025 14:37:06 -0800 Subject: [PATCH 1/4] error on out of bounds vector accesses --- .../clang/Basic/Dia

[clang] [HLSL] error on out of bounds vector accesses (PR #128952)

2025-02-27 Thread Sarah Spall via cfe-commits
@@ -14017,6 +14017,24 @@ void Sema::CheckCastAlign(Expr *Op, QualType T, SourceRange TRange) { << TRange << Op->getSourceRange(); } +void Sema::CheckVectorAccess(const Expr *BaseExpr, const Expr *IndexExpr) { + const VectorType *VTy = BaseExpr->getType()->getAs(); + if

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread Derek Schuff via cfe-commits
https://github.com/dschuff approved this pull request. https://github.com/llvm/llvm-project/pull/129020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread Heejin Ahn via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -fexceptions -fcxx-exceptions -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s aheejin wrote: We don't do anything differently wrt EH depending on whether it is `unknown` or `emscripten` tripl

[clang] [Feat] Allow Finding across only parts of an AST. (PR #127423)

2025-02-27 Thread via cfe-commits
matts1 wrote: It's a general performance optimization. For example, you could write a predicate to check whether it's in the std namespace to avoid checking the standard library, or a predicate to check whether a class is a subclass of `proto.Message` to skip generated protobuf code. https://

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

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,82 @@ +//===--===// +// +// 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: Apac

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/128979 >From 08e191213d3abfc6a5f2af7ba3db35055dd040eb Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Wed, 26 Feb 2025 16:23:01 -0800 Subject: [PATCH 01/11] Format hlsl_intrinsics.h with clang-format ---

[clang] [clang-tools-extra] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-27 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA updated https://github.com/llvm/llvm-project/pull/128437 >From 319ad0b803b8c6c6c5405178335bd1f2258be4b8 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Sun, 23 Feb 2025 12:08:02 + Subject: [PATCH 1/7] first implementation and basic tests --- .../Mod

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-02-27 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello created https://github.com/llvm/llvm-project/pull/129142 Adds support for emitting Windows x64 Unwind V2 information, includes support `/d2epilogunwind` in clang-cl. Unwind v2 adds information about the epilogs in functions such that the unwinder can unwind even

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-02-27 Thread Craig Topper via cfe-commits
@@ -0,0 +1,1050 @@ +//===-- RISCVInstrInfoP.td - RISC-V 'P' instructions ---*- tablegen -*-===// +// +// 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: A

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Daniel Paoliello (dpaoliello) Changes Adds support for emitting Windows x64 Unwind V2 information, includes support `/d2epilogunwind` in clang-cl. Unwind v2 adds information about the epilogs in functions such that the unwinder can

[clang] [CUDA][HIP] fix virtual dtor host/device attr (PR #128926)

2025-02-27 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > Would it make sense to separate into separate patches deferred diag fix > (1a/1b on your list) from inference of destructor attributes? > > Deferred diags fix is straightforward, but destructor attribute inference may > need a longer discussion. split the deferred diag chang

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Paoliello (dpaoliello) Changes Adds support for emitting Windows x64 Unwind V2 information, includes support `/d2epilogunwind` in clang-cl. Unwind v2 adds information about the epilogs in functions such that the unwinder can unwin

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: %clang_cc1 -finclude-default-header -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s \ +// RUN: -emit-llvm -O1 -o - | FileCheck %s farzonl wrote: I suppose you are doing O1 because you want to see short circuiting optimizations?

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-27 Thread Alexey Bataev via cfe-commits
@@ -2882,6 +2882,13 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( /*ReadDirectiveWithinMetadirective=*/true); break; } +// If no match is found and no otherwise clause is present, skip +// OMP5.2 Chapter 7.4: If no otherwise cla

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-27 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/127113 >From 1995b54afcc9fab93e7e80d3993d3396f193b31d Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Thu, 13 Feb 2025 11:24:32 -0800 Subject: [PATCH 1/5] [OpenMP] Missing implicit otherwise clause in metadi

[clang] [llvm] [Clang][AMDGPU] Use 32-bit index for SWMMAC builtins (PR #129101)

2025-02-27 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/129101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Feat] Allow Finding across only parts of an AST. (PR #127423)

2025-02-27 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Is there a particular reason to have this be a generic predicate rather than just a bool of if other modules should be visited? I can see how you could do other things with it like skipping a namespace or something, but I'm not sure if the other use cases would actually see us

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-27 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/127113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-27 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: @alexey-bataev Thanks for the reviews. https://github.com/llvm/llvm-project/pull/127113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (PR #129113)

2025-02-27 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/129113 >From b274bb5ef53ffc13093a5d454295cba21640dc4e Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Thu, 27 Feb 2025 11:54:41 -0800 Subject: [PATCH] [Clang][Docs][NFC] Correct documentation for the CPATH envi

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

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

[clang] [clang] Alias cc modifier to c (PR #127719)

2025-02-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/6897 Here is the releva

[clang] [HLSL] Fix resrouce wrapper declaration (PR #129100)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Steven Perron (s-perron) Changes The resource wrapper should have internal linkage because it contains a handle to the global resource, and it not the actual global. Makeing this changed exposed that we were zeroinitializing the re

[clang] [HLSL] Fix resrouce wrapper declaration (PR #129100)

2025-02-27 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/129100 The resource wrapper should have internal linkage because it contains a handle to the global resource, and it not the actual global. Makeing this changed exposed that we were zeroinitializing the resouce, which

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/129116 Fix structured binding shadows template parameter location Fixes: #129060 >From ed0cf3f026e439288f8334f27555ad26825fd56a Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 27 Feb 2025 21:49:32 +0100 S

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes Fix structured binding shadows template parameter location Fixes: #129060 --- Full diff: https://github.com/llvm/llvm-project/pull/129116.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaDeclCXX.

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-27 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: @shafik I added the sample to our test cases, not sure if we can add source loc in expected line, I will check that https://github.com/llvm/llvm-project/pull/129116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [llvm] [Clang][LLVM] Implement single-multi vectors MOP4{A/S} (PR #128854)

2025-02-27 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray edited https://github.com/llvm/llvm-project/pull/128854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] check dtor in deferred diag (PR #129117)

2025-02-27 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/129117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][LLVM] Implement single-multi vectors MOP4{A/S} (PR #128854)

2025-02-27 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray edited https://github.com/llvm/llvm-project/pull/128854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-27 Thread Zahira Ammarguellat via cfe-commits
@@ -2882,6 +2882,13 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( /*ReadDirectiveWithinMetadirective=*/true); break; } +// If no match is found and no otherwise clause is present, skip +// OMP5.2 Chapter 7.4: If no otherwise cla

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Andy Kaylor via cfe-commits
@@ -210,6 +223,193 @@ void CIRGenModule::emitGlobalDefinition(clang::GlobalDecl gd, llvm_unreachable("Invalid argument to CIRGenModule::emitGlobalDefinition"); } +static bool shouldBeInCOMDAT(CIRGenModule &cgm, const Decl &d) { + assert(!cir::MissingFeatures::supportComdat

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-27 Thread Zahira Ammarguellat via cfe-commits
@@ -2882,6 +2882,13 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( /*ReadDirectiveWithinMetadirective=*/true); break; } +// If no match is found and no otherwise clause is present, skip +// OMP5.2 Chapter 7.4: If no otherwise cla

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-27 Thread Eli Friedman via cfe-commits
@@ -5451,10 +5451,23 @@ bool Sema::SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors, NumInitializers * sizeof(CXXCtorInitializer*)); Constructor->setCtorInitializers(baseOrMemberInitializers); +SourceLocation Location = Constructor->getLo

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-27 Thread Alexey Bataev via cfe-commits
@@ -2882,6 +2882,13 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( /*ReadDirectiveWithinMetadirective=*/true); break; } +// If no match is found and no otherwise clause is present, skip +// OMP5.2 Chapter 7.4: If no otherwise cla

[clang] d2e6662 - [clang][deps] Propagate the entire service (#128959)

2025-02-27 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-02-27T10:06:26-08:00 New Revision: d2e66625bcdc09953c007cf1e9f80d38a18719f3 URL: https://github.com/llvm/llvm-project/commit/d2e66625bcdc09953c007cf1e9f80d38a18719f3 DIFF: https://github.com/llvm/llvm-project/commit/d2e66625bcdc09953c007cf1e9f80d38a18719f3.diff L

[clang] [clang][deps] Propagate the entire service (PR #128959)

2025-02-27 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/128959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/128979 >From 08e191213d3abfc6a5f2af7ba3db35055dd040eb Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Wed, 26 Feb 2025 16:23:01 -0800 Subject: [PATCH 1/9] Format hlsl_intrinsics.h with clang-format ---

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-27 Thread Akira Hatanaka via cfe-commits
@@ -2249,6 +2249,53 @@ Value *ScalarExprEmitter::VisitInitListExpr(InitListExpr *E) { return V; } +static bool isDeclRefKnownNonNull(CodeGenFunction &CGF, const ValueDecl *D) { + return !D->isWeak(); +} + +static bool isLValueKnownNonNull(CodeGenFunction &CGF, const Expr *

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread Ashley Coleman via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_or +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_and + + +bool t

[clang] [Clang] use parameter location for abbreviated function templates (PR #129139)

2025-02-27 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/129139 Fixes #46386 --- When an abbreviated function template appears in an `extern "C"` block and all template parameters are invented, `TemplateParams->getTemplateLoc()` becomes invalid, leading to an incorrec

[clang] [Clang] use parameter location for abbreviated function templates (PR #129139)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #46386 --- When an abbreviated function template appears in an `extern "C"` block and all template parameters are invented, `TemplateParams->getTemplateLoc()` becomes invalid, leading to an incor

[clang] [llvm] [Clang][AMDGPU] Use 32-bit index for SWMMAC builtins (PR #129101)

2025-02-27 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/129101 >From daec69f37a9b10f4bcf258f3a6f9e45cee72b64d Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 27 Feb 2025 14:00:05 -0500 Subject: [PATCH] [AMDGPU] Use 32-bit index for SWMMAC builtins Currently, the ind

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/129020 >From 92861b903905d4f3d2fa39772033282b2dbad758 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Thu, 27 Feb 2025 03:09:45 + Subject: [PATCH 1/2] [WebAssembly] Generate __clang_call_terminate for Emscripten E

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread Heejin Ahn via cfe-commits
@@ -5150,9 +5150,14 @@ WebAssemblyCXXABI::emitTerminateForUnexpectedException(CodeGenFunction &CGF, // Itanium ABI calls __clang_call_terminate(), which __cxa_begin_catch() on // the violating exception to mark it handled, but it is currently hard to do // with wasm EH i

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: %clang_cc1 -finclude-default-header -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s \ +// RUN: -emit-llvm -O1 -o - | FileCheck %s metkarpoonam wrote: Test cases updated without any optimization https://github.com/llvm/llvm-proj

[clang] [WebAssembly] Make WASI -threads environment behave as -pthread (PR #129164)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: R (ArcaneNibble) Changes If the user specifies a target triple of wasm32-wasi-threads, then enable all of the same flags as if `-pthread` were passed. This helps prevent user error, as the whole point of selecting this target is to

[clang] [WebAssembly] Make WASI -threads environment behave as -pthread (PR #129164)

2025-02-27 Thread via cfe-commits
https://github.com/ArcaneNibble updated https://github.com/llvm/llvm-project/pull/129164 >From ddef6376dfde8b6a682abe31bd13a912706c757d Mon Sep 17 00:00:00 2001 From: R Date: Fri, 28 Feb 2025 00:45:16 + Subject: [PATCH] [WebAssembly] Make WASI -threads environment behave as -pthread If th

[clang] [WebAssembly] Make WASI -threads environment behave as -pthread (PR #129164)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: R (ArcaneNibble) Changes If the user specifies a target triple of wasm32-wasi-threads, then enable all of the same flags as if `-pthread` were passed. This helps prevent user error, as the whole point of selecting this target is to gain p

[clang] [WebAssembly] Make WASI -threads environment behave as -pthread (PR #129164)

2025-02-27 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 9a54c77aa361d0d1f98a39a89e3f543d15d182a5 b5988ff4fa2e5115e325020655fd570fd68eedd2 --e

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-02-27 Thread Craig Topper via cfe-commits
@@ -1,36 +1,1443 @@ # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-p -riscv-no-aliases -show-encoding \ # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-p < %s \ -# RUN: | llvm-o

[clang] [llvm] [Clang][LLVM] Implement single-multi vectors MOP4{A/S} (PR #128854)

2025-02-27 Thread Jonathan Thackray via cfe-commits
@@ -3064,6 +3064,76 @@ let TargetPrefix = "aarch64" in { def int_aarch64_sme_usmopa_wide : SME_OuterProduct_Intrinsic; def int_aarch64_sme_usmops_wide : SME_OuterProduct_Intrinsic; + class SME_OuterProduct_QuaterTile_Single + : DefaultAttrsIntrinsic<[], + [l

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/128979 >From 08e191213d3abfc6a5f2af7ba3db35055dd040eb Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Wed, 26 Feb 2025 16:23:01 -0800 Subject: [PATCH 01/12] Format hlsl_intrinsics.h with clang-format ---

[clang] [WebAssembly] Make WASI -threads environment behave as -pthread (PR #129164)

2025-02-27 Thread via cfe-commits
https://github.com/ArcaneNibble created https://github.com/llvm/llvm-project/pull/129164 If the user specifies a target triple of wasm32-wasi-threads, then enable all of the same flags as if `-pthread` were passed. This helps prevent user error, as the whole point of selecting this target is t

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-27 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/127137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-27 Thread Zahira Ammarguellat via cfe-commits
@@ -2882,6 +2882,13 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( /*ReadDirectiveWithinMetadirective=*/true); break; } +// If no match is found and no otherwise clause is present, skip +// OMP5.2 Chapter 7.4: If no otherwise cla

[clang] [clang] Alias cc modifier to c (PR #127719)

2025-02-27 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > > It seems like for gcc at least, IIUC, `cc` does a bit more than `c` so > > while we are supporting `cc` for compatibility we are not fully supporting > > it? Specifically: > > `except try harder to print it with no punctuation` > > Perhaps we should document that in the commen

[clang] [HLSL] Fix resrouce wrapper declaration (PR #129100)

2025-02-27 Thread Steven Perron via cfe-commits
s-perron wrote: I created a new PR to make the resource wrappers static. @hekota Was right. Not much needed to change in codegen. We were already initializing all global (internal or external) that have the resource binding attribute. I must have been testing the wrong examples when I said cod

[clang] [llvm] [AMDGPU] Use 32-bit index for SWMMAC builtins (PR #129101)

2025-02-27 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/129101 Currently, the index of SWMMAC builtins is of type `short`, likely based on the assumption that K can only be up to 32, meaning there are only 16 non-zero elements. However, this is not future-proof. This patch

[clang] [HLSL] Fix resrouce wrapper declaration (PR #129100)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Steven Perron (s-perron) Changes The resource wrapper should have internal linkage because it contains a handle to the global resource, and it not the actual global. Makeing this changed exposed that we were zeroinitializing the resouce, wh

[clang] [HLSL] Add HLSLResourceBindingAttr to default constant buffer numeric declarations ($Globals) (PR #128981)

2025-02-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/128981 >From 9faff902639aece87b72ed5235d71b8b68533074 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 26 Feb 2025 17:39:16 -0800 Subject: [PATCH 1/2] Add resource binding attribute on $Globals numeric constants

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl requested changes to this pull request. Sema and codgen test need to be update according to comments. https://github.com/llvm/llvm-project/pull/128979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [llvm] [AMDGPU] Use 32-bit index for SWMMAC builtins (PR #129101)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-amdgpu Author: Shilei Tian (shiltian) Changes Currently, the index of SWMMAC builtins is of type `short`, likely based on the assumption that K can only be up to 32, meaning there are only 16 non-zero elements. However,

[clang] [llvm] [AMDGPU] Use 32-bit index for SWMMAC builtins (PR #129101)

2025-02-27 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#129101** https://app.graphite.dev/github/pr/llvm/llvm-project/129101?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/129

[clang] [llvm] [memprof] Add memprof options as a clang frontend flag (PR #128615)

2025-02-27 Thread Ellis Hoag via cfe-commits
ellishg wrote: Moved to https://github.com/llvm/llvm-project/pull/128920 https://github.com/llvm/llvm-project/pull/128615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

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

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

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

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

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

[clang] da85b2a - [WebAssembly] Generate __clang_call_terminate for Emscripten EH (#129020)

2025-02-27 Thread via cfe-commits
Author: Heejin Ahn Date: 2025-02-27T16:23:18-08:00 New Revision: da85b2a86403fb4bf065a4463691914f444bc07a URL: https://github.com/llvm/llvm-project/commit/da85b2a86403fb4bf065a4463691914f444bc07a DIFF: https://github.com/llvm/llvm-project/commit/da85b2a86403fb4bf065a4463691914f444bc07a.diff LO

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/129020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Feat] Allow Finding across only parts of an AST. (PR #127423)

2025-02-27 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. I think this is good from the modules end and I get how the predicate can be useful. My only concern is that this feels a bit like another matcher that's not using the matcher API, so I'd like someone more familiar with it to also approv

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-02-27 Thread via cfe-commits
@@ -1,36 +1,1443 @@ # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-p -riscv-no-aliases -show-encoding \ # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-p < %s \ -# RUN: | llvm-o

[clang] [X86][AVX10.2] Add comments for the avx10_2convertintrin.h file (PR #120766)

2025-02-27 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/120766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

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

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread Ashley Coleman via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_or +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_and + + ---

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-27 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > @shafik I added the sample to our test cases, not sure if we can add source > loc in expected line, I will check that h/t @erichkeane something like this should help get us the confirmation in the test we want: https://github.com/llvm/llvm-project/pull/129116 https://github.co

[clang] [X86][AVX10.2] Add comments for the avx10_2convertintrin.h file (PR #120766)

2025-02-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/17026 Here is the relevant piece of the build lo

[clang] [CUDA][HIP] check dtor in deferred diag (PR #129117)

2025-02-27 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/129117 Currently the deferred diag fails to diagnose calling of host function in host device function in device compilation triggered by destructors. This can be further divided into two issuse: 1. the deferred diag

[clang] [Offload] Always consider `flto` on for AMDGPU (PR #129118)

2025-02-27 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/129118 Summary: Previously we turned this off, but that led to a regression in some of the option handling. I would argue that handling LTO by default was incorrect bheavior, but for AMDGPU people were used to this defa

[clang] [Offload] Always consider `flto` on for AMDGPU (PR #129118)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: Previously we turned this off, but that led to a regression in some of the option handling. I would argue that handling LTO by default was incorrect bheavior, but for AMDGPU people were used to this d

[clang] Disable unique-object-duplication warning in templates (PR #129120)

2025-02-27 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr created https://github.com/llvm/llvm-project/pull/129120 I've been trying to resolve instances of the unique-object-duplication warning in chromium code. Unfortunately, I've found that practically speaking, it's near-impossible to actually fix the problem when templa

[clang] Disable unique-object-duplication warning in templates (PR #129120)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Devon Loehr (DKLoehr) Changes I've been trying to resolve instances of the unique-object-duplication warning in chromium code. Unfortunately, I've found that practically speaking, it's near-impossible to actually fix the problem when temp

<    1   2   3   4   >