[clang] [clang] handle fp options in __builtin_convertvector (PR #125522)

2025-02-05 Thread Jakub Ficek via cfe-commits
ficol wrote: > > > Are fp options (already) handled in constant evaluation? > > > > > > I think they are, there are tests for it in > > https://github.com/llvm/llvm-project/blob/main/clang/test/AST/const-fpfeatures.c > > and > > https://github.com/llvm/llvm-project/blob/main/clang/test/AST/c

[clang] [llvm] [mlir] [NVPTX] Convert scalar function nvvm.annotations to attributes (PR #125908)

2025-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alex MacLean (AlexMaclean) Changes Replace some more nvvm.annotations with function attributes, auto-upgrading the annotations as needed. These new attributes will be more idiomatic and compile-time efficient than the annotations. - !"m

[clang] [llvm] [mlir] [NVPTX] Convert scalar function nvvm.annotations to attributes (PR #125908)

2025-02-05 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean created https://github.com/llvm/llvm-project/pull/125908 Replace some more nvvm.annotations with function attributes, auto-upgrading the annotations as needed. These new attributes will be more idiomatic and compile-time efficient than the annotations. - !"maxc

[clang] [llvm] [mlir] [NVPTX] Convert scalar function nvvm.annotations to attributes (PR #125908)

2025-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir Author: Alex MacLean (AlexMaclean) Changes Replace some more nvvm.annotations with function attributes, auto-upgrading the annotations as needed. These new attributes will be more idiomatic and compile-time efficient than the annotations. - !"ma

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-02-05 Thread Eli Friedman via cfe-commits
@@ -82,7 +82,7 @@ define void @test_store(ptr %p) { @G = external global ptr define i8 @test_store_capture(ptr %p) { -; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: read, inaccessiblemem: none) +; FNATTRS: Functio

[clang] [llvm] [aarch64][x86][win] Add compiler support for MSVC's /funcoverride flag (Windows kernel loader replaceable functions) (PR #125320)

2025-02-05 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/125320 >From dc48eeb8b8ae51a8ee5a5289de4d0b6eb8cd0b68 Mon Sep 17 00:00:00 2001 From: "Daniel Paoliello (HE/HIM)" Date: Fri, 31 Jan 2025 16:47:23 -0800 Subject: [PATCH] [aarch64][x86][win] Add support for MSVC's /fun

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `arc-builder` running on `arc-worker` while building `clang,libc` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/11336 Here is the relevant pie

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

2025-02-05 Thread Deric Cheung via cfe-commits
@@ -10623,7 +10623,7 @@ def err_second_argument_to_cwsc_not_pointer : Error< "second argument to __builtin_call_with_static_chain must be of pointer type">; def err_vector_incorrect_num_elements : Error< - "%select{too many|too few}0 elements in vector %select{initializat

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-02-05 Thread Aidan Goldfarb via cfe-commits
@@ -4870,14 +4870,16 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">;

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ppc64le-lld-multistage-test` running on `ppc64le-lld-multistage-test` while building `clang,libc` at step 7 "test-build-stage1-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/1

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-02-05 Thread Erich Keane via cfe-commits
@@ -4870,14 +4870,16 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">;

[clang] [llvm] [OpenMP][OpenMPIRBuilder] Add initial changes for SPIR-V target frontend support (PR #125920)

2025-02-05 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/125920 >From 1ee97d674c707d4b07d1e39f943adc94bb16d205 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 4 Feb 2025 13:09:48 -0800 Subject: [PATCH 1/2] [OpenMP][OpenMPIRBuilder] Add initial changes for SPIR-V tar

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-02-05 Thread Antonio Frighetto via cfe-commits
@@ -82,7 +82,7 @@ define void @test_store(ptr %p) { @G = external global ptr define i8 @test_store_capture(ptr %p) { -; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: read, inaccessiblemem: none) +; FNATTRS: Functio

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

2025-02-05 Thread via cfe-commits
@@ -359,18 +359,21 @@ class OpLowerer { return lowerToBindAndAnnotateHandle(F); } - Error replaceSplitDoubleCallUsages(CallInst *Intrin, CallInst *Op) { + Error replaceExtractElementTypeOfCallUsages(CallInst *Intrin, CallInst *Op) { for (Use &U : make_early_inc_ra

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-solaris11-sparcv9` running on `solaris11-sparcv9` while building `clang,libc` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/13/builds/5131 Here is the relevant piec

[clang] [clang] print correct context for diagnostics suppressed by deduction (PR #125453)

2025-02-05 Thread Erich Keane via cfe-commits
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase { /// '\#pragma clang attribute push' directives to the given declaration. void AddPragmaAttributes(Scope *S, Decl *D); - void PrintPragmaAttributeInstantiationPoint(); + using DiagFuncRef = + llvm::function_

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/125619 >From dc7f71d511d2e13e527e0c8cd242a3ece82bcdfd Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Mon, 3 Feb 2025 13:20:51 -0800 Subject: [PATCH 1/4] [CIR] Lowering to LLVM for global pointers Add support for

[clang] [clang] Support member function poiners in Decl::getFunctionType() (PR #125077)

2025-02-05 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: /cherry-pick https://github.com/llvm/llvm-project/commit/692c9b210728323ac499a402ee6eb901f35856f2 https://github.com/llvm/llvm-project/pull/125077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang] Support member function poiners in Decl::getFunctionType() (PR #125077)

2025-02-05 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue milestoned https://github.com/llvm/llvm-project/pull/125077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1901f4a - CodeGen: support static linking for libclosure (#125384)

2025-02-05 Thread via cfe-commits
Author: Saleem Abdulrasool Date: 2025-02-05T15:15:36-08:00 New Revision: 1901f4ac8eb1ddd8df822841a48b818c496aa2ad URL: https://github.com/llvm/llvm-project/commit/1901f4ac8eb1ddd8df822841a48b818c496aa2ad DIFF: https://github.com/llvm/llvm-project/commit/1901f4ac8eb1ddd8df822841a48b818c496aa2ad.

[clang] CodeGen: support static linking for libclosure (PR #125384)

2025-02-05 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd closed https://github.com/llvm/llvm-project/pull/125384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Support member function poiners in Decl::getFunctionType() (PR #125077)

2025-02-05 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#125956 https://github.com/llvm/llvm-project/pull/125077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-05 Thread Wael Yehia via cfe-commits
@@ -1120,3 +1120,23 @@ // RUN:-c \ // RUN: | FileCheck --check-prefixes=CHECK-K-UNUSED %s // CHECK-K-UNUSED: clang: warning: -K: 'linker' input unused [-Wunused-command-line-argument] + + +// This test verifies that the linker doesn't include '-latomic' when no sani

[clang] [clang] Parse warning-suppression-mapping after setting up diagengine (PR #125714)

2025-02-05 Thread James Y Knight via cfe-commits
https://github.com/jyknight approved this pull request. https://github.com/llvm/llvm-project/pull/125714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][HIP] Do not pass -dependency-file flag for HIP Device offloading (PR #125646)

2025-02-05 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/125646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP] OpenMP 6.0 updates to restrictions with order/concurrent (PR #125621)

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

[clang] [clang][NFC] Precommit test file refactoring (PR #125944)

2025-02-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/14157 Here is th

[clang] [clang][NFC] Precommit test file refactoring (PR #125944)

2025-02-05 Thread Paul Kirth via cfe-commits
ilovepi wrote: Hmm, build bot failure is unrelated, since it doesn't look like the test I changed is failing. https://github.com/llvm/llvm-project/pull/125944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-02-05 Thread Antonio Frighetto via cfe-commits
@@ -82,7 +82,7 @@ define void @test_store(ptr %p) { @G = external global ptr define i8 @test_store_capture(ptr %p) { -; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: read, inaccessiblemem: none) +; FNATTRS: Functio

[clang] [Clang] refine diagnostic for redundant qualifiers on base class type to handle singular and plural cases (PR #125943)

2025-02-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Please improve the commit message to better explain what is going on, else LGTM. https://github.com/llvm/llvm-project/pull/125943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [Clang] Permit both `gnu` and `clang` prefixes on some attributes (PR #125796)

2025-02-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/125796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Permit both `gnu` and `clang` prefixes on some attributes (PR #125796)

2025-02-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/125796 >From 77ee45f25f03614dbb63369922e9722a79ec8518 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 4 Feb 2025 20:03:33 -0600 Subject: [PATCH 1/2] [Clang] Permit both `gnu` and `clang` prefixes on attributes

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

2025-02-05 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/125718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] Reland: [clang] fix P3310 overload resolution flag propagation (PR #125791)

2025-02-05 Thread Michael Buch via cfe-commits
@@ -280,7 +280,8 @@ std::optional CxxModuleHandler::tryInstantiateStdTemplate(Decl *d) { new_class_template->getDeclContext(), new_class_template->getTemplatedDecl()->getLocation(), new_class_template->getLocation(), new_class_template, imported_args, -

[clang] [Clang] Permit both `gnu` and `clang` prefixes on attributes (PR #125796)

2025-02-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, but please be sure to add a release note to `clang/docs/ReleaseNotes.rst` so users know about the changes as well. Also, before landing, please change the summary -- this isn't allowing both `clang` and `gnu` on *all* attributes,

[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

2025-02-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Probably best to pass a constant `false`/`true` to preserve old behaviour. We > can't even instantiate templates in the expression evaluator right now, so > don't think we should be worrying about this at the moment Please see https://github.com/llvm/llvm-project/pull/125791

[clang] [llvm] [OpenMP]Initial parsing/sema support for target_device selector set (PR #118471)

2025-02-05 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj closed https://github.com/llvm/llvm-project/pull/118471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8c36665 - [OpenMP]Initial parsing/sema support for target_device selector set (#118471)

2025-02-05 Thread via cfe-commits
Author: Ritanya-B-Bharadwaj Date: 2025-02-05T19:24:24+05:30 New Revision: 8c3666526794e011046fd3a837b623265afa471b URL: https://github.com/llvm/llvm-project/commit/8c3666526794e011046fd3a837b623265afa471b DIFF: https://github.com/llvm/llvm-project/commit/8c3666526794e011046fd3a837b623265afa471b

[clang] [NFC] Fix Lit test 'amdgpu-openmp-sanitize-options.c'. (PR #125857)

2025-02-05 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 edited https://github.com/llvm/llvm-project/pull/125857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-05 Thread Aaron Ballman via cfe-commits
@@ -3117,11 +3120,20 @@ def PragmaClangTextSection : InheritableAttr { let Documentation = [InternalOnly]; } -def CodeModel : InheritableAttr, TargetSpecificAttr { +// The code model attribute only applies to LoongArch and x86-64, but for NVPTX AaronBallman

[clang] [lldb] Reland: [clang] fix P3310 overload resolution flag propagation (PR #125791)

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

[clang] [Clang] Permit both `gnu` and `clang` prefixes on some attributes (PR #125796)

2025-02-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/125796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Emit warnings on incorrect AVR interrupt/signal handlers (PR #125328)

2025-02-05 Thread via cfe-commits
aykevl wrote: It might be worth adding a check for something like this? ```c __attribute__((signal)) void foog() {} // expected-warning {{'signal' attribute only applies to functions that have no parameters}} ``` (This is because C, at least in the past, trea

[clang] cd754af - [Clang] Permit both `gnu` and `clang` prefixes on some attributes (#125796)

2025-02-05 Thread via cfe-commits
Author: Joseph Huber Date: 2025-02-05T08:16:00-06:00 New Revision: cd754af55f5b7f6f5371852843bc3613866232c2 URL: https://github.com/llvm/llvm-project/commit/cd754af55f5b7f6f5371852843bc3613866232c2 DIFF: https://github.com/llvm/llvm-project/commit/cd754af55f5b7f6f5371852843bc3613866232c2.diff

[clang] [NFC] Fix Lit test 'amdgpu-openmp-sanitize-options.c'. (PR #125857)

2025-02-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/125857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 455cedc - [Clang] Make `-Xarch_` handling generic for all toolchains (#125421)

2025-02-05 Thread via cfe-commits
Author: Joseph Huber Date: 2025-02-05T08:18:16-06:00 New Revision: 455cedc805e7a42c6cfbe26a4ddd9e623cca6066 URL: https://github.com/llvm/llvm-project/commit/455cedc805e7a42c6cfbe26a4ddd9e623cca6066 DIFF: https://github.com/llvm/llvm-project/commit/455cedc805e7a42c6cfbe26a4ddd9e623cca6066.diff

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/125421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-05 Thread Erich Keane via cfe-commits
@@ -2949,15 +2950,34 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } +static bool isValidCodeModelAttr(Sema &S, StringRef Str) { + if (S.Context.getTargetInfo().getTriple().isLoongArch()) { +return Str == "normal" || Str == "medium" || St

[clang] [Clang] Permit both `gnu` and `clang` prefixes on some attributes (PR #125796)

2025-02-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/125796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Fix Lit test 'amdgpu-openmp-sanitize-options.c'. (PR #125857)

2025-02-05 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 closed https://github.com/llvm/llvm-project/pull/125857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 56a4988 - [NFC] Fix Lit test 'amdgpu-openmp-sanitize-options.c'. (#125857)

2025-02-05 Thread via cfe-commits
Author: Amit Kumar Pandey Date: 2025-02-05T20:16:39+05:30 New Revision: 56a49884ad158fde292d007a2139a77353b4faf7 URL: https://github.com/llvm/llvm-project/commit/56a49884ad158fde292d007a2139a77353b4faf7 DIFF: https://github.com/llvm/llvm-project/commit/56a49884ad158fde292d007a2139a77353b4faf7.d

[clang] [clang] Stop parsing warning suppression mappings in driver (PR #125722)

2025-02-05 Thread James Y Knight via cfe-commits
https://github.com/jyknight approved this pull request. https://github.com/llvm/llvm-project/pull/125722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] [clang] Parse warning-suppression-mapping after setting up diagengine (PR #125714)

2025-02-05 Thread James Y Knight via cfe-commits
jyknight wrote: (Oh, all these suppression mappings fixes will need to be backported to the 20.x branch too.) https://github.com/llvm/llvm-project/pull/125714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [lldb] [clang] NFC: rename MatchedPackOnParmToNonPackOnArg to StrictPackMatch (PR #125418)

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

[clang] [llvm] [clang-linker-wrapper] Add ELF packaging for spirv64-intel OpenMP images (PR #125737)

2025-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nick Sarnie (sarnex) Changes Add manual ELF packaging for `spirv64-intel` images. This format will be expected by the runtime plugin we will submit in the future. --- Full diff: https://github.com/llvm/llvm-project/pull/125737.diff 8 Fi

[clang] c517edb - [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (#125811)

2025-02-05 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-02-05T07:16:36-08:00 New Revision: c517edbd0cce53c8e1e0b9c7301be7eb678dae4b URL: https://github.com/llvm/llvm-project/commit/c517edbd0cce53c8e1e0b9c7301be7eb678dae4b DIFF: https://github.com/llvm/llvm-project/commit/c517edbd0cce53c8e1e0b9c7301be7eb678dae4b.diff L

[clang] [llvm] [clang-linker-wrapper] Add ELF packaging for spirv64-intel OpenMP images (PR #125737)

2025-02-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Generally averse to checked-in binaries for tests. You should be able to generate these from within the test ideally. Worst case you have `yaml2obj`. https://github.com/llvm/llvm-project/pull/125737 __

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-05 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/125880 TODO: PR description, a few extra tests. >From 5be3d8b312365ef8919792703d3fe71d1e39eb53 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 30 Jan 2025 12:08:01 +0100 Subject: [PATCH] wip --- clang/test/Code

[clang] 7ef636e - [clang][bytecode] Mark IndirectFieldDecl chain links as initialized (#125869)

2025-02-05 Thread via cfe-commits
Author: Timm Baeder Date: 2025-02-05T17:50:55+01:00 New Revision: 7ef636e1c4c49b175833dc91c44ed338b899c29b URL: https://github.com/llvm/llvm-project/commit/7ef636e1c4c49b175833dc91c44ed338b899c29b DIFF: https://github.com/llvm/llvm-project/commit/7ef636e1c4c49b175833dc91c44ed338b899c29b.diff L

[clang] [clang][bytecode] Mark IndirectFieldDecl chain links as initialized (PR #125869)

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

[clang] [compiler-rt] [profile] Add `%b` `LLVM_PROFILE_FILE` option for binary ID (PR #123963)

2025-02-05 Thread David Li via cfe-commits
https://github.com/david-xl approved this pull request. https://github.com/llvm/llvm-project/pull/123963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-linker-wrapper] Add ELF packaging for spirv64-intel OpenMP images (PR #125737)

2025-02-05 Thread Joseph Huber via cfe-commits
@@ -605,6 +605,17 @@ Expected linkDevice(ArrayRef InputFiles, } } +Error containerizeRawImage(std::unique_ptr &Img, OffloadKind Kind, + const ArgList &Args) { + llvm::Triple Triple(Args.getLastArgValue(OPT_triple_EQ)); + if (Kind != OFK_OpenMP |

[clang] Add clang atomic control options and attribute (PR #114841)

2025-02-05 Thread Erich Keane via cfe-commits
@@ -5404,6 +5404,151 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

[clang] Add clang atomic control options and attribute (PR #114841)

2025-02-05 Thread Erich Keane via cfe-commits
@@ -5404,6 +5404,151 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: test? https://github.com/llvm/llvm-project/pull/125896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > test? I could add one in `libc`, otherwise I don't see great value in it. This is directly lifted from existing implementations so I'm not too concerned about its correctness and I did a sanity check on it. https://github.com/llvm/llvm-project/pull/125896

[clang] [clang][test][OpenMP] Fix test assumptions of libomp and clang paths (PR #125891)

2025-02-05 Thread Shilei Tian via cfe-commits
@@ -1,49 +1,49 @@ // REQUIRES: x86-registered-target, amdgpu-registered-target // Fail on invalid ROCm Path. -// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fgpu-sanitize -nogpuinc --rocm-path=%S/Inputs/r

[clang] [HLSL] Implement HLSL Flat casting (excluding splat cases) (PR #118842)

2025-02-05 Thread Sarah Spall via cfe-commits
@@ -6358,3 +6359,81 @@ RValue CodeGenFunction::EmitPseudoObjectRValue(const PseudoObjectExpr *E, LValue CodeGenFunction::EmitPseudoObjectLValue(const PseudoObjectExpr *E) { return emitPseudoObjectExpr(*this, E, true, AggValueSlot::ignored()).LV; } + +void CodeGenFunction::Fl

[clang] [analyzer] Remove some false negatives in StackAddrEscapeChecker (PR #125638)

2025-02-05 Thread Gábor Horváth via cfe-commits
@@ -247,45 +240,134 @@ void StackAddrEscapeChecker::checkPreCall(const CallEvent &Call, } } -void StackAddrEscapeChecker::checkPreStmt(const ReturnStmt *RS, - CheckerContext &C) const { - if (!ChecksEnabled[CK_StackAddrEscapeChecker

[clang] [clang] handle fp options in __builtin_convertvector (PR #125522)

2025-02-05 Thread Timm Baeder via cfe-commits
tbaederr wrote: > > Are fp options (already) handled in constant evaluation? > > I think they are, there are tests for it in > https://github.com/llvm/llvm-project/blob/main/clang/test/AST/const-fpfeatures.c > and > https://github.com/llvm/llvm-project/blob/main/clang/test/AST/const-fpfeature

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-05 Thread Reid Kleckner via cfe-commits
@@ -2949,15 +2950,34 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } +static bool isValidCodeModelAttr(Sema &S, StringRef Str) { + if (S.Context.getTargetInfo().getTriple().isLoongArch()) { +return Str == "normal" || Str == "medium" || St

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-05 Thread Erich Keane via cfe-commits
@@ -2949,15 +2950,34 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } +static bool isValidCodeModelAttr(Sema &S, StringRef Str) { + if (S.Context.getTargetInfo().getTriple().isLoongArch()) { +return Str == "normal" || Str == "medium" || St

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

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

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-05 Thread Chris Apple via cfe-commits
https://github.com/cjappl commented: (sorry meant to leave these comments the other day, these comments are separate from the "should we enable it" discussion) https://github.com/llvm/llvm-project/pull/125389 ___ cfe-commits mailing list cfe-commits@l

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-global-isel` running on `linaro-clang-aarch64-global-isel` while building `clang,libc` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/125/builds/5430 Here is

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-05 Thread Chris Apple via cfe-commits
@@ -43,6 +44,21 @@ static __rtsan::Context &GetContextForThisThreadImpl() { return *current_thread_context; } +#else + +// On FreeBSD, pthread api cannot be used as calloc is called under the hood +// at library initialization time. cjappl wrote: Can you el

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-05 Thread Chris Apple via cfe-commits
https://github.com/cjappl edited https://github.com/llvm/llvm-project/pull/125389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-05 Thread Chris Apple via cfe-commits
https://github.com/cjappl edited https://github.com/llvm/llvm-project/pull/125389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-05 Thread Chris Apple via cfe-commits
@@ -43,6 +44,21 @@ static __rtsan::Context &GetContextForThisThreadImpl() { return *current_thread_context; } +#else + +// On FreeBSD, pthread api cannot be used as calloc is called under the hood +// at library initialization time. +static __thread Context *ctx = nullptr; +

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-05 Thread Chris Apple via cfe-commits
cjappl wrote: Thanks for the feedback @brooksdavis and @bsdimp - always hard to tell how popular or unpopular a change would be, especially from "outside the community" (aka me not knowing much about the BSD flavors :) > Sure we can keep it open for a while, still a long road before 21.x anyw

[libunwind] Silence -Wunused-parameter warnings in Unwind-wasm.c (PR #125412)

2025-02-05 Thread Yuriy Chernyshov via cfe-commits
georgthegreat wrote: @MaskRay, we build libunwind using our own build system with the clang default set of warnings enabled. There is already a couple of `[[maybe_unused]]` attributes in this library, so I do not bring anything new: ``` (dflt) thegeorg@jakku:~/contrib/llvm/libunwind@main$ rg u

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125811)

2025-02-05 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/125811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-05 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia deleted https://github.com/llvm/llvm-project/pull/125388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2025-02-05 Thread Ziqing Luo via cfe-commits
@@ -431,6 +431,122 @@ AST_MATCHER(CXXConstructExpr, isSafeSpanTwoParamConstruct) { return false; } +class MaxValueEval : public ConstStmtVisitor { + + ASTContext &Context; + llvm::APInt Max; + unsigned bit_width; + +public: + typedef ConstStmtVisitor VisitorBase; + + e

[clang] [llvm] [OpenMP][OpenMPIRBuilder] Add initial changes for SPIR-V target frontend support (PR #125920)

2025-02-05 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/125920 I expect (many) other changes will be required, but let's get started with something simple. >From 1ee97d674c707d4b07d1e39f943adc94bb16d205 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 4 Feb 2025 13

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-05 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > @lanza @bcardosolopes Do you want to look this over before I commit it? This > change introduces some restructuring that I'll want to incorporate in the > incubator, where it will have a somewhat bigger impact, so I'd like to get > your buy-in or objections now before I

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-debian-cpp20` running on `clang-debian-cpp20` while building `clang,libc` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/108/builds/8975 Here is

[clang] [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2025-02-05 Thread Ziqing Luo via cfe-commits
@@ -431,6 +431,122 @@ AST_MATCHER(CXXConstructExpr, isSafeSpanTwoParamConstruct) { return false; } +class MaxValueEval : public ConstStmtVisitor { + + ASTContext &Context; + llvm::APInt Max; + unsigned bit_width; + +public: + typedef ConstStmtVisitor VisitorBase; + + e

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread Joseph Huber via cfe-commits
@@ -149,22 +149,23 @@ _DEFAULT_FN_ATTRS static __inline__ void __gpu_sync_lane(uint64_t __lane_mask) { // Shuffles the the lanes inside the warp according to the given index. _DEFAULT_FN_ATTRS static __inline__ uint32_t -__gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-05 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,52 @@ +//===- TypeConverter.h - Convert builtin to LLVM dialect types --*- C++ -*-===// bcardosolopes wrote: TypeConverter.h -> CIRAttrVisitor.h https://github.com/llvm/llvm-project/pull/125619 ___ cfe-comm

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-02-05 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-02-05 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross` running on `suse-gary-m68k-cross` while building `clang,libc` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/5732 Here is the relevant pi

[clang] [clang][test][OpenMP] Fix test assumptions of libomp and clang paths (PR #125891)

2025-02-05 Thread Jordan Rupprecht via cfe-commits
@@ -1,49 +1,49 @@ // REQUIRES: x86-registered-target, amdgpu-registered-target // Fail on invalid ROCm Path. -// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fgpu-sanitize -nogpuinc --rocm-path=%S/Inputs/r

[clang] [llvm] [llvm][fatlto] Add FatLTOCleanup pass (PR #125911)

2025-02-05 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/125911 When using FatLTO, it is common to want to enable certain types of whole program optimizations (WPD) or security transforms (CFI), so that they can be made available when performing LTO. However, these transforms

[clang] Reapply "[AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly" (PR #125744)

2025-02-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/125744 >From 38857841cfd25c6faaa1448f6556060f2db364e1 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 4 Feb 2025 12:06:34 -0600 Subject: [PATCH] Reapply "[AMDGPU] Use the AMDGPUToolChain when targeting C/C++ di

[clang] [clang][test][OpenMP] Fix test assumptions of libomp and clang paths (PR #125891)

2025-02-05 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/125891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test][OpenMP] Fix test assumptions of libomp and clang paths (PR #125891)

2025-02-05 Thread Shilei Tian via cfe-commits
@@ -1,49 +1,49 @@ // REQUIRES: x86-registered-target, amdgpu-registered-target // Fail on invalid ROCm Path. -// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fgpu-sanitize -nogpuinc --rocm-path=%S/Inputs/r

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-05 Thread Andy Kaylor via cfe-commits
andykaylor wrote: @lanza @bcardosolopes Do you want to look this over before I commit it? This change introduces some restructuring that I'll want to incorporate in the incubator, where it will have a somewhat bigger impact, so I'd like to get your buy-in or objections now before I start worki

<    1   2   3   4   5   >