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

2025-04-07 Thread Erich Keane via cfe-commits
erichkeane wrote: > We can do a back port once the patch is settled, and it could wait until 20.2. Based on the size/impact here, I'd be pretty against backporting this. The regression stinks, but I'm not comfortable approving this for backport. https://github.com/llvm/llvm-project/pull/13446

[clang-tools-extra] [clangd] Strip invalid fromRanges for outgoing calls (PR #134657)

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-tools-extra] [clangd] Strip invalid fromRanges for outgoing calls (PR #134657)

2025-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd @llvm/pr-subscribers-clang-tools-extra Author: Hampus Adolfsson (HampusAdolfsson) Changes `CallHierarchyOutgoingCall::fromRanges` are interpreted as ranges in the same file as the item for which 'outgoingCalls' was called. It's possible for outg

[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] 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] 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][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] [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] [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] [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] [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] [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] [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] [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] 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] 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] [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] 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] [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] [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] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-07 Thread Finn Plummer via cfe-commits
https://github.com/inbelic commented: Assuming `-fnative-half-type` can be directly used as an alias to `enable-16bit-types` in DXC, this LGTM. Just some nits otherwise https://github.com/llvm/llvm-project/pull/134288 ___ cfe-commits mailing list cfe-

[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] [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] [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] [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
@@ -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] [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/3] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global

[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] [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] [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] [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] 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] [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] [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] 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] [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][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] [Clang] [ARM] Ensure FPU Features are collected when using the Clang Assembler (PR #134366)

2025-04-07 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 commented: Adding my review here so it can be tracked. I will make the changes in the PR I will open today @mstorsjo so these changes can be merged. https://github.com/llvm/llvm-project/pull/134366 ___ cfe-commits mailing

[clang] [Clang] [ARM] Ensure FPU Features are collected when using the Clang Assembler (PR #134366)

2025-04-07 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 edited https://github.com/llvm/llvm-project/pull/134366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-07 Thread via cfe-commits
@@ -978,6 +979,24 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, // we break out of the loop. for (; s != ThisTokEnd; ++s) { switch (*s) { +case 'b': // FP Suffix for "__bf16" +case 'B': + if (!Target.hasBFloat16Type()) +break

[clang] [Clang] [ARM] Ensure FPU Features are collected when using the Clang Assembler (PR #134366)

2025-04-07 Thread Martin Storsjö via cfe-commits
@@ -0,0 +1,8 @@ +// Ensure that we can assemble NEON by just specifying an armv7 +// Apple or Windows target. + +// REQUIRES: arm-registered-target +// RUN: %clang -c -target armv7-apple-darwin -o /dev/null %s +// RUN: %clang -c -target armv7-windows -o /dev/null %s --

[clang] [Clang] Use "syncscope" instead of "synchscope". NFC. (PR #134616)

2025-04-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/134616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add 'cl' to enable OpenCL kernel file formatting (PR #134529)

2025-04-07 Thread via cfe-commits
mydeveloperday wrote: i.e. clang-format-diff.py https://github.com/llvm/llvm-project/pull/134529 ___ 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
@@ -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] [driver] return in `addArchSpecificRPath` for AIX and also get the triple without the OS on AIX in `getArchSpecificLibPaths`. (PR #134520)

2025-04-07 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen edited https://github.com/llvm/llvm-project/pull/134520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix emitDestruction() for dummy descriptors (PR #134665)

2025-04-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/134665 This might happen if the referenced declaration is invalid and thus gets a dummy descriptor. We ran into an assertion later on. >From 9143c1118815f3b4a232a8d8029215ecbd2a3955 Mon Sep 17 00:00:00 2001 From: =?U

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

2025-04-07 Thread Farzon Lotfi via cfe-commits
farzonl wrote: I'm concerned that you had to remove your change in `clang/lib/Headers/hlsl.h`. I think you did it because you needed a template definition before you could specialize it. My concern is that now the generic template is gated by `#if __HLSL_VERSION <= __HLSL_202x` which mean you

<    1   2   3   4