[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-10 Thread Erich Keane via cfe-commits
@@ -3,6 +3,14 @@ // RUN: %clang_cc1 -std=c++11 -fms-extensions -verify=ref %s // RUN: %clang_cc1 -std=c++20 -fms-extensions -verify=ref %s + +constexpr _BitInt(2) A = 0; +constexpr _BitInt(2) B = A + 1; +constexpr _BitInt(2) C = B + 1; // expected-warning {{from 2 to -2}} \ --

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Canonicalise ADD+GEP

2023-10-10 Thread Dmitriy Smirnov via Phabricator via cfe-commits
d-smirnov added a comment. We have some improvements with the patch, most notable: 549.fotonik_3d improves about 6%. @nikic Should we revert the patch and try another location for it (in LICM pass, as you previously suggested)? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] [clang][C2x] Remove confusing diagnostic auto storage class specifier in C23 (PR #68710)

2023-10-10 Thread Guillot Tony via cfe-commits
https://github.com/to268 created https://github.com/llvm/llvm-project/pull/68710 When declaring `auto int` at local or file scope, we emit a warning intended for C++11 and later, which is incorrect and confusing in C23. See [Godbolt example](https://godbolt.org/z/j1acGhecd). Now this diagnostic

[clang] [HIP] Document func ptr and virtual func (PR #68126)

2023-10-10 Thread Siu Chi Chan via cfe-commits
@@ -176,3 +176,95 @@ Predefined Macros * - ``HIP_API_PER_THREAD_DEFAULT_STREAM`` - Alias to ``__HIP_API_PER_THREAD_DEFAULT_STREAM__``. Deprecated. +Compilation Modes += + +Each HIP source file contains intertwined device and host code. Depending on the

[clang] [clang][C2x] Remove confusing diagnostic auto storage class specifier in C23 (PR #68710)

2023-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Guillot Tony (to268) Changes When declaring `auto int` at local or file scope, we emit a warning intended for C++11 and later, which is incorrect and confusing in C23. See [Godbolt example](https://godbolt.org/z/j1acGhecd). Now this diagno

[clang] WIP: [flang] Enable fir alias tags pass by default when optimizing for speed (PR #68597)

2023-10-10 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/68597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] WIP: [flang] Enable fir alias tags pass by default when optimizing for speed (PR #68597)

2023-10-10 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/68597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][C2x] Remove confusing diagnostic auto storage class specifier (PR #68710)

2023-10-10 Thread Guillot Tony via cfe-commits
https://github.com/to268 edited https://github.com/llvm/llvm-project/pull/68710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-10 Thread Sam Tebbs via cfe-commits
@@ -44,10 +44,9 @@ defm SVLD1_ZA32 : ZALoad<"za32", "i", "aarch64_sme_ld1w", [ImmCheck<0, ImmCheck0 defm SVLD1_ZA64 : ZALoad<"za64", "l", "aarch64_sme_ld1d", [ImmCheck<0, ImmCheck0_7>]>; defm SVLD1_ZA128 : ZALoad<"za128", "q", "aarch64_sme_ld1q", [ImmCheck<0, ImmCheck0_15>]>;

[clang] [HIP] Document func ptr and virtual func (PR #68126)

2023-10-10 Thread Yaxun Liu via cfe-commits
@@ -176,3 +176,95 @@ Predefined Macros * - ``HIP_API_PER_THREAD_DEFAULT_STREAM`` - Alias to ``__HIP_API_PER_THREAD_DEFAULT_STREAM__``. Deprecated. +Compilation Modes += + +Each HIP source file contains intertwined device and host code. Depending on the

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -5987,4 +6018,204 @@ TEST(TransferTest, EvaluateBlockWithUnreachablePreds) { ASTContext &ASTCtx) {}); } +TEST(TransferTest, LambdaCaptureByCopy) { + std::string Code = R"( +void target(int Foo, int Bar) { + [Foo]() { +(void)0; +// [[p]] +

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand requested changes to this pull request. https://github.com/llvm/llvm-project/pull/68558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/68558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -3214,6 +3220,117 @@ TEST_P(UncheckedOptionalAccessTest, Bitfield) { } )"); } + +TEST_P(UncheckedOptionalAccessTest, Lambda) { ymand wrote: Please split these into individual tests. https://github.com/llvm/llvm-project/pull/68558

[PATCH] D155850: [HIP][Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-10-10 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 557673. AlexVlx added a comment. Use unmangled names in test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ https://reviews.llvm.org/D155850 Files: clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGe

[clang-tools-extra] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/68510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -180,3 +180,44 @@ void std_forward_rvalue_ref_safe(absl::optional&& opt) { std::forward>(opt).value(); } + +namespace std { + +template +class optional { +public: + template + optional& operator=(const U &u){ + data = u; + } +private: + T dat

[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -180,3 +180,44 @@ void std_forward_rvalue_ref_safe(absl::optional&& opt) { std::forward>(opt).value(); } + +namespace std { + +template +class optional { +public: + template + optional& operator=(const U &u){ + data = u; + } +private: + T dat

[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -180,3 +180,44 @@ void std_forward_rvalue_ref_safe(absl::optional&& opt) { std::forward>(opt).value(); } + +namespace std { + +template +class optional { +public: + template + optional& operator=(const U &u){ ymand wrote: The issue isn't specifi

[clang-tools-extra] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -180,3 +180,44 @@ void std_forward_rvalue_ref_safe(absl::optional&& opt) { std::forward>(opt).value(); } + +namespace std { + +template +class optional { +public: + template + optional& operator=(const U &u){ + data = u; + } +private: + T dat

[clang-tools-extra] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand requested changes to this pull request. Thanks for this fix! Unfortunately, I wasn't able to repro the crash in godbolt: https://godbolt.org/z/s741z5djY. Can you double check that the check crashes on that example without your fix? https://github.com/llvm/llvm-project

[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -180,3 +180,44 @@ void std_forward_rvalue_ref_safe(absl::optional&& opt) { std::forward>(opt).value(); } + +namespace std { + +template +class optional { +public: + template + optional& operator=(const U &u){ + data = u; + } +private: + T dat

[clang-tools-extra] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Yitzhak Mandelbaum via cfe-commits
@@ -180,3 +180,44 @@ void std_forward_rvalue_ref_safe(absl::optional&& opt) { std::forward>(opt).value(); } + +namespace std { + +template +class optional { +public: + template + optional& operator=(const U &u){ + data = u; + } +private: + T dat

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Canonicalise ADD+GEP

2023-10-10 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. In D155688#4653520 , @fiigii wrote: >> The reverse transform is only done if A + B simplifies. > > Looks like`simplifyAddInst` may give add expressions, so I guess this patch > may make IC run into infinite loops. simplifyAddInst

[clang] [flang][openacc] Support assumed shape array in firstprivate recipe (PR #68640)

2023-10-10 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval updated https://github.com/llvm/llvm-project/pull/68640 >From 8459381299602a80b26ea44b5d099f59b0169ba3 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Mon, 9 Oct 2023 15:00:12 -0700 Subject: [PATCH] [flang][openacc] Support assumed shape array in firstprivate

[clang] [AMDGPU] Remove Code Object V3 (PR #67118)

2023-10-10 Thread Konstantin Zhuravlyov via cfe-commits
https://github.com/kzhuravl approved this pull request. This LGTM. But wait a couple of days to see if @arsenm or @yxsamliu have any objections? https://github.com/llvm/llvm-project/pull/67118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D145262: [clang-format] Treat AttributeMacros more like __attribute__

2023-10-10 Thread Jared Grubb via Phabricator via cfe-commits
jaredgrubb updated this revision to Diff 557674. jaredgrubb added a comment. Addressed review feedback from Oct2 (@owenpan). A new issue on Github was opened for this enhancement (https://github.com/llvm/llvm-project/issues/68722) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145262/new

[clang] [AMDGPU] Use 32-bit SGPR during save/restore of SCC (PR #68367)

2023-10-10 Thread Sirish Pande via cfe-commits
https://github.com/srpande updated https://github.com/llvm/llvm-project/pull/68367 >From a76a360c1d7fa0860944b6bfcb65ab3405c7b4c6 Mon Sep 17 00:00:00 2001 From: Sirish Pande Date: Thu, 28 Sep 2023 11:39:32 -0500 Subject: [PATCH 1/2] [AMDGPU] Save/Restore SCC bit across waterfall loop. Waterfal

[clang-tools-extra] [AMDGPU] Use 32-bit SGPR during save/restore of SCC (PR #68367)

2023-10-10 Thread Sirish Pande via cfe-commits
https://github.com/srpande updated https://github.com/llvm/llvm-project/pull/68367 >From a76a360c1d7fa0860944b6bfcb65ab3405c7b4c6 Mon Sep 17 00:00:00 2001 From: Sirish Pande Date: Thu, 28 Sep 2023 11:39:32 -0500 Subject: [PATCH 1/2] [AMDGPU] Save/Restore SCC bit across waterfall loop. Waterfal

[clang] [AMDGPU] Use 32-bit SGPR o save/restore of SCC (PR #68367)

2023-10-10 Thread Sirish Pande via cfe-commits
https://github.com/srpande edited https://github.com/llvm/llvm-project/pull/68367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [AMDGPU] Use 32-bit SGPR o save/restore of SCC (PR #68367)

2023-10-10 Thread Sirish Pande via cfe-commits
https://github.com/srpande edited https://github.com/llvm/llvm-project/pull/68367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] add tbaa tags to global variables (PR #68727)

2023-10-10 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/68727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Add flags controlling whether to run the fir alias tags pass (PR #68595)

2023-10-10 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/68595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] add tbaa tags to global variables (PR #68727)

2023-10-10 Thread Renaud Kauffmann via cfe-commits
@@ -406,7 +406,7 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v) { attributes.set(Attribute::Pointer); } - if (type == SourceKind::Global) + if (type == SourceKind::Global || type == SourceKind::Direct) Renaud-K wrote: We also

[libunwind] [libunwind][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)

2023-10-10 Thread Louis Dionne via cfe-commits
ldionne wrote: This would look good to me, but we seem to be failing the Windows tests! https://github.com/llvm/llvm-project/pull/67201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][test] Avoid calling back into libunwind on sanitizer errors (PR #67861)

2023-10-10 Thread Louis Dionne via cfe-commits
ldionne wrote: What is the nested MSAN fault? Wouldn't fixing that be a better way to handle the situation? https://github.com/llvm/llvm-project/pull/67861 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-10-10 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/67860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-10-10 Thread Louis Dionne via cfe-commits
https://github.com/ldionne requested changes to this pull request. https://github.com/llvm/llvm-project/pull/67860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-10-10 Thread Louis Dionne via cfe-commits
@@ -621,6 +621,9 @@ inline bool LocalAddressSpace::findUnwindSections(pint_t targetAddr, } // Try to find the unwind info using `dl_find_object` dl_find_object findResult; + // _dl_find_object should fully initialize this struct, but we zero it to + // be safe in case

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-10-10 Thread Louis Dionne via cfe-commits
@@ -115,6 +121,18 @@ extern int unw_set_reg(unw_cursor_t *, unw_regnum_t, unw_word_t) LIBUNWIND_AVAIL extern int unw_set_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t) LIBUNWIND_AVAIL; extern int unw_resume(unw_cursor_t *) LIBUNWIND_AVAIL; +#ifdef LIBUNWIND_HAVE_MSAN +//

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-10 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/66769 >From c62e0c4f263cfb46b74931d9ae5962116faf427f Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Tue, 19 Sep 2023 13:42:16 +0100 Subject: [PATCH] [APINotes] Upstream APINotesReader This upstreams more of the Cla

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-10 Thread Egor Zhdan via cfe-commits
@@ -0,0 +1,202 @@ +//===--- APINotesReader.h - API Notes Reader *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-10 Thread Egor Zhdan via cfe-commits
@@ -0,0 +1,202 @@ +//===--- APINotesReader.h - API Notes Reader *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-10 Thread Egor Zhdan via cfe-commits
@@ -0,0 +1,202 @@ +//===--- APINotesReader.h - API Notes Reader *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-10 Thread Egor Zhdan via cfe-commits
@@ -0,0 +1,202 @@ +//===--- APINotesReader.h - API Notes Reader *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-10 Thread Egor Zhdan via cfe-commits
@@ -0,0 +1,202 @@ +//===--- APINotesReader.h - API Notes Reader *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-10 Thread Egor Zhdan via cfe-commits
@@ -0,0 +1,2001 @@ +//===--- APINotesReader.cpp - API Notes Reader --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-10 Thread Egor Zhdan via cfe-commits
@@ -0,0 +1,2001 @@ +//===--- APINotesReader.cpp - API Notes Reader --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-10 Thread Egor Zhdan via cfe-commits
@@ -0,0 +1,2001 @@ +//===--- APINotesReader.cpp - API Notes Reader --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-10 Thread Egor Zhdan via cfe-commits
@@ -0,0 +1,2001 @@ +//===--- APINotesReader.cpp - API Notes Reader --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-10 Thread Egor Zhdan via cfe-commits
@@ -0,0 +1,2001 @@ +//===--- APINotesReader.cpp - API Notes Reader --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-10 Thread Egor Zhdan via cfe-commits
@@ -0,0 +1,2001 @@ +//===--- APINotesReader.cpp - API Notes Reader --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-10 Thread Egor Zhdan via cfe-commits
@@ -0,0 +1,2001 @@ +//===--- APINotesReader.cpp - API Notes Reader --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[PATCH] D145214: [TSAN] add support for riscv64

2023-10-10 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment. @alexfanqi can you please upload the file (tsan_rtl_riscv64.S) with the patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145214/new/ https://reviews.llvm.org/D145214 ___ cf

[clang] [analyzer] Compute length of string literal initializers (#66990) (PR #68368)

2023-10-10 Thread via cfe-commits
https://github.com/luamfb updated https://github.com/llvm/llvm-project/pull/68368 >From 1f0249fdb0cf7b1799eb9e532bfbb4a3ffe983b0 Mon Sep 17 00:00:00 2001 From: luamfb Date: Thu, 5 Oct 2023 21:50:10 -0300 Subject: [PATCH 1/3] [analyzer] Compute length of string literal initializers (#66990) --

[clang] [flang] Add flags controlling whether to run the fir alias tags pass (PR #68595)

2023-10-10 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Does `falias-analysis` control the existing TBAA generation as well? https://github.com/llvm/llvm-project/pull/68595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang-tools-extra] [RISCV][GlobalISel] Select G_PTR_ADD (PR #67605)

2023-10-10 Thread Nitin John Raj via cfe-commits
https://github.com/nitinjohnraj updated https://github.com/llvm/llvm-project/pull/67605 >From eef2a293d346c05d7fceaa241c0f8489c37e6dea Mon Sep 17 00:00:00 2001 From: Nitin John Raj Date: Thu, 21 Sep 2023 10:41:50 -0700 Subject: [PATCH 1/3] [RISCV][GlobalISel] Select G_PTR_ADD --- .../RISCV/GI

[clang] [RISCV][GlobalISel] Select G_PTR_ADD (PR #67605)

2023-10-10 Thread Nitin John Raj via cfe-commits
https://github.com/nitinjohnraj updated https://github.com/llvm/llvm-project/pull/67605 >From eef2a293d346c05d7fceaa241c0f8489c37e6dea Mon Sep 17 00:00:00 2001 From: Nitin John Raj Date: Thu, 21 Sep 2023 10:41:50 -0700 Subject: [PATCH 1/3] [RISCV][GlobalISel] Select G_PTR_ADD --- .../RISCV/GI

[PATCH] D158266: [OpenMP] Patch for Support to loop bind clause : Checking Parent Region

2023-10-10 Thread Sunil K via Phabricator via cfe-commits
koops added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:6181-6190 + checkNestingOfRegions(*this, DSAStack, Kind, DirName, CancelRegion, +BindKind, StartLoc); Kind = OMPD_for; DSAStack->setCurrentDirective(OMPD_for);

[clang-tools-extra] [RISCV][GlobalISel] Select G_PTR_ADD (PR #67605)

2023-10-10 Thread Nitin John Raj via cfe-commits
https://github.com/nitinjohnraj closed https://github.com/llvm/llvm-project/pull/67605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV][GlobalISel] Select G_PTR_ADD (PR #67605)

2023-10-10 Thread Nitin John Raj via cfe-commits
https://github.com/nitinjohnraj closed https://github.com/llvm/llvm-project/pull/67605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-10 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68069 >From ae2201c2bb82ae26030800c62b3a0f93e2ec49a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Oct 2023 08:35:57 +0200 Subject: [PATCH

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-10 Thread Erich Keane via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/68069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [LTO] A static relocation model can override the PIC level wrt treating external address as directly accessible (PR #65512)

2023-10-10 Thread Wolfgang Pieb via cfe-commits
wolfy1961 wrote: Ping ... https://github.com/llvm/llvm-project/pull/65512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)

2023-10-10 Thread Timm Baeder via cfe-commits
@@ -1437,7 +1437,7 @@ bool OffsetHelper(InterpState &S, CodePtr OpPC, const T &Offset, return false; }; - unsigned MaxOffset = MaxIndex - Ptr.getIndex(); + T MaxOffset = T::from(MaxIndex - Ptr.getIndex(), Offset.bitWidth()); tbaederr wrote: Dunno, We

[clang] [analyzer] Compute length of string literal initializers (#66990) (PR #68368)

2023-10-10 Thread via cfe-commits
luamfb wrote: I've added that test as well. In this case too I've assumed the correct behavior is for the comparison's result to be unknown, because the length of the string can be changed later by assigning a null character somewhere in the middle of the string, say, `char a[] = "abcd"; a[1]

[clang-tools-extra] [libcxx] Allow string to use SSO in constant evaluation. (PR #66576)

2023-10-10 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. Thanks a lot for working on this @jyknight! https://github.com/llvm/llvm-project/pull/66576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang-tools-extra] [libcxx] Allow string to use SSO in constant evaluation. (PR #66576)

2023-10-10 Thread Louis Dionne via cfe-commits
ldionne wrote: I'm merging now since it looks like everyone's happy with the PR and there are no outstanding comments. https://github.com/llvm/llvm-project/pull/66576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [libcxx] Allow string to use SSO in constant evaluation. (PR #66576)

2023-10-10 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/66576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libcxx] Allow string to use SSO in constant evaluation. (PR #66576)

2023-10-10 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/66576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D158266: [OpenMP] Patch for Support to loop bind clause : Checking Parent Region

2023-10-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:6181-6190 + checkNestingOfRegions(*this, DSAStack, Kind, DirName, CancelRegion, +BindKind, StartLoc); Kind = OMPD_for; DSAStack->setCurrentDirective(OMPD_for);

[clang] [TSAN] add support for riscv64 (PR #68735)

2023-10-10 Thread via cfe-commits
https://github.com/hiraditya created https://github.com/llvm/llvm-project/pull/68735 Implements for sv39 and sv48 VMA layout. Userspace only has access to the bottom half of vma range. The top half is used by kernel. There is no dedicated vsyscall or heap segment. PIE program is allocated to s

[clang-tools-extra] 135f57d - [clang-tidy][Doc][NFC] Regenerate list.rst & clang-analyzer doc

2023-10-10 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-10-10T18:37:35Z New Revision: 135f57d179977136f920f8c975bb4b6ca056ec66 URL: https://github.com/llvm/llvm-project/commit/135f57d179977136f920f8c975bb4b6ca056ec66 DIFF: https://github.com/llvm/llvm-project/commit/135f57d179977136f920f8c975bb4b6ca056ec66.diff LOG: [

[PATCH] D145214: [TSAN] add support for riscv64

2023-10-10 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment. nvm i found the file in one of the previous commits. https://github.com/llvm/llvm-project/pull/68735 for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145214/new/ https://reviews.llvm.org/D145214 ___

[clang] [TSAN] add support for riscv64 (PR #68735)

2023-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: AdityaK (hiraditya) Changes Implements for sv39 and sv48 VMA layout. Userspace only has access to the bottom half of vma range. The top half is used by kernel. There is no dedicated vsyscall or heap segment. PIE program is allocated to st

[clang] [TSAN] add support for riscv64 (PR #68735)

2023-10-10 Thread via cfe-commits
https://github.com/hiraditya edited https://github.com/llvm/llvm-project/pull/68735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TSAN] add support for riscv64 (PR #68735)

2023-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 08545e85167a105b8147d76a48a2fa1eac0f9e9a 512ba7677b5b6656fab25f5c2b31a1ef203d9756 --

[clang-tools-extra] [RISCV][GlobalISel] Select G_FRAME_INDEX (PR #68254)

2023-10-10 Thread Nitin John Raj via cfe-commits
https://github.com/nitinjohnraj updated https://github.com/llvm/llvm-project/pull/68254 >From 7a21ee374f2762d0b3b8a68b25be6ac1a71f3cfd Mon Sep 17 00:00:00 2001 From: Nitin John Raj Date: Tue, 3 Oct 2023 09:40:22 -0700 Subject: [PATCH 1/5] [RISCV][GlobalISel] Select G_FRAME_INDEX --- .../RISCV

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-10 Thread Alexei Starovoitov via Phabricator via cfe-commits
ast added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3791 + if (hasBPFPreserveStaticOffset(Base)) +addr = wrapWithBPFPreserveStaticOffset(CGF, addr); + If I'm reading this correctly wrapping with preserve_static_offset doesn't prevent further

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-10 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 marked an inline comment as done. eddyz87 added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3791 + if (hasBPFPreserveStaticOffset(Base)) +addr = wrapWithBPFPreserveStaticOffset(CGF, addr); + ast wrote: > If I'm reading this correctly wr

[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

2023-10-10 Thread Stefan Pintilie via cfe-commits
@@ -828,10 +829,7 @@ const TargetInfo::AddlRegName GCCAddlRegNames[] = { }; ArrayRef PPCTargetInfo::getGCCAddlRegNames() const { - if (ABI == "elfv2") -return llvm::ArrayRef(GCCAddlRegNames); - else -return TargetInfo::getGCCAddlRegNames(); + return llvm::ArrayRef(G

[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

2023-10-10 Thread Hubert Tong via cfe-commits
@@ -807,7 +807,7 @@ ArrayRef PPCTargetInfo::getGCCRegAliases() const { // PPC ELFABIv2 DWARF Definitoin "Table 2.26. Mappings of Common Registers". // vs0 ~ vs31 is mapping to 32 - 63, // vs32 ~ vs63 is mapping to 77 - 108. hubert-reinterpretcast wrote: > To

[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

2023-10-10 Thread Hubert Tong via cfe-commits
@@ -828,10 +829,7 @@ const TargetInfo::AddlRegName GCCAddlRegNames[] = { }; ArrayRef PPCTargetInfo::getGCCAddlRegNames() const { - if (ABI == "elfv2") -return llvm::ArrayRef(GCCAddlRegNames); - else -return TargetInfo::getGCCAddlRegNames(); + return llvm::ArrayRef(G

[clang] [analyzer] Compute length of string literal initializers (#66990) (PR #68368)

2023-10-10 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/68368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Compute length of string literal initializers (#66990) (PR #68368)

2023-10-10 Thread via cfe-commits
luamfb wrote: By the way, I don't think I can merge this PR myself, maybe because I don't have write access to the repository. (At least, I see no "Squash and Merge" button anywhere.) https://github.com/llvm/llvm-project/pull/68368 ___ cfe-commits ma

[clang-tools-extra] [clang-tidy] Add check to flag objects hostile to suspension in a coroutine (PR #68738)

2023-10-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/68738 None >From f9e29053a7a8fd8222cfbdf579776fafd6564b89 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 10 Oct 2023 21:53:37 +0200 Subject: [PATCH] [clang-tidy] Add check to flag objects hostile to suspension

[clang] [AMDGPU] Use 32-bit SGPR to save/restore of SCC (PR #68367)

2023-10-10 Thread Sirish Pande via cfe-commits
https://github.com/srpande edited https://github.com/llvm/llvm-project/pull/68367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [AMDGPU] Use 32-bit SGPR to save/restore of SCC (PR #68367)

2023-10-10 Thread Sirish Pande via cfe-commits
https://github.com/srpande edited https://github.com/llvm/llvm-project/pull/68367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-10 Thread Alexei Starovoitov via Phabricator via cfe-commits
ast added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3791 + if (hasBPFPreserveStaticOffset(Base)) +addr = wrapWithBPFPreserveStaticOffset(CGF, addr); + eddyz87 wrote: > ast wrote: > > If I'm reading this correctly wrapping with preserve_static

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-10 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3791 + if (hasBPFPreserveStaticOffset(Base)) +addr = wrapWithBPFPreserveStaticOffset(CGF, addr); + ast wrote: > eddyz87 wrote: > > ast wrote: > > > If I'm reading this correctly wrapping

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-10 Thread Alexei Starovoitov via Phabricator via cfe-commits
ast accepted this revision. ast added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3791 + if (hasBPFPreserveStaticOffset(Base)) +addr = wrapWithBPFPreserveStaticOffset(CGF, addr); + eddyz87 wrote: > ast wrote: > > eddyz87 wrote: > > > ast wrote:

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-10 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3791 + if (hasBPFPreserveStaticOffset(Base)) +addr = wrapWithBPFPreserveStaticOffset(CGF, addr); + ast wrote: > eddyz87 wrote: > > ast wrote: > > > eddyz87 wrote: > > > > ast wrote: > >

[clang] [TSAN] add support for riscv64 (PR #68735)

2023-10-10 Thread via cfe-commits
https://github.com/zeroomega approved this pull request. LGTM. Please solve the code-formatting issues complaint by the bots. https://github.com/llvm/llvm-project/pull/68735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [clang-format][NFC] Annotate control statement r_braces (PR #68621)

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

[clang] [clang-format][NFC] Annotate control statement r_braces (PR #68621)

2023-10-10 Thread Owen Pan via cfe-commits
@@ -2756,6 +2756,10 @@ FormatToken *UnwrappedLineParser::parseIfThenElse(IfStmtKind *IfKind, CompoundStatementIndenter Indenter(this, Style, Line->Level); parseBlock(/*MustBeDeclaration=*/false, /*AddLevels=*/1u, /*MunchSemi=*/true, KeepIfBraces, &IfBloc

[clang] [clang-format][NFC] Annotate control statement r_braces (PR #68621)

2023-10-10 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/68621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-10 Thread Stanislav Gatev via cfe-commits
https://github.com/sgatev updated https://github.com/llvm/llvm-project/pull/68558 >From 1c9828b823f8b83071f88f9525bd376a079d614b Mon Sep 17 00:00:00 2001 From: Stanislav Gatev Date: Fri, 6 Oct 2023 04:32:06 + Subject: [PATCH] [clang][dataflow] Add support for lambda captures This adds supp

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-10 Thread Stanislav Gatev via cfe-commits
@@ -5987,4 +6018,204 @@ TEST(TransferTest, EvaluateBlockWithUnreachablePreds) { ASTContext &ASTCtx) {}); } +TEST(TransferTest, LambdaCaptureByCopy) { + std::string Code = R"( +void target(int Foo, int Bar) { + [Foo]() { +(void)0; +// [[p]] +

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-10 Thread Stanislav Gatev via cfe-commits
@@ -3214,6 +3220,117 @@ TEST_P(UncheckedOptionalAccessTest, Bitfield) { } )"); } + +TEST_P(UncheckedOptionalAccessTest, Lambda) { sgatev wrote: Done. https://github.com/llvm/llvm-project/pull/68558 ___ cfe-com

[PATCH] D153131: [clang analysis][thread-safety] Handle return-by-reference...

2023-10-10 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D153131#4653564 , @courbet wrote: > We have a large number of users of `-Werror -Wthread-safety-analysis` > internally. When we make the new warnings part of that flag we cannot > integrate because we're breaking all the

<    1   2   3   >