[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-04-28 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: [8f56394](https://github.com/llvm/llvm-project/commit/8f56394487a4d454be0637667267ad37bd636d0f) https://github.com/llvm/llvm-project/actions/runs/14705684610 Please manually backport the fix and push it to your github fork. Once this is done, please cre

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-04-28 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: /cherry-pick https://github.com/llvm/llvm-project/commit/8f56394487a4d454be0637667267ad37bd636d0f https://github.com/llvm/llvm-project/pull/133037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Noustaa (Noustaa) Changes Allows enabling/disabling code patterns & snippets suggestion from completion. This can be done either with YAML config or CLI with --code-patterns You can refer to this discussion for more context:

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Noustaa (Noustaa) Changes Allows enabling/disabling code patterns & snippets suggestion from completion. This can be done either with YAML config or CLI with --code-patterns You can refer to this discussion for more context: https://git

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-04-28 Thread via cfe-commits
https://github.com/Noustaa created https://github.com/llvm/llvm-project/pull/137613 Allows enabling/disabling code patterns & snippets suggestion from completion. This can be done either with YAML config or CLI with --code-patterns You can refer to this discussion for more context: https://git

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-04-28 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] 12a4ec6 - [clang][NFC] Convert `Sema::FormatStringType` to scoped enum

2025-04-28 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T13:54:26+03:00 New Revision: 12a4ec6b1af8a50d31ee91093666e0fa455a4c35 URL: https://github.com/llvm/llvm-project/commit/12a4ec6b1af8a50d31ee91093666e0fa455a4c35 DIFF: https://github.com/llvm/llvm-project/commit/12a4ec6b1af8a50d31ee91093666e0fa455a4c35.

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-28 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: /cherry-pick https://github.com/llvm/llvm-project/commit/21fb19f3b5d572f608e959af895d781b9b24fbbd https://github.com/llvm/llvm-project/pull/136404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

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

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

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

[clang] e086d7b - [clang][bytecode] Don't create function frames for builtin calls (#137607)

2025-04-28 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-28T13:11:15+02:00 New Revision: e086d7b1464ad091ae849cb907f8647c8439cb66 URL: https://github.com/llvm/llvm-project/commit/e086d7b1464ad091ae849cb907f8647c8439cb66 DIFF: https://github.com/llvm/llvm-project/commit/e086d7b1464ad091ae849cb907f8647c8439cb66.diff L

[clang] [clang][bytecode] Don't create function frames for builtin calls (PR #137607)

2025-04-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/137607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer created https://github.com/llvm/llvm-project/pull/137617 When https://github.com/llvm/llvm-project/issues/27416 was fixed it became impossible to only use clang-format for include sorting. Let's introduce an option -disable-format to make it possible again to onl

[clang] [clang][bytecode] Don't create Function instances for builtins (PR #137618)

2025-04-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/137618 Now that we don't use them anymore in InterpBuiltin.cpp and we don't create frames for them anymore anyway, just don't create Function instances. >From cb2d21899df17578675bf9b85c3be2d141425ff3 Mon Sep 17 00:00

[clang] [clang][bytecode] Don't create Function instances for builtins (PR #137618)

2025-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Now that we don't use them anymore in InterpBuiltin.cpp and we don't create frames for them anymore anyway, just don't create Function instances. --- Full diff: https://github.com/llvm/llvm-project/pull/1376

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Daan De Meyer (DaanDeMeyer) Changes When https://github.com/llvm/llvm-project/issues/27416 was fixed it became impossible to only use clang-format for include sorting. Let's introduce an option -disable-format to make it possible a

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/tools/clang-format/ClangFormat.cpp ``

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-04-28 Thread via cfe-commits
@@ -101,9 +103,11 @@ T tmain(T argc, T *argv) { a = 2; #pragma omp task default(none), private(argc, b) firstprivate(argv) shared(d) if (argc > 0) final(S::TS > 0) priority(argc) affinity(argc, argv[b:argc], arr[:], ([argc][sizeof(T)])argv) foo(); +#ifndef OMP60 -

[clang] [C] Diagnose declarations hidden in C++ (PR #137368)

2025-04-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/137368 >From e8234c9f374783f3b3fde586464037f52eda2f77 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 25 Apr 2025 13:16:39 -0400 Subject: [PATCH 1/2] [C] Diagnose declarations hidden in C++ This introduce

[clang] Fix crash with -ast-dump=json (PR #137324)

2025-04-28 Thread Aaron Ballman via cfe-commits
@@ -367,9 +367,11 @@ void MangleContext::mangleObjCMethodName(const ObjCMethodDecl *MD, } OS << (MD->isInstanceMethod() ? '-' : '+') << '['; if (const auto *CID = MD->getCategory()) { -OS << CID->getClassInterface()->getName(); -if (includeCategoryNamespace) { -

[clang] Fix crash with -ast-dump=json (PR #137324)

2025-04-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/137324 >From 4a159b5245b023fe04e9f46549dee009aa155f42 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 25 Apr 2025 08:49:35 -0400 Subject: [PATCH 1/2] Fix crash with -ast-dump=json When given an invalid Ob

[clang] Fix crash with -ast-dump=json (PR #137324)

2025-04-28 Thread Aaron Ballman via cfe-commits
@@ -211,6 +211,8 @@ Non-comprehensive list of changes in this release - Added `__builtin_elementwise_exp10`. - For AMDPGU targets, added `__builtin_v_cvt_off_f32_i4` that maps to the `v_cvt_off_f32_i4` instruction. - Added `__builtin_elementwise_minnum` and `__builtin_elementw

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-04-28 Thread Alexey Bataev via cfe-commits
@@ -101,9 +103,11 @@ T tmain(T argc, T *argv) { a = 2; #pragma omp task default(none), private(argc, b) firstprivate(argv) shared(d) if (argc > 0) final(S::TS > 0) priority(argc) affinity(argc, argv[b:argc], arr[:], ([argc][sizeof(T)])argv) foo(); +#ifndef OMP60 -

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-04-28 Thread via cfe-commits
@@ -3700,6 +3701,11 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc, if (NeedsCleanup) Flags = Flags | DestructorsFlag; } + if (const auto *Clause = D.getSingleClause()) { Ritanya-B-Bharadwaj wrote: For this flag, I foll

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-04-28 Thread kadir çetinkaya via cfe-commits
@@ -4522,6 +4523,38 @@ static CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, BaseVal = MTE->getOrCreateValue(false); assert(BaseVal && "got reference to unevaluated temporary"); + } else if (const CompoundLiteralExpr *CLE = +

[clang] [AMDGPU] Support the OpenCL generic addrspace feature by default (PR #137636)

2025-04-28 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/137636 This feature should be supported on AMDGCN architectures with flat addressing. >From bfaf6b32f88c0439b5f70a5fa78fc0927307ecce Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 28 Apr 2025 15:06:58 +0

[clang] [AMDGPU] Support the OpenCL generic addrspace feature by default (PR #137636)

2025-04-28 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/137636 >From bfaf6b32f88c0439b5f70a5fa78fc0927307ecce Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 28 Apr 2025 15:06:58 +0100 Subject: [PATCH 1/2] [AMDGPU] Support the OpenCL generic addrspace feature b

[clang] [clang][SPIR-V] Fix OpenCL addrspace mapping when using non-zero default AS (PR #137187)

2025-04-28 Thread Nick Sarnie via cfe-commits
sarnex wrote: Ping @AlexVlx @MrSidims thanks :) https://github.com/llvm/llvm-project/pull/137187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Support the OpenCL generic addrspace feature by default (PR #137636)

2025-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Fraser Cormack (frasercrmck) Changes This feature should be supported on AMDGCN architectures with flat addressing. --- Full diff: https://github.com/llvm/llvm-project/pull/137636.diff 3 Files Affected: - (modified) clang/lib/B

[clang] [AMDGPU] Support the OpenCL generic addrspace feature by default (PR #137636)

2025-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fraser Cormack (frasercrmck) Changes This feature should be supported on AMDGCN architectures with flat addressing. --- Full diff: https://github.com/llvm/llvm-project/pull/137636.diff 3 Files Affected: - (modified) clang/lib/Basic/Targ

[clang] [llvm] [AArch64] Add FEAT_FPAC to supported CPUs (PR #137330)

2025-04-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang,llvm` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/15174 Here is the relevant piece of the bui

[clang] [AMDGPU] Support the OpenCL generic addrspace feature by default (PR #137636)

2025-04-28 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 cl,h -- clang/lib/Basic/Targets/AMDGPU.h clang/test/Misc/amd

[clang] [Clang][AArch64] Add pessimistic vscale_range when sve is in target-f… (PR #137624)

2025-04-28 Thread David Sherwood via cfe-commits
@@ -794,14 +795,22 @@ AArch64TargetInfo::getTargetBuiltins() const { std::optional> AArch64TargetInfo::getVScaleRange(const LangOptions &LangOpts, - bool IsArmStreamingFunction) const { + bool IsArmStreamingFunc

[clang] [Clang][AArch64] Add pessimistic vscale_range when sve is in target-f… (PR #137624)

2025-04-28 Thread David Sherwood via cfe-commits
david-arm wrote: nit: Looks like the title for the PR has spilled over into the commit message. https://github.com/llvm/llvm-project/pull/137624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang-tools-extra] 985410f - [clang] Hide the `TargetOptions` pointer from `CompilerInvocation` (#106271)

2025-04-28 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-04-28T07:43:26-07:00 New Revision: 985410f87f2d19910a8d327527fd30062b042b63 URL: https://github.com/llvm/llvm-project/commit/985410f87f2d19910a8d327527fd30062b042b63 DIFF: https://github.com/llvm/llvm-project/commit/985410f87f2d19910a8d327527fd30062b042b63.diff L

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

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

[clang] [Clang][AArch64] Add fp8 variants for untyped NEON intrinsics (PR #128019)

2025-04-28 Thread via cfe-commits
Lukacma wrote: @paulwalker-arm the reasoning behind creating separate records, is that mfloat type is not available for aarch32 architectures and therefore all intrinsics using it need to be gated behind `ArchGuard = "defined(__aarch64__)"` . https://github.com/llvm/llvm-project/pull/128019 __

[clang] [clang][SPIR-V] Fix OpenCL addrspace mapping when using non-zero default AS (PR #137187)

2025-04-28 Thread Dmitry Sidorov via cfe-commits
https://github.com/MrSidims approved this pull request. This change is LGTM, but I'm starting to wonder, if those maps (with the only difference in default) can be unified and `setAddressSpaceMap` function changed appropriately. https://github.com/llvm/llvm-project/pull/137187 ___

[clang] [clang][SPIR-V] Fix OpenCL addrspace mapping when using non-zero default AS (PR #137187)

2025-04-28 Thread Nick Sarnie via cfe-commits
sarnex wrote: Probably yes, but I'd prefer to leave that to future work, I have enough on my plate :) https://github.com/llvm/llvm-project/pull/137187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang-tools-extra] [lldb] [clang] Hide the `TargetOptions` pointer from `CompilerInvocation` (PR #106271)

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

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-28 Thread via cfe-commits
@@ -0,0 +1,144 @@ +//===-- TargetVerifier.cpp - LLVM IR Target Verifier *- 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

[clang] [clang][bytecode] Fix ia32_addcarry/subborrow (PR #137642)

2025-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes RHS is followed by another Pointer. --- Full diff: https://github.com/llvm/llvm-project/pull/137642.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+11-9) ``diff di

[clang] [clang][bytecode] Fix ia32_addcarry/subborrow (PR #137642)

2025-04-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/137642 RHS is followed by another Pointer. >From c2ac52ac1ec9abd64576c92a2a2ea7780ab59f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 28 Apr 2025 16:44:52 +0200 Subject: [PATCH] [clang][by

[clang] [clang][bytecode] Check live-ness when calling dtors (PR #137645)

2025-04-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/137645 We can't call a destructor on a dead pointer. >From 595420d71250dece001bf9b85cc35191a4e478bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 28 Apr 2025 16:55:29 +0200 Subject: [PATCH]

[clang] [clang][bytecode] Check live-ness when calling dtors (PR #137645)

2025-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We can't call a destructor on a dead pointer. --- Full diff: https://github.com/llvm/llvm-project/pull/137645.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.cpp (+3) - (modified) clang/

[clang] 258e143 - [OpenACC][CIR][NFC] Refactor to move 'loop' emit into its own file

2025-04-28 Thread via cfe-commits
Author: erichkeane Date: 2025-04-28T07:59:12-07:00 New Revision: 258e1438c23c20cfe5c4908633401ab0adf4a364 URL: https://github.com/llvm/llvm-project/commit/258e1438c23c20cfe5c4908633401ab0adf4a364 DIFF: https://github.com/llvm/llvm-project/commit/258e1438c23c20cfe5c4908633401ab0adf4a364.diff LO

[clang] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

2025-04-28 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/137193 >From fac4240f2c217a9e48ab2eb8eeffb818f5c3a9ff Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Thu, 10 Apr 2025 11:43:18 + Subject: [PATCH 1/2] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR This is qui

[clang] [Clang][Sema] Handle invalid variable template specialization whose type depends on itself (PR #134522)

2025-04-28 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/134522 >From ccab3dc1f18ffeda9acb07c0bd5f80f65cc788b9 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Sun, 6 Apr 2025 15:06:56 +0800 Subject: [PATCH 1/2] Handle invalid variable template specialization whose type depend

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-28 Thread Fraser Cormack via cfe-commits
@@ -23,4 +23,20 @@ #define _CLC_DEF __attribute__((always_inline)) #endif +#if __OPENCL_C_VERSION__ == CL_VERSION_2_0 || \ +(__OPENCL_C_VERSION__ >= CL_VERSION_3_0 && \ + defined(__opencl_c_generic_addr

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-28 Thread Fraser Cormack via cfe-commits
@@ -420,12 +420,37 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) -D${CLC_TARGET_DEFINE} # All libclc builtin libraries see CLC headers -I${CMAKE_CURRENT_SOURCE_DIR}/clc/include + # Error on undefined macros + -Werror=undef ) if( NOT "${cpu}"

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-28 Thread Fraser Cormack via cfe-commits
@@ -12,3 +12,7 @@ _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x, local __CLC_INTN *iptr); _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,

[clang] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

2025-04-28 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/137193 >From ba6d59cdb2bf906a60b7e13448af730bd2019140 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 8 Apr 2025 17:21:15 + Subject: [PATCH 1/4] [mlir][OpenMP] Convert omp.cancel parallel to LLVMIR Support for

[clang] [HLSL] Allow non `.hlsl` files as source files (PR #137378)

2025-04-28 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/137378 >From 163b214e77e63d919ea7fdd1e52762263037175d Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Fri, 25 Apr 2025 13:16:53 -0400 Subject: [PATCH 1/2] [HLSL] Allow non `.hlsl` files as source files Changes the

[clang] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

2025-04-28 Thread Tom Eccles via cfe-commits
tblah wrote: It turned out that the Windows failures were due to some UB in my patch. Clang (with the OMPIRBuilder backend) was actually doing almost exactly the same hack as I implement in this patch, which then interacted badly by my attempts to do the same thing in OMPIRBuilder. I have rem

[clang] [AMDGPU] Support the OpenCL generic addrspace feature by default (PR #137636)

2025-04-28 Thread Shilei Tian via cfe-commits
@@ -146,3 +146,8 @@ #pragma OPENCL EXTENSION cl_khr_subgroups: enable // expected-warning@-1{{unsupported OpenCL extension 'cl_khr_subgroups' - ignoring}} +#ifdef __opencl_c_generic_address_space +#error "Incorrect __opencl_c_generic_address_space define" shi

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-28 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/137183 >From 3519e1c571375802d77937e765d551607ed5bdde Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Thu, 24 Apr 2025 11:24:30 +0100 Subject: [PATCH 1/2] [libclc] Support the generic address space This commit

[clang] [llvm] [mlir] [OMPIRBuilder] Don't discard the debug record from entry block. (PR #135161)

2025-04-28 Thread Abid Qadeer via cfe-commits
https://github.com/abidh updated https://github.com/llvm/llvm-project/pull/135161 >From 4ef791c9ad1cb951b430bff4d1ab66dd4ad30080 Mon Sep 17 00:00:00 2001 From: Abid Qadeer Date: Thu, 10 Apr 2025 11:32:29 +0100 Subject: [PATCH 1/3] [OMPIRBuilder] Don't discard the debug record from entry block.

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

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

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-28 Thread via cfe-commits
YexuanXiao wrote: The anticipated implementation from the discussion is beyond my capabilities. https://github.com/llvm/llvm-project/pull/136542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [Clang][AArch64] Add pessimistic vscale_range when sve is in target-f… (PR #137624)

2025-04-28 Thread Matthew Devereau via cfe-commits
@@ -794,14 +795,22 @@ AArch64TargetInfo::getTargetBuiltins() const { std::optional> AArch64TargetInfo::getVScaleRange(const LangOptions &LangOpts, - bool IsArmStreamingFunction) const { + bool IsArmStreamingFunc

[clang] [Clang][AArch64] Add pessimistic vscale_range when sve is in target-f… (PR #137624)

2025-04-28 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau edited https://github.com/llvm/llvm-project/pull/137624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6b973f2 - [clang] Remove FEM_Indeterminable (#137247)

2025-04-28 Thread via cfe-commits
Author: Oliver Hunt Date: 2025-04-28T08:17:12-07:00 New Revision: 6b973f2baf66b05397d6caff3f29dbefabd5a214 URL: https://github.com/llvm/llvm-project/commit/6b973f2baf66b05397d6caff3f29dbefabd5a214 DIFF: https://github.com/llvm/llvm-project/commit/6b973f2baf66b05397d6caff3f29dbefabd5a214.diff L

[clang] 15579a8 - [clang][bytecode] Check array sizes against step limit (#137679)

2025-04-28 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-29T05:47:22+02:00 New Revision: 15579a8e72589b4fdf45c8f5bca52e58dcc9ce1d URL: https://github.com/llvm/llvm-project/commit/15579a8e72589b4fdf45c8f5bca52e58dcc9ce1d DIFF: https://github.com/llvm/llvm-project/commit/15579a8e72589b4fdf45c8f5bca52e58dcc9ce1d.diff L

[clang] [clang][bytecode] Check array sizes against step limit (PR #137679)

2025-04-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/137679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Feng Zou via cfe-commits
fzou1 wrote: > > Any comments? > > Still not understand the requirement... I've update commit message with an example. Please take a look. https://github.com/llvm/llvm-project/pull/136660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
@@ -242,8 +244,18 @@ static EFLAGSClobber getClobberType(const MachineInstr &MI) { MI.findRegisterDefOperand(X86::EFLAGS, /*TRI=*/nullptr); if (!FlagDef) return NoClobber; - if (FlagDef->isDead() && X86::getNFVariant(MI.getOpcode())) + + if (FlagDef->isDead() &&

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
@@ -127,6 +127,7 @@ ; CHECK-NEXT: X86 LEA Optimize ; CHECK-NEXT: X86 Optimize Call Frame ; CHECK-NEXT: X86 Avoid Store Forwarding Block +; CHECK-NEXT: X86 Suppress APX features for relocation phoebewang wrote: Ok, we don't need to move

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Owen Pan via cfe-commits
https://github.com/owenca requested changes to this pull request. This looks confusing. I would expect `-disable-format` to mean what it says. (But then why run clang-format?) If we allow turning on `SortIncludes` only, people will start asking for `QualifierAlignment` only, `IntegerLiteralSep

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-28 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,356 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -finclude-default-header -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -O1 -o - | FileChe

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

2025-04-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: LGTM. Let's land this in individual commits after the large test in google finish. https://github.com/llvm/llvm-project/pull/133057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,236 @@ +//===- X86SuppressAPXForReloc.cpp - Suppress APX features for relocations -===// +// +// 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: Ap

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,236 @@ +//===- X86SuppressAPXForReloc.cpp - Suppress APX features for relocations -===// +// +// 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: Ap

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,236 @@ +//===- X86SuppressAPXForReloc.cpp - Suppress APX features for relocations -===// +// +// 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: Ap

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-28 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,356 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -finclude-default-header -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -O1 -o - | FileChe

[clang] 0ddb579 - [clang][bytecode] Remove base casts before doing memcpy (#137754)

2025-04-28 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-29T08:06:31+02:00 New Revision: 0ddb5794b7b47481ed713af0add392de324d5cd2 URL: https://github.com/llvm/llvm-project/commit/0ddb5794b7b47481ed713af0add392de324d5cd2 DIFF: https://github.com/llvm/llvm-project/commit/0ddb5794b7b47481ed713af0add392de324d5cd2.diff L

[clang] [clang][bytecode] Remove base casts before doing memcpy (PR #137754)

2025-04-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/137754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-04-28 Thread via cfe-commits
https://github.com/Noustaa updated https://github.com/llvm/llvm-project/pull/137613 >From 7e715447d242d7e409e02059d2948fb3417fb00f Mon Sep 17 00:00:00 2001 From: Noustaa Date: Mon, 28 Apr 2025 12:38:36 +0200 Subject: [PATCH] [clangd] Add CodePatterns config option under Completion Allows enabl

[clang] [llvm] [RISCV] Add processor definition for SiFive P870 (PR #137725)

2025-04-28 Thread Pengcheng Wang via cfe-commits
@@ -365,6 +365,32 @@ def SIFIVE_P670 : RISCVProcessorModel<"sifive-p670", SiFiveP600Model, TuneVXRMPipelineFlush, TunePostRAScheduler]>; +def SIFIVE_P870 : RISCVProcessorModel<"sifive-p870", NoSched

[clang] [clang-format] Add OneLineFormatOffRegex option (PR #137577)

2025-04-28 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/137577 >From ce33e11aedf297e9cfb5e20efb4ce316886e6cb1 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 27 Apr 2025 21:18:03 -0700 Subject: [PATCH 1/2] [clang-format] Add OneLineFormatOffRegex option Close #54334 ---

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > This solution can not handle post-RA optimizations. Could we implement it in > MC stage for this workaround? We cannot change the register after RA. I don't see any problem for now expect NF optimizations, which we can skip them for now. https://github.com/llvm/llvm-projec

[clang] [clang][bytecode] Remove base casts before doing memcpy (PR #137754)

2025-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We have to copy the entire thing, not just one of the bases. --- Full diff: https://github.com/llvm/llvm-project/pull/137754.diff 3 Files Affected: - (modified) clang/lib/AST/ByteCode/Disasm.cpp (+1) - (m

[clang] [clang][bytecode] Remove base casts before doing memcpy (PR #137754)

2025-04-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/137754 We have to copy the entire thing, not just one of the bases. >From e73345a59ec62a79e709bcf91f17855df8f118e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 29 Apr 2025 06:33:09 +0200 Su

[clang] 2f1ef1d - [Clang] Add new -header-include-filtering=direct-per-file option (#137087)

2025-04-28 Thread via cfe-commits
Author: Bob Wilson Date: 2025-04-28T21:54:45-07:00 New Revision: 2f1ef1d18334629bf7c6be1951092f3974b40f0e URL: https://github.com/llvm/llvm-project/commit/2f1ef1d18334629bf7c6be1951092f3974b40f0e DIFF: https://github.com/llvm/llvm-project/commit/2f1ef1d18334629bf7c6be1951092f3974b40f0e.diff LO

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-28 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/137087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-04-28 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/134196 >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH 1/9] [clang] Merge gtest binaries into AllClangUnitTests This reduces

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-04-28 Thread Reid Kleckner via cfe-commits
rnk wrote: If anyone is looking for stories about the value of premerge testing, I was all set to push this tonight, but I saw the linux premerge test failure. I debugged it, and it turns out to be a subtle interaction where if you run Clang codegen with registered targets but no registered Ta

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Shengchen Kan via cfe-commits
KanRobert wrote: > Suppress EGPR/NDD instructions for relocations to avoid APX relocation types > emitted. This is to keep backward compatibility with old version of ld and > other linkers without APX support. If there are APX relocation types, old > version of linkers would raise "unsupported

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Feng Zou via cfe-commits
fzou1 wrote: > > Suppress EGPR/NDD instructions for relocations to avoid APX relocation > > types emitted. This is to keep backward compatibility with old version of > > ld and other linkers without APX support. If there are APX relocation > > types, old version of linkers would raise "unsuppo

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Shengchen Kan via cfe-commits
KanRobert wrote: > > > Suppress EGPR/NDD instructions for relocations to avoid APX relocation > > > types emitted. This is to keep backward compatibility with old version of > > > ld and other linkers without APX support. If there are APX relocation > > > types, old version of linkers would ra

[clang] [CIR] Upstream cir.call with scalar arguments (PR #136810)

2025-04-28 Thread Sirui Mu via cfe-commits
@@ -68,20 +168,70 @@ static cir::CIRCallOpInterface emitCallLikeOp(CIRGenFunction &cgf, assert(builder.getInsertionBlock() && "expected valid basic block"); assert(!cir::MissingFeatures::opCallIndirect()); - return builder.createCallOp(callLoc, directFuncOp); + return b

[clang] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments option (PR #137544)

2025-04-28 Thread Owen Pan via cfe-commits
owenca wrote: > Introduce a new FormatStyle option, > `ApplyAlwaysOnePerLineToTemplateArguments`, which controls whether > `BinPackParameters=AlwaysOnePerLine` also applies to template argument lists. > > This allows users to enforce one-per-line formatting for function parameters > without u

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
@@ -254,11 +256,20 @@ static bool CompressEVEXImpl(MachineInstr &MI, const X86Subtarget &ST) { } } + bool IsWithReloc = false; + if (X86EnableAPXForRelocation) { +int MemOpNo = X86II::getMemoryOperandNo(MI.getDesc().TSFlags) + + X86II::getOperandB

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Feng Zou via cfe-commits
fzou1 wrote: > > > Any comments? > > > > > > Still not understand the requirement... > > I'm confused by the test cases too. I understood the code as we replace the > EGPR or NDD instructions with non-APX ones, which meets my expection. But the > option and tests are in MC phase, which means

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-28 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm. https://github.com/llvm/llvm-project/pull/137087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-28 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese edited https://github.com/llvm/llvm-project/pull/137087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-28 Thread Michael Spencer via cfe-commits
@@ -322,3 +372,81 @@ void HeaderIncludesJSONCallback::FileSkipped( IncludedHeaders.push_back(SkippedFile.getName().str()); } + +void HeaderIncludesDirectPerFileCallback::EndOfMainFile() { + if (Dependencies.empty()) +return; + + // Sort the files so that the output doe

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-28 Thread Farzon Lotfi via cfe-commits
@@ -71,6 +71,27 @@ constexpr vector reflect_vec_impl(vector I, vector N) { #endif } +template constexpr T refract_impl(T I, T N, T eta) { + T k = 1 - eta * eta * (1 - (N * I * N *I)); + if(k < 0) farzonl wrote: I feel like we can simplify these conditiona

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Feng Zou via cfe-commits
fzou1 wrote: > > > > Suppress EGPR/NDD instructions for relocations to avoid APX relocation > > > > types emitted. This is to keep backward compatibility with old version > > > > of ld and other linkers without APX support. If there are APX > > > > relocation types, old version of linkers woul

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Feng Zou via cfe-commits
https://github.com/fzou1 edited https://github.com/llvm/llvm-project/pull/136660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Check array sizes against step limit (PR #137679)

2025-04-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-latest-gcc` running on `linaro-flang-aarch64-latest-gcc` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/130/builds/12900 Here is

<    1   2   3   4   5   6   >