[clang] [llvm] [LoongArch] [CodeGen] Add options for Clang to generate LoongArch-specific frecipe & frsqrte instructions (PR #109917)

2024-10-10 Thread via cfe-commits
@@ -141,6 +141,22 @@ enum NodeType : unsigned { VALL_NONZERO, VANY_NONZERO, + // Floating point approximate reciprocal operation + FRECIPE_S, tangaac wrote: We can't. Each target-dependent ISD corresponds to a specific instruction in the backend. Other

[clang-tools-extra] [clang-tidy] insert ``static`` keyword in correct position for misc-use-internal-linkage (PR #108792)

2024-10-10 Thread Danny Mösch via cfe-commits
@@ -128,6 +128,10 @@ Changes in existing checks ` check to avoid false positive for C++23 deducing this. +- Improved :doc:`misc-use-internal-linkage + ` check to insert ``static`` keyword + before type qualifier such as ``const``, ``volatile``. SimplyDa

[clang-tools-extra] [clang-tidy] insert ``static`` keyword in correct position for misc-use-internal-linkage (PR #108792)

2024-10-10 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny approved this pull request. https://github.com/llvm/llvm-project/pull/108792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [libcxx] [llvm] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)

2024-10-10 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/111434 >From 894cc0a4624fdf9409b9f448276d6c70a365c046 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Mon, 7 Oct 2024 15:30:24 +0200 Subject: [PATCH 1/4] [clang] Warn about memset/memcpy to NonTriviall

[clang] [clang][bytecode] Check number of addcarry/subborrow args (PR #111952)

2024-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Apparently this can fail as well. --- Full diff: https://github.com/llvm/llvm-project/pull/111952.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+1-1) ``diff diff

[clang] [clang][bytecode] Check number of addcarry/subborrow args (PR #111952)

2024-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/111952 Apparently this can fail as well. >From 129097176ae2673f8b6a5270edefbf6a787df55b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 11 Oct 2024 07:34:50 +0200 Subject: [PATCH] [clang][byte

[clang] [llvm] [RISCV] Add Smdbltrp and Ssdbltrp extension (PR #111837)

2024-10-10 Thread via cfe-commits
https://github.com/T-Tie updated https://github.com/llvm/llvm-project/pull/111837 >From 2c193cb89f5071ec89ccbe7df363bbff70dda85e Mon Sep 17 00:00:00 2001 From: T-Tie <160845405+t-...@users.noreply.github.com> Date: Thu, 10 Oct 2024 21:11:39 +0800 Subject: [PATCH 1/9] Update riscv-target-features

[clang] [clang] When checking for covariant return types, make sure the poiners or references are to *classes* (PR #111856)

2024-10-10 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb updated https://github.com/llvm/llvm-project/pull/111856 >From 786d31e2657964e578cd1fdf2006b0fb3b19fab6 Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Thu, 10 Oct 2024 15:15:23 + Subject: [PATCH 1/2] [clang] When checking for covariant return types, make su

[clang] [llvm] [RISCV] Add Smdbltrp and Ssdbltrp extension (PR #111837)

2024-10-10 Thread via cfe-commits
https://github.com/T-Tie updated https://github.com/llvm/llvm-project/pull/111837 >From 2c193cb89f5071ec89ccbe7df363bbff70dda85e Mon Sep 17 00:00:00 2001 From: T-Tie <160845405+t-...@users.noreply.github.com> Date: Thu, 10 Oct 2024 21:11:39 +0800 Subject: [PATCH 1/9] Update riscv-target-features

[clang] [clang] When checking for covariant return types, make sure the poiners or references are to *classes* (PR #111856)

2024-10-10 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb updated https://github.com/llvm/llvm-project/pull/111856 >From 786d31e2657964e578cd1fdf2006b0fb3b19fab6 Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Thu, 10 Oct 2024 15:15:23 + Subject: [PATCH 1/2] [clang] When checking for covariant return types, make su

[clang] [llvm] [RISCV] Add Smdbltrp and Ssdbltrp extension (PR #111837)

2024-10-10 Thread via cfe-commits
https://github.com/T-Tie updated https://github.com/llvm/llvm-project/pull/111837 >From 2c193cb89f5071ec89ccbe7df363bbff70dda85e Mon Sep 17 00:00:00 2001 From: T-Tie <160845405+t-...@users.noreply.github.com> Date: Thu, 10 Oct 2024 21:11:39 +0800 Subject: [PATCH 1/8] Update riscv-target-features

[clang] [llvm] [clang][llvm][SPIR-V] Explicitly encode native integer widths for SPIR-V (PR #110695)

2024-10-10 Thread Vyacheslav Levytskyy via cfe-commits
@@ -1,12 +1,14 @@ ; This test aims to check ability to support "Arithmetic with Overflow" intrinsics ; in the special case when those intrinsics are being generated by the CodeGenPrepare; -; pass during translations with optimization (note -O3 in llc arguments). +; pass during

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-10-10 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` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/438 Here is the relevant piece of

[clang] [clang][bytecode] Return an lvalue path for dummy pointers (PR #111862)

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

[clang] 36b0707 - [clang][bytecode] Return an lvalue path for dummy pointers (#111862)

2024-10-10 Thread via cfe-commits
Author: Timm Baeder Date: 2024-10-11T05:58:25+02:00 New Revision: 36b07077673b6c639804160c6b31ce57718e13db URL: https://github.com/llvm/llvm-project/commit/36b07077673b6c639804160c6b31ce57718e13db DIFF: https://github.com/llvm/llvm-project/commit/36b07077673b6c639804160c6b31ce57718e13db.diff L

[clang-tools-extra] [clangd] Simplify code with *Map::operator[] (NFC) (PR #111939)

2024-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/111939.diff 2 Files Affected: - (modified) clang-tools-extra/clangd/Headers.cpp (+2-2) - (modified) clang-tools-extra/clangd/XRe

[clang-tools-extra] [clangd] Simplify code with *Map::operator[] (NFC) (PR #111939)

2024-10-10 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/111939 None >From aeebcbd92118161c1a75aefa369ba11f40f79ddd Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 10 Oct 2024 08:37:40 -0700 Subject: [PATCH] [clangd] Simplify code with *Map::operator[] (NFC) -

[clang] Reland: [clang] Finish implementation of P0522 (PR #111711)

2024-10-10 Thread James Y Knight via cfe-commits
jyknight wrote: Here's another test-case which is broken by this commit (both at this commit, and after the follow-up PRs). It seems to no longer allow non-type template packs of multiple types. I'm surprised we have no test-cases for this in the clang test-suite! ``` template class Arg> str

[clang] [llvm] [LoongArch] [CodeGen] Add options for Clang to generate LoongArch-specific frecipe & frsqrte instructions (PR #109917)

2024-10-10 Thread Lu Weining via cfe-commits
@@ -0,0 +1,396 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc --mtriple=loongarch32 --mattr=+f,-d,-frecipe < %s | FileCheck %s --check-prefix=LA32F +; RUN: llc --mtriple=loongarch32 --mattr=+f,-d,+frecipe < %s | FileCheck %s --check

[clang] [llvm] [LoongArch] [CodeGen] Add options for Clang to generate LoongArch-specific frecipe & frsqrte instructions (PR #109917)

2024-10-10 Thread Lu Weining via cfe-commits
@@ -5902,6 +5914,92 @@ Register LoongArchTargetLowering::getExceptionSelectorRegister( return LoongArch::R5; } +//===--===// +// Target Optimization Hooks +//===-

[clang] [llvm] [LoongArch] [CodeGen] Add options for Clang to generate LoongArch-specific frecipe & frsqrte instructions (PR #109917)

2024-10-10 Thread Lu Weining via cfe-commits
@@ -251,6 +251,16 @@ void loongarch::getLoongArchTargetFeatures(const Driver &D, } else /*-mno-lasx*/ Features.push_back("-lasx"); } + + // Select frecipe feature determined by -m[no-]frecipe. + if (const Arg *A = + Args.getLastArg(options::OPT_mfrecipe,

[clang] [llvm] [LoongArch] [CodeGen] Add options for Clang to generate LoongArch-specific frecipe & frsqrte instructions (PR #109917)

2024-10-10 Thread Lu Weining via cfe-commits
@@ -141,6 +141,22 @@ enum NodeType : unsigned { VALL_NONZERO, VANY_NONZERO, + // Floating point approximate reciprocal operation + FRECIPE_S, SixWeining wrote: Can we only define two generic nodes (FRECIPE / FRSQRTE)? https://github.com/llvm/llvm-proje

[clang] [llvm] [LoongArch] [CodeGen] Add options for Clang to generate LoongArch-specific frecipe & frsqrte instructions (PR #109917)

2024-10-10 Thread Lu Weining via cfe-commits
@@ -19,12 +19,15 @@ def SDT_LoongArchMOVGR2FR_W_LA64 def SDT_LoongArchMOVFR2GR_S_LA64 : SDTypeProfile<1, 1, [SDTCisVT<0, i64>, SDTCisVT<1, f32>]>; def SDT_LoongArchFTINT : SDTypeProfile<1, 1, [SDTCisFP<0>, SDTCisFP<1>]>; +def SDT_LoongArchFRECIPE : SDTypeProfile<1, 1, [SDTC

[clang] [llvm] [LoongArch] [CodeGen] Add options for Clang to generate LoongArch-specific frecipe & frsqrte instructions (PR #109917)

2024-10-10 Thread Lu Weining via cfe-commits
@@ -5902,6 +5914,92 @@ Register LoongArchTargetLowering::getExceptionSelectorRegister( return LoongArch::R5; } +//===--===// +// Target Optimization Hooks +//===-

[clang] [llvm] [LoongArch] [CodeGen] Add options for Clang to generate LoongArch-specific frecipe & frsqrte instructions (PR #109917)

2024-10-10 Thread Lu Weining via cfe-commits
@@ -251,6 +251,16 @@ void loongarch::getLoongArchTargetFeatures(const Driver &D, } else /*-mno-lasx*/ Features.push_back("-lasx"); } + + // Select frecipe feature determined by -m[no-]frecipe. + if (const Arg *A = + Args.getLastArg(options::OPT_mfrecipe,

[clang] [Clang] fix overload resolution for object parameters with top-level cv-qualifiers in member functions (PR #110435)

2024-10-10 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/110435 >From c52634882631a71fad956a70179b480abf13006a Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 29 Sep 2024 22:01:38 +0300 Subject: [PATCH 1/3] [Clang] fix overload resolution for object parameters with

[clang] [llvm] [RISCV] Add support for inline asm constraint vd (PR #111653)

2024-10-10 Thread Jim Lin via cfe-commits
https://github.com/tclin914 updated https://github.com/llvm/llvm-project/pull/111653 >From 80768f580d4ef6b9841b22ee5b287a87d9f25951 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Wed, 9 Oct 2024 11:37:46 +0800 Subject: [PATCH 1/2] [RISCV] Add support for inline asm constraint vd It constrains ve

[clang] [clang-format] Make bitwise and imply requires clause (PR #110942)

2024-10-10 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/110942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Instantiate Typedefs referenced by type alias deduction guides (PR #111804)

2024-10-10 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/111804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0bc02b9 - [Clang] Instantiate Typedefs referenced by type alias deduction guides (#111804)

2024-10-10 Thread via cfe-commits
Author: Younan Zhang Date: 2024-10-11T10:31:27+08:00 New Revision: 0bc02b999a9686ba240b7a68d3f1cbbf037d2170 URL: https://github.com/llvm/llvm-project/commit/0bc02b999a9686ba240b7a68d3f1cbbf037d2170 DIFF: https://github.com/llvm/llvm-project/commit/0bc02b999a9686ba240b7a68d3f1cbbf037d2170.diff

[clang] [clang-format] Make bitwise and imply requires clause (PR #110942)

2024-10-10 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/110942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Make bitwise and imply requires clause (PR #110942)

2024-10-10 Thread Owen Pan via cfe-commits
@@ -1296,6 +1296,21 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { Tokens = annotate("bool x = t && requires(Foo x) { x.foo(); };"); ASSERT_EQ(Tokens.size(), 25u) << Tokens; EXPECT_TOKEN(Tokens[5], tok::kw_requires, TT_RequiresExpression); + + //

[clang] [clang-format] Make bitwise and imply requires clause (PR #110942)

2024-10-10 Thread Owen Pan via cfe-commits
@@ -1296,6 +1296,21 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { Tokens = annotate("bool x = t && requires(Foo x) { x.foo(); };"); ASSERT_EQ(Tokens.size(), 25u) << Tokens; EXPECT_TOKEN(Tokens[5], tok::kw_requires, TT_RequiresExpression); + + //

[clang] [clang-format] Make bitwise and imply requires clause (PR #110942)

2024-10-10 Thread Owen Pan via cfe-commits
@@ -1296,6 +1296,21 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { Tokens = annotate("bool x = t && requires(Foo x) { x.foo(); };"); ASSERT_EQ(Tokens.size(), 25u) << Tokens; EXPECT_TOKEN(Tokens[5], tok::kw_requires, TT_RequiresExpression); + + //

[clang] [RISCV] Implement Clang Builtins for XCVmac Extension in CV32E40P (PR #110623)

2024-10-10 Thread Paolo Savini via cfe-commits
@@ -0,0 +1,111 @@ +/*=== riscv_corev_mac.h - CORE-V multiply accumulate intrinsics === + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apac

[clang] [llvm] [Clang] Put offloading globals in the `.llvm.rodata.offloading` section (PR #111890)

2024-10-10 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: It looks reasonable to me. https://github.com/llvm/llvm-project/pull/111890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-10-10 Thread via cfe-commits
higher-performance wrote: @AaronBallman: Oh I see. I didn't have any plans to upstream any matchers that used this, though I suppose I could. The check I had in mind though ostensibly could be in-tree, if you guys were interested. Though now that I think about it more, I think it would need `i

[clang] [llvm] [RISCV] Add Smdbltrp and Ssdbltrp extension (PR #111837)

2024-10-10 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > Failed Tests (2): Clang :: Driver/print-supported-extensions-riscv.c Clang :: Preprocessor/riscv-target-features.c https://github.com/llvm/llvm-project/pull/111837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

2024-10-10 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/111203 >From f545a14e11556c91d10b14617e3588fe5eae6d42 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Fri, 4 Oct 2024 12:21:51 -0700 Subject: [PATCH 1/4] [HLSL] Collect explicit resource binding information (part 1)

[clang] [llvm] [RISCV] Add Smdbltrp and Ssdbltrp extension (PR #111837)

2024-10-10 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > > > > Personally I don't like to add a privileged extension if it doesn't > > > > introduce new CSRs/instructions. > > > > > > > > > I'd actually put that on the > > > [agenda](https://docs.google.com/document/d/1G3ocHm2zE6AYTS2N3_3w2UxFnSEyKkcF57siLWe-NVs/edit?tab=t.0) > > >

[clang] [NFC][clang] Fix typo in ReleaseNotes (PR #111930)

2024-10-10 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/111930 Fix a typo in ReleaseNotes that introduced by https://github.com/llvm/llvm-project/pull/86960. >From c874daa3829eefeaf8b329f58c3964e80c478f22 Mon Sep 17 00:00:00 2001 From: yronglin Date: Fri, 11 Oct 2024 08:

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-10 Thread Florian Mayer via cfe-commits
https://github.com/fmayer edited https://github.com/llvm/llvm-project/pull/111918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MTE] Apply alignment / size in linker rather than IR (PR #111918)

2024-10-10 Thread Florian Mayer via cfe-commits
https://github.com/fmayer edited https://github.com/llvm/llvm-project/pull/111918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Apply alignment / size in linker rather than IR (PR #111918)

2024-10-10 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 >From 3a962270521aa7b48b64e5ac5fa0edb900990023 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 10 Oct 2024 16:05:50 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

2024-10-10 Thread via cfe-commits
@@ -171,6 +171,9 @@ C++23 Feature Support ^ - Removed the restriction to literal types in constexpr functions in C++23 mode. +- Extend lifetime of temporaries in mem-default-init for P2718R0. Clang now fully + supported `P2718R0 Lifetime extension in ran

[clang] [llvm] [Clang] Put offloading globals in the `.llvm.rodata.offloading` section (PR #111890)

2024-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: For our offloading entries, we currently store all the string names of kernels that the runtime will need to load from the target executable. These are available via pointer in the `__tgt_offload_entr

[clang] [llvm] [Clang] Put offloading globals in the `.llvm.rodata.offloading` section (PR #111890)

2024-10-10 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/111890 >From db58755323a6538c7a65bbdc323c5718dbc89dcb Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 10 Oct 2024 13:42:22 -0500 Subject: [PATCH] [Clang] Put offloading globals in the `.llvm.rodata.offloading`

[clang] [llvm] Apply alignment / size in linker rather than IR (PR #111918)

2024-10-10 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 923566a67de39a00eb6fc5cabbad307a72aa338e 3a962270521aa7b48b64e5ac5fa0edb900990023 --e

[clang] [llvm] Apply alignment / size in linker rather than IR (PR #111918)

2024-10-10 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/111918 This greatly simplifies the code, and makes sure no optimizations are applied that assume the bigger alignment or size, which could be incorrect if we link together with non-instrumented code. >From 3a962270521a

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

2024-10-10 Thread via cfe-commits
@@ -171,6 +171,9 @@ C++23 Feature Support ^ - Removed the restriction to literal types in constexpr functions in C++23 mode. +- Extend lifetime of temporaries in mem-default-init for P2718R0. Clang now fully + supported `P2718R0 Lifetime extension in ran

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-10-10 Thread Keith Packard via cfe-commits
@@ -238,7 +236,8 @@ END_COMPILERRT_OUTLINE_FUNCTION(__arm_sc_memcpy) DEFINE_COMPILERRT_FUNCTION_ALIAS(__arm_sc_memmove, __arm_sc_memcpy) - +// This version uses FP registers. Use this only on targets with them +#if defined(__aarch64__) && __ARM_FP != 0 keith-

[clang] [llvm] [clang][llvm][SPIR-V] Explicitly encode native integer widths for SPIR-V (PR #110695)

2024-10-10 Thread Alex Voicu via cfe-commits
@@ -1,12 +1,14 @@ ; This test aims to check ability to support "Arithmetic with Overflow" intrinsics ; in the special case when those intrinsics are being generated by the CodeGenPrepare; -; pass during translations with optimization (note -O3 in llc arguments). +; pass during

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v4 (PR #108636)

2024-10-10 Thread Peilin Ye via cfe-commits
@@ -622,6 +665,47 @@ let Predicates = [BPFHasLdsx] in { def LDD : LOADi64; +class LOAD_ACQUIRE +: TYPE_LD_ST { + bits<4> dst; + bits<20> addr; + + let Inst{51-48} = dst; + let Inst{55-52} = addr{19-16}; // base reg + let Inst{47-32} = addr{15-0}; // offset + let Ins

[libcxx] [libcxxabi] [libunwind] [runtimes] Always define cxx_shared, cxx_static & other targets (PR #80007)

2024-10-10 Thread Paul Kirth via cfe-commits
@@ -264,19 +263,18 @@ if (LIBCXX_ENABLE_SHARED) APPEND_STRING PROPERTY LINK_FLAGS " -Xlinker /MANIFEST:NO") endif() endif() -endif() set(CMAKE_STATIC_LIBRARY_PREFIX "lib") # Build the static library. -if (LIBCXX_ENABLE_STATIC) - add_lib

[libcxx] [libcxxabi] [libunwind] [runtimes] Always define cxx_shared, cxx_static & other targets (PR #80007)

2024-10-10 Thread Paul Kirth via cfe-commits
@@ -264,19 +263,18 @@ if (LIBCXX_ENABLE_SHARED) APPEND_STRING PROPERTY LINK_FLAGS " -Xlinker /MANIFEST:NO") endif() endif() -endif() set(CMAKE_STATIC_LIBRARY_PREFIX "lib") # Build the static library. -if (LIBCXX_ENABLE_STATIC) - add_lib

[clang] Add arrangeCXXMethodCall to the CodeGenABITypes interface. (PR #111597)

2024-10-10 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. Thanks, that looks good. https://github.com/llvm/llvm-project/pull/111597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [libcxxabi] [libunwind] [runtimes] Always define cxx_shared, cxx_static & other targets (PR #80007)

2024-10-10 Thread Paul Kirth via cfe-commits
ilovepi wrote: > Also, this is another reminder that we would benefit from having Fuchsia > builders in the pre-commit CI. We've asked before and we'll keep asking until > we get them: Fuchsia is amongst the last platform that frequently reports > errors but doesn't provide us with any pre-com

[libcxx] [libcxxabi] [libunwind] [runtimes] Always define cxx_shared, cxx_static & other targets (PR #80007)

2024-10-10 Thread Paul Kirth via cfe-commits
ilovepi wrote: I think I understand what's happening, but not why. We don't normally build `cxx_shared` on Linux, but now we do. I'm not sure why that's causing a problem on this test per se, but we set `LIBCXX_ENABLE_SHARED=OFF` in our build files, so I'm surprised its happening now. In fact

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-10 Thread Justin Bogner via cfe-commits
bogner wrote: > > Despite all of this, DXC does indeed support 16- and 64-bit overloads, as > > seen here: https://hlsl.godbolt.org/z/qbc17xz35 > > Note that the return type of the operation is not overloaded - all of the > > overloads of this function return uint. > > Why is the return type n

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-10 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. Looks good once Chris's comments and the clang-format issue are resolved. https://github.com/llvm/llvm-project/pull/111010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] Enable matrices in HLSL (PR #111415)

2024-10-10 Thread Chris B via cfe-commits
@@ -17,12 +17,12 @@ void add(sx10x10_t a, sx5x10_t b, sx10x5_t c) { // expected-error@-1 {{assigning to 'sx10x10_t' (aka 'float __attribute__((matrix_type(10, 10)))') from incompatible type 'sx5x10_t' (aka 'float __attribute__((matrix_type(5, 10)))')}} a = b + &c; - //

[clang] Add arrangeCXXMethodCall to the CodeGenABITypes interface. (PR #111597)

2024-10-10 Thread Hiroshi Yamauchi via cfe-commits
https://github.com/hjyamauchi updated https://github.com/llvm/llvm-project/pull/111597 >From 98f58ce20a610388fd38bac2864b4e8afcf1b463 Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi Date: Thu, 10 Oct 2024 13:50:01 -0700 Subject: [PATCH] Add arrangeCXXMethodCall to the CodeGenABITypes interface.

[clang] Enable matrices in HLSL (PR #111415)

2024-10-10 Thread Greg Roth via cfe-commits
@@ -17,12 +17,12 @@ void add(sx10x10_t a, sx5x10_t b, sx10x5_t c) { // expected-error@-1 {{assigning to 'sx10x10_t' (aka 'float __attribute__((matrix_type(10, 10)))') from incompatible type 'sx5x10_t' (aka 'float __attribute__((matrix_type(5, 10)))')}} a = b + &c; - //

[clang] [compiler-rt] [libcxx] [llvm] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)

2024-10-10 Thread via cfe-commits
@@ -102,7 +102,7 @@ struct __aliasing_iterator_wrapper { _LIBCPP_HIDE_FROM_ABI _Alias operator*() const _NOEXCEPT { _Alias __val; - __builtin_memcpy(&__val, std::__to_address(__base_), sizeof(value_type)); + __builtin_memcpy(&__val, static_cast(std::__to_ad

[clang] Enable matrices in HLSL (PR #111415)

2024-10-10 Thread Greg Roth via cfe-commits
@@ -852,34 +852,50 @@ void TypePrinter::printExtVectorAfter(const ExtVectorType *T, raw_ostream &OS) { void TypePrinter::printConstantMatrixBefore(const ConstantMatrixType *T, raw_ostream &OS) { + if (Policy.UseHLSLTypes) +OS <

[clang] Enable matrices in HLSL (PR #111415)

2024-10-10 Thread Greg Roth via cfe-commits
@@ -1381,7 +1381,7 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target, if (LangOpts.OpenACC && !LangOpts.OpenMP) { InitBuiltinType(ArraySectionTy, BuiltinType::ArraySection); } - if (LangOpts.MatrixTypes) + if (LangOpts.MatrixTypes || LangOpts.HLSL) --

[clang-tools-extra] [clang-tidy] support `return c ? a : b;` in bugprone-return-const-ref-from-parameter (PR #107657)

2024-10-10 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/107657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support `return c ? a : b;` in bugprone-return-const-ref-from-parameter (PR #107657)

2024-10-10 Thread Julian Schmidt via cfe-commits
@@ -15,20 +16,24 @@ using namespace clang::ast_matchers; namespace clang::tidy::bugprone { void ReturnConstRefFromParameterCheck::registerMatchers(MatchFinder *Finder) { - Finder->addMatcher( - returnStmt( - hasReturnValue(declRefExpr( - to(parmVarD

[clang-tools-extra] [clang-tidy] support `return c ? a : b;` in bugprone-return-const-ref-from-parameter (PR #107657)

2024-10-10 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/107657 >From b00b02b3d92a88fcf7d688b39d52e74e59f76ecd Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 7 Sep 2024 01:54:38 +0200 Subject: [PATCH 1/3] [clang-tidy] support `return c ? a : b;` in bugprone-retur

[clang] Enable matrices in HLSL (PR #111415)

2024-10-10 Thread Greg Roth via cfe-commits
https://github.com/pow2clk edited https://github.com/llvm/llvm-project/pull/111415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable matrices in HLSL (PR #111415)

2024-10-10 Thread Greg Roth via cfe-commits
https://github.com/pow2clk edited https://github.com/llvm/llvm-project/pull/111415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable matrices in HLSL (PR #111415)

2024-10-10 Thread Greg Roth via cfe-commits
@@ -17,12 +17,12 @@ void add(sx10x10_t a, sx5x10_t b, sx10x5_t c) { // expected-error@-1 {{assigning to 'sx10x10_t' (aka 'float __attribute__((matrix_type(10, 10)))') from incompatible type 'sx5x10_t' (aka 'float __attribute__((matrix_type(5, 10)))')}} a = b + &c; - //

[clang] Add arrangeCXXMethodCall to the CodeGenABITypes interface. (PR #111597)

2024-10-10 Thread Hiroshi Yamauchi via cfe-commits
@@ -75,6 +75,12 @@ const CGFunctionInfo &arrangeCXXMethodType(CodeGenModule &CGM, const FunctionProtoType *FTP, const CXXMethodDecl *MD); +const CGFunctionInfo &arrangeCXXMethodCall(CodeGenM

[clang] Add arrangeCXXMethodCall to the CodeGenABITypes interface. (PR #111597)

2024-10-10 Thread Hiroshi Yamauchi via cfe-commits
https://github.com/hjyamauchi updated https://github.com/llvm/llvm-project/pull/111597 >From 1c7101f579c4eb65773d8af7bdd7a3b37247f554 Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi Date: Thu, 10 Oct 2024 13:50:01 -0700 Subject: [PATCH] Add arrangeCXXMethodCall to the CodeGenABITypes interface.

[clang] [-Wunsafe-buffer-usage] Emit a warning if pointer returned by vector::data and array::data is cast to larger type (PR #111910)

2024-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Malavika Samak (malavikasamak) Changes Emit a warning when the raw pointer retrieved from std::vector and std::array instances are cast to a larger type. Such a cast followed by a field dereference to the resulting pointer could cause an

[clang] [-Wunsafe-buffer-usage] Emit a warning if pointer returned by vector::data and array::data is cast to larger type (PR #111910)

2024-10-10 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak created https://github.com/llvm/llvm-project/pull/111910 Emit a warning when the raw pointer retrieved from std::vector and std::array instances are cast to a larger type. Such a cast followed by a field dereference to the resulting pointer could cause an OOB a

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

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

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-10-10 Thread Shilei Tian via cfe-commits
@@ -439,6 +439,26 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { indicatePessimisticFixpoint(); return; } + +SmallPtrSet VisitedConsts; + +for (Instruction &I : instructions(F)) { shiltian wrote: I don't think it is genera

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Adam Yang (adam-yang) Changes partially fixes #70103 ### Changes * Implemented `GroupMemoryBarrierWithGroupSync` clang builtin * Linked `GroupMemoryBarrierWithGroupSync` clang builtin with `hlsl_intrinsics.h` * Added sema checks for `Gro

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Adam Yang (adam-yang) Changes partially fixes #70103 ### Changes * Implemented `GroupMemoryBarrierWithGroupSync` clang builtin * Linked `GroupMemoryBarrierWithGroupSync` clang builtin with `hlsl_intrinsics.h` * Added sema checks fo

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits
https://github.com/adam-yang ready_for_review https://github.com/llvm/llvm-project/pull/111883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang & libcxx] constexpr pointer tagging (DO NOT MERGE) (PR #111861)

2024-10-10 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/111861 From e1c8d5e689fe8d3d0338eb64220aaf6371aed48a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Thu, 10 Oct 2024 21:05:55 +0200 Subject: [PATCH 1/2] [clang & libcxx] constexpr point

[clang] [ItaniumCXXABI] Mark RTTI type name as global unnamed_addr (PR #111343)

2024-10-10 Thread Richard Smith via cfe-commits
zygoloid wrote: @luxufan I think we may need changes on the LLVM side before we can make progress here -- either to clarify what `unnamed_addr` is intended to mean, or perhaps to split it into separate attributes for cloning and merging. But before we go down that path, this PR doesn't describ

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-10 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 a4916d200518ac077be93995af18bd80fcb89cc2 49edfec7f8d2fb84144ef903bc5db3ab2099a1ae --e

[clang] [llvm] [SystemZ][z/OS] Add new openFileForReadBinary function, and pass IsText parameter to getBufferForFile (PR #111723)

2024-10-10 Thread Abhina Sree via cfe-commits
@@ -54,7 +54,9 @@ std::unique_ptr HeaderMap::Create(FileEntryRef FE, FileManager &FM) { unsigned FileSize = FE.getSize(); if (FileSize <= sizeof(HMapHeader)) return nullptr; - auto FileBuffer = FM.getBufferForFile(FE); + auto FileBuffer = + FM.getBufferForFile(FE,

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-10 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/111010 >From 70089645ec5cf62b491a56df96ec46f4328fbc11 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Thu, 3 Oct 2024 11:43:51 -0700 Subject: [PATCH 01/11] [HLSL] Implement `WaveReadLaneAt` intrinsic - create a

[clang] [ItaniumCXXABI] Mark RTTI type name as global unnamed_addr (PR #111343)

2024-10-10 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Oh... GlobalValue::canBeOmittedFromSymbolTable is a rabbit-hole I didn't know existed. Apparently I don't know how unnamed_addr works. (canBeOmittedFromSymbolTable is completely inconsistent with the way everything else in the compiler reasons about unnamed_addr.) https

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits
https://github.com/adam-yang edited https://github.com/llvm/llvm-project/pull/111883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits
https://github.com/adam-yang edited https://github.com/llvm/llvm-project/pull/111883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits
https://github.com/adam-yang edited https://github.com/llvm/llvm-project/pull/111883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits
https://github.com/adam-yang edited https://github.com/llvm/llvm-project/pull/111883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/111027 >From 21dc8df292d85b7f48f75ea2a707be6c4971e2f9 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Thu, 3 Oct 2024 09:41:08 -0700 Subject: [PATCH 1/3] Turn Wdeprecated-literal-operator on by default It would be

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-10 Thread Erich Keane via cfe-commits
erichkeane wrote: > LGTM, please keep an eye out for fallout in the wild though. It may be > interesting to see how many instances of `-Wno-deprecated-literal-operator` > exist now and do a search again before release to see how many new instances > show up. Thats a good idea! I did our init

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/111027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/111883 >From 0f97b92617dcadd78362f24f3ef0719c19f6f3f6 Mon Sep 17 00:00:00 2001 From: Adam Yang Date: Thu, 10 Oct 2024 10:20:37 -0700 Subject: [PATCH 1/3] Added the intrinsic to clang --- clang/include/clang/Basic/B

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, please keep an eye out for fallout in the wild though. It may be interesting to see how many instances of `-Wno-deprecated-literal-operator` exist now and do a search again before release to see how many new instances show up.

[clang] [libcxx] [clang & libcxx] constexpr pointer tagging (DO NOT MERGE) (PR #111861)

2024-10-10 Thread Hana Dusíková via cfe-commits
hanickadot wrote: > Hmm, so needs to somehow allow accessing bits that aren't low bits? yes, for example upper byte on aarch64 > As a general comment not specific to this patch, I'd prefer to build around > llvm.ptrmask and geps as much as possible, as opposed to relying on ptrtoint. I 100% a

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-10 Thread Aaron Ballman via cfe-commits
@@ -503,17 +503,16 @@ bool Sema::checkLiteralOperatorId(const CXXScopeSpec &SS, const IdentifierInfo *II = Name.Identifier; ReservedIdentifierStatus Status = II->isReserved(PP.getLangOpts()); SourceLocation Loc = Name.getEndLoc(); -if (!PP.getSourceManager().isI

[clang] [ItaniumCXXABI] Mark RTTI type name as global unnamed_addr (PR #111343)

2024-10-10 Thread Richard Smith via cfe-commits
zygoloid wrote: > unnamed_addr doesn't allow cloning; there's no way to make it work in a > reasonable way even if we wanted it. See, for example, #32127 . OK. The LangRef is very vague on its semantics, would be nice to get that clarified by someone who knows the intent. Is the same true for

[clang] [libcxx] [clang & libcxx] constexpr pointer tagging (DO NOT MERGE) (PR #111861)

2024-10-10 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > Intention is to allow to use any bits in pointer for tagging and give freedom Hmm, so needs to somehow allow accessing bits that aren't low bits? As a general comment not specific to this patch, I'd prefer to build around llvm.ptrmask and geps as much as possible, as opp

  1   2   3   4   5   >