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

2025-04-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/134670 ___ 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-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 ready_for_review https://github.com/llvm/llvm-project/pull/134670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][doc]: Merge entries with duplicate content. (PR #134089)

2025-04-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! What do you think @erichkeane? https://github.com/llvm/llvm-project/pull/134089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [HLSL] Desugar ConstantArrayType when calculating cbuffer field layout (PR #134683)

2025-04-07 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/134683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

2025-04-07 Thread Finn Plummer via cfe-commits
@@ -89,37 +88,178 @@ bool RootSignatureParser::parseDescriptorTableClause() { CurToken.TokKind == TokenKind::kw_UAV || CurToken.TokKind == TokenKind::kw_Sampler) && "Expects to only be invoked starting at given keyword"); + TokenKind ParamKind = Cu

[clang] [Clang] Unify 'nvptx-arch' and 'amdgpu-arch' into 'offload-arch' (PR #134713)

2025-04-07 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/134713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Unify 'nvptx-arch' and 'amdgpu-arch' into 'offload-arch' (PR #134713)

2025-04-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/134713 >From e44db82f3abe7c1d23c2b49094c92a890127ffc7 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 7 Apr 2025 14:37:22 -0500 Subject: [PATCH 1/6] [Clang] Unify 'nvptx-arch' and 'amdgpu-arch' into 'offload-ar

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-07 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/134288 ___ 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-07 Thread Ashley Coleman 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: linkonce_odr noundef nofpclass(nan inf) <4 x float> @_ZN4hlsl8__detail8dst

[clang] [llvm] [DirectX] Use scalar arguments for @llvm.dx.dot intrinsics (PR #134570)

2025-04-07 Thread Farzon Lotfi via cfe-commits
@@ -185,8 +186,14 @@ static Value *expandFloatDotIntrinsic(CallInst *Orig, Value *A, Value *B) { /* gen_crash_diag=*/false); return nullptr; } - return Builder.CreateIntrinsic(ATy->getScalarType(), DotIntrinsic, - ArrayRef{A, B},

[clang] [Clang] Unify 'nvptx-arch' and 'amdgpu-arch' into 'offload-arch' (PR #134713)

2025-04-07 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,78 @@ +//===- OffloadArch.cpp - list available GPUs *- 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] [llvm] [HIP][HIPSTDPAR][NFC] Re-order & adapt `hipstdpar` specific passes (PR #134753)

2025-04-07 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: Needs test https://github.com/llvm/llvm-project/pull/134753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Unify 'nvptx-arch' and 'amdgpu-arch' into 'offload-arch' (PR #134713)

2025-04-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,78 @@ +//===- OffloadArch.cpp - list available GPUs *- 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-tools-extra] 15750a0 - [clang-tidy] Use --match-full-lines instead of --strict-whitespace in check_clang_tidy (#133756)

2025-04-07 Thread via cfe-commits
Author: Nicolas van Kempen Date: 2025-04-07T16:34:07-04:00 New Revision: 15750a0ab2356bea9544b70a72edce421060086e URL: https://github.com/llvm/llvm-project/commit/15750a0ab2356bea9544b70a72edce421060086e DIFF: https://github.com/llvm/llvm-project/commit/15750a0ab2356bea9544b70a72edce421060086e.

[clang] [CodeGen] Change placeholder from `undef` to `poison` (PR #134731)

2025-04-07 Thread Pedro Lobo via cfe-commits
https://github.com/pedroclobo created https://github.com/llvm/llvm-project/pull/134731 Fill default values of a map with `poison` instead of `undef`. There should be no functional difference as the default values are overridden later. >From de69ee35e12babf55f6a0212200431bf75340dc4 Mon Sep 17 0

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-04-07 Thread Jan Leyonberg via cfe-commits
https://github.com/jsjodin closed https://github.com/llvm/llvm-project/pull/133310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-07 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/113510 ___ 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-07 Thread via cfe-commits
https://github.com/metkarpoonam edited https://github.com/llvm/llvm-project/pull/133828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][doc]: Merge entries with duplicate content. (PR #134089)

2025-04-07 Thread Erich Keane via cfe-commits
erichkeane wrote: Yeah, LGTM. Thank you! https://github.com/llvm/llvm-project/pull/134089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][doc]: Merge entries with duplicate content. (PR #134089)

2025-04-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Ugh, the issue was on my end. I downloaded the changes, rebuilt the documentation... and skipped the step where I rebuild clang-tblgen. When I do things properly, it works (shocking, I know). https://github.com/llvm/llvm-project/pull/134089 _

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

2025-04-07 Thread Sirui Mu via cfe-commits
https://github.com/Lancern created https://github.com/llvm/llvm-project/pull/134673 This PR upstreams initial support for making function calls in CIR. Function arguments and return values are not included to keep the patch small for review. Related to #132487 >From 82f6ce93ca22dd778173100231

[clang] Move CodeGen cuda.h to Inputs from include (PR #134706)

2025-04-07 Thread via cfe-commits
github-actions[bot] wrote: @calewis Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

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

2025-04-07 Thread Andy Kaylor via cfe-commits
@@ -198,6 +198,19 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { return create(loc, cir::BinOpKind::Div, lhs, rhs); } + + /// Create a cir.ptr_stride operation to get access to an array element. + /// idx is the index of the element to access, shouldDecay is

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

2025-04-07 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] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-07 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/132237 >From 3aaaf3371215de0f214836da32f862518f223760 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 12 Mar 2025 21:26:36 -0700 Subject: [PATCH 1/2] [clang][DependencyScanning] Track dependencies from preb

[clang] [HLSL] Make it possible to assign an array from a cbuffer (PR #134174)

2025-04-07 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/134174 >From 5d81a4b7b034dd5999feb6ab37537270d6bae2a8 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 2 Apr 2025 12:04:18 -0700 Subject: [PATCH] compare unqualified canonical types and add an hlsl array rvalue cas

[clang] [HLSL] Make it possible to assign an array from a cbuffer (PR #134174)

2025-04-07 Thread Sarah Spall via cfe-commits
https://github.com/spall ready_for_review https://github.com/llvm/llvm-project/pull/134174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-07 Thread Deric C. via cfe-commits
@@ -280,6 +280,22 @@ constexpr bool4 isinf(double4 V) { return isinf((float4)V); } _DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp) _DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp) +//===--===// +// lit builtins overloa

[clang] [clang][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-07 Thread Cyndy Ishida via cfe-commits
@@ -6067,14 +6062,21 @@ llvm::Error ASTReader::ReadSubmoduleBlock(ModuleFile &F, if (OptionalFileEntryRef CurFile = CurrentModule->getASTFile()) { // Don't emit module relocation error if we have -fno-validate-pch if (!bool(PP.getPreprocessorOpts().D

[clang] [CodeGen] Change placeholder from `undef` to `poison` (PR #134731)

2025-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Pedro Lobo (pedroclobo) Changes Fill default values of a map with `poison` instead of `undef`. There should be no functional difference as the default values are overridden later. --- Full diff: https://github.com/llvm/llvm-project/pull/1

[clang] [CodeGen] Change placeholder from `undef` to `poison` (PR #134731)

2025-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Pedro Lobo (pedroclobo) Changes Fill default values of a map with `poison` instead of `undef`. There should be no functional difference as the default values are overridden later. --- Full diff: https://github.com/llvm/llvm-projec

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

2025-04-07 Thread Andy Kaylor via cfe-commits
@@ -232,6 +233,161 @@ 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] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-07 Thread Andy Kaylor via cfe-commits
@@ -232,6 +233,161 @@ 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] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-07 Thread Andy Kaylor via cfe-commits
@@ -232,6 +233,161 @@ 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] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-07 Thread Andy Kaylor via cfe-commits
@@ -157,6 +157,15 @@ class ScalarExprEmitter : public StmtVisitor { mlir::Value VisitCastExpr(CastExpr *e); + mlir::Value VisitArraySubscriptExpr(ArraySubscriptExpr *e) { +if (e->getBase()->getType()->isVectorType()) { + assert(!cir::MissingFeatures::scalableVect

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

2025-04-07 Thread Andy Kaylor via cfe-commits
@@ -232,6 +233,161 @@ 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] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-07 Thread Andy Kaylor via cfe-commits
@@ -198,6 +198,19 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { return create(loc, cir::BinOpKind::Div, lhs, rhs); } + + /// Create a cir.ptr_stride operation to get access to an array element. + /// idx is the index of the element to access, shouldDecay is

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

2025-04-07 Thread Andy Kaylor via cfe-commits
@@ -232,6 +233,161 @@ 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] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-07 Thread Andy Kaylor via cfe-commits
@@ -232,6 +233,161 @@ 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] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-07 Thread Andy Kaylor via cfe-commits
@@ -29,8 +29,15 @@ int f[5] = {1, 2}; void func() { int arr[10]; - // CHECK: %[[ARR:.*]] = cir.alloca !cir.array, !cir.ptr>, ["arr"] + + int e = arr[1]; andykaylor wrote: Can you add a test case for `arr[0]`? That's a special case in terms of resultin

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

2025-04-07 Thread Andy Kaylor via cfe-commits
@@ -232,6 +233,161 @@ 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] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-07 Thread Deric C. via cfe-commits
Icohedron wrote: In my opinion, we should just define `lit` without templates, thereby following Clang's overload resolution rules and allowing implicit vector truncation. Overload resolution and implicit vector truncation are behaviors that should be consistent across the language. To me, it

[clang] [OpenACC][CIR] Basic infrastructure for OpenACC lowering (PR #134717)

2025-04-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/134717 >From 0c0892e5142e2d0f687c091cb55ea14c97c975eb Mon Sep 17 00:00:00 2001 From: erichkeane Date: Mon, 7 Apr 2025 08:07:18 -0700 Subject: [PATCH 1/3] [OpenACC][CIR] Basic infrastructure for OpenACC lowering Thi

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-04-07 Thread Devon Loehr via cfe-commits
DKLoehr wrote: I ended up with the following reproducer: ``` template struct S { template using Arg = T::template Arg; void f(Arg); void f(Arg); }; ``` Running this with `clang++ repro.cc -fsyntax-only -std=c++20` yields ``` repro.cc:5:8: error: class member cannot be redeclared

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

2025-04-07 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,72 @@ +//===-- FileHelpersClangDoc.cpp - File Helpers ---*- C++-*-===// ilovepi wrote: Apparently, we don't use that line anymore. https://llvm.org/docs/CodingStandards.html#file-headers Was brought up here when I saw this the first

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

2025-04-07 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/134298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-07 Thread Daniel Thornburgh via cfe-commits
@@ -0,0 +1,72 @@ +//===-- FileHelpersClangDoc.cpp - File Helpers ---*- C++-*-===// mysterymath wrote: The filename in this comment should match the actual filename. https://github.com/llvm/llvm-project/pull/134298 ___

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

2025-04-07 Thread Deric C. via cfe-commits
@@ -280,6 +280,22 @@ constexpr bool4 isinf(double4 V) { return isinf((float4)V); } _DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp) _DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp) +//===--===// +// lit builtins overloa

[clang-tools-extra] [clang-tidy] Use --match-full-lines instead of --strict-whitespace in check_clang_tidy (PR #133756)

2025-04-07 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank closed https://github.com/llvm/llvm-project/pull/133756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Unify 'nvptx-arch' and 'amdgpu-arch' into 'offload-arch' (PR #134713)

2025-04-07 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,78 @@ +//===- OffloadArch.cpp - list available GPUs *- 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][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-07 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. LGTM, a minor non-blocking question. Thank you! https://github.com/llvm/llvm-project/pull/134475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

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

2025-04-07 Thread via cfe-commits
@@ -0,0 +1,75 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ metkarpoonam wrote: I aligned the expected error li

[clang] [clang][driver] Suppress gnu-line-marker when saving temps (PR #134621)

2025-04-07 Thread via cfe-commits
macurtis-amd wrote: > I am not sure clang driver should does this unusual suppression. > > You'd also get a warning with: `clang test.c -E -Wall -pedantic; clang test.i > -S -Wall -pedantic` > > There might be a different strategy to suppress this diagnostic? Did you have an alternative in mi

[clang] [OpenACC][CIR] Basic infrastructure for OpenACC lowering (PR #134717)

2025-04-07 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,h,c -- clang/lib/CIR/CodeGen/CIRGenOpenACCDecl.cpp clan

[clang] [OpenACC][CIR] Basic infrastructure for OpenACC lowering (PR #134717)

2025-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Erich Keane (erichkeane) Changes This is the first of a few patches that will do infrastructure work to enable the OpenACC lowering via the OpenACC dialect. At the moment this just gets the various function calls that will end up gener

[clang] [OpenACC][CIR] Basic infrastructure for OpenACC lowering (PR #134717)

2025-04-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/134717 This is the first of a few patches that will do infrastructure work to enable the OpenACC lowering via the OpenACC dialect. At the moment this just gets the various function calls that will end up generatin

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

2025-04-07 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/134617 ___ 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-07 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,6 @@ +/* RUN: %clang_cc1 -std=c89 -fsyntax-only -verify -pedantic -Wno-strict-prototypes %s a-tarasyuk wrote: @AaronBallman I've added additonal tests https://github.com/llvm/llvm-project/pull/134617 ___ cf

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

2025-04-07 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/134399 >From 3812b132c83e4a2e7ae9bd0b5ecefe7232f86af1 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 3 Apr 2025 09:08:44 -0700 Subject: [PATCH 1/4] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global

[clang] [Clang] Unify 'nvptx-arch' and 'amdgpu-arch' into 'offload-arch' (PR #134713)

2025-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-amdgpu Author: Joseph Huber (jhuber6) Changes Summary: These two tools do the same thing, we should unify them into a single tool. We create symlinks for backward compatiblity and provide a way to get the old vendor spe

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

2025-04-07 Thread Nick Sarnie via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) sarnex wr

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

2025-04-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/134536 ___ 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-07 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/133828 >From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Mon, 31 Mar 2025 16:49:18 -0700 Subject: [PATCH 01/12] Implement a dst function with test cases for HL

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

2025-04-07 Thread Nikita Popov via cfe-commits
nikic wrote: /cherry-pick 268c065eab06b81a0d7256ac62c0865b3781e236 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] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-07 Thread Nick Sarnie via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) sarnex wr

[clang] Move CodeGen cuda.h to Inputs from include (PR #134706)

2025-04-07 Thread Artem Belevich via cfe-commits
Artem-B wrote: Fixes test break introduced by #134459 https://github.com/llvm/llvm-project/pull/134706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Move CodeGen cuda.h to Inputs from include (PR #134706)

2025-04-07 Thread Pranav Kant via cfe-commits
https://github.com/pranavk closed https://github.com/llvm/llvm-project/pull/134706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Move CodeGen cuda.h to Inputs from include (PR #134706)

2025-04-07 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/134706 ___ 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-07 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/133828 >From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Mon, 31 Mar 2025 16:49:18 -0700 Subject: [PATCH 01/11] Implement a dst function with test cases for HL

[clang] [llvm] [Clang][NVVM] Support `-f[no-]cuda-prec-sqrt` and propagate precision flag to `NVVMReflect` (PR #134244)

2025-04-07 Thread Artem Belevich via cfe-commits
Artem-B wrote: @AlexMaclean who authored #89417 and possibly other NVIDIA folks may have some thoughts on this. In general, making it per-function attribute makes sense on LLVM level. We will also need to reconcile it with the https://github.com/llvm/llvm-project/blob/10bef367a5643bc41d0172b0

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

2025-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: CHANDRA GHALE (chandraghale) Changes Codegen support for reduction over private variable with reduction clause. Section 7.6.10 in in OpenMP 6.0 spec. - An internal shared copy is initialized with an initializer value. - The shared copy is

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

2025-04-07 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale created https://github.com/llvm/llvm-project/pull/134709 Codegen support for reduction over private variable with reduction clause. Section 7.6.10 in in OpenMP 6.0 spec. - An internal shared copy is initialized with an initializer value. - The shared copy is upda

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

2025-04-07 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] [HLSL] Include SPIRV in LLVM_TARGETS_TO_BUILD in the HLSL cmake cache (PR #133287)

2025-04-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64-aix` running on `aix-ppc64` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/2839 Here is the relevant piece of the build lo

[clang] Move CodeGen cuda.h to Inputs from include (PR #134706)

2025-04-07 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

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

2025-04-07 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] [HLSL] Desugar ConstantArrayType when calculating cbuffer field layout (PR #134683)

2025-04-07 Thread Eli Friedman via cfe-commits
@@ -195,7 +195,8 @@ bool HLSLBufferLayoutBuilder::layoutField(const FieldDecl *FD, // Unwrap array to find the element type and get combined array size. QualType Ty = FieldTy; while (Ty->isConstantArrayType()) { - const ConstantArrayType *ArrayTy = cast(Ty); +

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

2025-04-07 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] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-07 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > AFAICT that patch special-cased for framework directories while this one > disables much more. Is that not the case? Oh sorry I misspoke - it is not the case that skipping framework negative caching that fixed the problem. It is the _other_ case in `shouldCacheStatFailures`

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-07 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,45 @@ +; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s +; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s --check-prefix=DXC + +target triple = "dxil-pc-shadermodel6.7-library" + +;CHECK: ; Combined Shader Flags for Module +;CHECK-NEXT: ;

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

2025-04-07 Thread Kaitlin Peng via cfe-commits
kmpeng wrote: I currently don't have `-fnative-half-type` enabled in that file, so yes this test case ends up having `float` input/return types (though it's not necessarily being converted in the function, if that's what you're asking). With `-fnative-half-ty

[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

2025-04-07 Thread Finn Plummer via cfe-commits
@@ -89,37 +88,178 @@ bool RootSignatureParser::parseDescriptorTableClause() { CurToken.TokKind == TokenKind::kw_UAV || CurToken.TokKind == TokenKind::kw_Sampler) && "Expects to only be invoked starting at given keyword"); + TokenKind ParamKind = Cu

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-04-07 Thread Sam Elliott via cfe-commits
lenary wrote: ping? https://github.com/llvm/llvm-project/pull/132481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][NVVM] Support `-f[no-]cuda-prec-sqrt` and propagate precision flag to `NVVMReflect` (PR #134244)

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

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

2025-04-07 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -std=hlsl202y -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +double4 test_double_inputs(double p0, double p1, double p2) { + return lit(p0, p1, p2

[clang] [CIR] Add if statement support (PR #134333)

2025-04-07 Thread Andy Kaylor via cfe-commits
@@ -135,6 +135,55 @@ mlir::Location CIRGenFunction::getLoc(mlir::Location lhs, mlir::Location rhs) { return mlir::FusedLoc::get(locs, metadata, &getMLIRContext()); } +bool CIRGenFunction::ContainsLabel(const Stmt *s, bool ignoreCaseStmts) { + // Null statement, not a label

[clang] [clang][doc]: Merge entries with duplicate content. (PR #134089)

2025-04-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/134089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 529e912 - [clang][doc]: Merge entries with duplicate content. (#134089)

2025-04-07 Thread via cfe-commits
Author: YLChenZ Date: 2025-04-07T14:42:57-04:00 New Revision: 529e9127f0d61f177f2c62ade531d876cf89bf59 URL: https://github.com/llvm/llvm-project/commit/529e9127f0d61f177f2c62ade531d876cf89bf59 DIFF: https://github.com/llvm/llvm-project/commit/529e9127f0d61f177f2c62ade531d876cf89bf59.diff LOG:

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-04-07 Thread Aaron Ballman via cfe-commits
@@ -52,6 +54,12 @@ typedef struct { * to `std::string::c_str()`. */ CINDEX_LINKAGE const char *clang_getCString(CXString string); +/** + * This function behaves the same as clang_getCString, except that it also + * returns the size through the length parameter. The length par

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

2025-04-07 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,6 @@ +/* RUN: %clang_cc1 -std=c89 -fsyntax-only -verify -pedantic -Wno-strict-prototypes %s + */ + +int main() { AaronBallman wrote: You should also have a test where `main` does return a value to show that we silence the diagnostic, and another test

[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

2025-04-07 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/133800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-07 Thread Deric C. via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -std=hlsl202y -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +double4 test_double_inputs(double p0, double p1, double p2) { + return lit(p0, p1, p2

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

2025-04-07 Thread Farzon Lotfi via cfe-commits
@@ -280,6 +280,22 @@ constexpr bool4 isinf(double4 V) { return isinf((float4)V); } _DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp) _DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp) +//===--===// +// lit builtins overloa

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

2025-04-07 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/134399 >From 3812b132c83e4a2e7ae9bd0b5ecefe7232f86af1 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 3 Apr 2025 09:08:44 -0700 Subject: [PATCH 1/2] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-07 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/134288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-07 Thread Deric C. via cfe-commits
https://github.com/Icohedron 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] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-07 Thread Deric C. via cfe-commits
Icohedron wrote: If you add a test here that uses `half` ```c++ half4 test_lit_half(half NDotL, half NDotH, half M) { return lit(NDotL, NDotH, M); } ``` Will it convert the `half` types to float? https://github.com/llvm/llvm-project/pull/134171 ___

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-04-07 Thread Devon Loehr via cfe-commits
DKLoehr wrote: We're also seeing `class member cannot be redeclared` errors when trying to build chromium: ``` In file included from ../../components/system_cpu/cpu_probe.cc:16: In file included from ../../components/system_cpu/cpu_probe_linux.h:14: ../../base/threading/sequence_bound.h:281:8: e

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-07 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fnative-half-type -finclude-default-header -triple dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=FLAG inbelic wrote: nit: it feels like we could remove some of the flags

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-07 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,45 @@ +; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s +; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s --check-prefix=DXC + +target triple = "dxil-pc-shadermodel6.7-library" + +;CHECK: ; Combined Shader Flags for Module +;CHECK-NEXT: ;

  1   2   3   4   >