[clang] [analyzer][NFC] Simplifications in ArrayBoundV2 (PR #67572)

2023-10-19 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. No blocking comments. https://github.com/llvm/llvm-project/pull/67572 ___ cfe-commits mailing list cfe-commits

[clang] [analyzer][NFC] Simplifications in ArrayBoundV2 (PR #67572)

2023-10-19 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/67572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [analyzer][NFC] Simplifications in ArrayBoundV2 (PR #67572)

2023-10-19 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -32,42 +32,72 @@ using namespace taint; namespace { class ArrayBoundCheckerV2 : public Checker { - mutable std::unique_ptr BT; - mutable std::unique_ptr TaintBT; + BugType BT{this, "Out-of-bou

[clang] [analyzer][NFC] Simplifications in ArrayBoundV2 (PR #67572)

2023-10-19 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -32,42 +32,72 @@ using namespace taint; namespace { class ArrayBoundCheckerV2 : public Checker { - mutable std::unique_ptr BT; - mutable std::unique_ptr TaintBT; + BugType BT{this, "Out-of-bou

[clang] [Clang][OpenMP] Check if value is contained in array, not if it's contained in the first element (PR #69462)

2023-10-19 Thread Saiyedul Islam via cfe-commits
https://github.com/saiislam approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/69462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2023-10-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Pierre-Andre Saulais (pasaulais) Changes On some systems and when accessing certain memory areas it is not safe to use atomic xor with AMDGPU. This may be the case when using fine-grained memory allocations (e.g. through `hipAllo

[clang] 200a925 - [Clang][SVE2.1] Add builtins and intrinsics for SVBFMLSLB/T

2023-10-19 Thread Caroline Concatto via cfe-commits
Author: Caroline Concatto Date: 2023-10-19T16:44:39Z New Revision: 200a92520c255c20c916c11e9c240f07b9218380 URL: https://github.com/llvm/llvm-project/commit/200a92520c255c20c916c11e9c240f07b9218380 DIFF: https://github.com/llvm/llvm-project/commit/200a92520c255c20c916c11e9c240f07b9218380.diff

[PATCH] D151461: [Clang][SVE2.1] Add builtins and intrinsics for SVBFMLSLB/T

2023-10-19 Thread Caroline via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG200a92520c25: [Clang][SVE2.1] Add builtins and intrinsics for SVBFMLSLB/T (authored by CarolineConcatto). Repository: rG LLVM Github Monorepo CHA

[clang-tools-extra] [clang] Correct end for the `CastOperation.OpRange` (PR #69480)

2023-10-19 Thread Aaron Ballman via cfe-commits
Botond =?utf-8?q?Istv=C3=A1n_Horv=C3=A1th?= Message-ID: In-Reply-To: https://github.com/AaronBallman approved this pull request. LGTM but please add a release note about the diagnostic improvement. https://github.com/llvm/llvm-project/pull/69480 ___

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > There's some danger here. _BitInt is a C23 feature as are enumerations with a > fixed underlying type. Enumerations with a fixed underlying type explicitly > disallow using a bit-precise integer type as the underlying type. See C23 > 6.7.2.2p4, which says in part, "For all the

[clang-tools-extra] [analyzer] Add std::variant checker (PR #66481)

2023-10-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/66481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-10-19 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,104 @@ +//===- TaggedUnionModeling.h -*- 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] [analyzer] Add std::variant checker (PR #66481)

2023-10-19 Thread Balazs Benics via cfe-commits
@@ -318,6 +318,10 @@ def C11LockChecker : Checker<"C11Lock">, Dependencies<[PthreadLockBase]>, Documentation; +def StdVariantChecker : Checker<"StdVariant">, + HelpText<"Check for bad type access for std::variant.">, + Documentation; + steakhal wrote: T

[clang-tools-extra] [analyzer] Add std::variant checker (PR #66481)

2023-10-19 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,104 @@ +//===- TaggedUnionModeling.h -*- 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-tools-extra] [analyzer] Add std::variant checker (PR #66481)

2023-10-19 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,104 @@ +//===- TaggedUnionModeling.h -*- 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] [analyzer] Add std::variant checker (PR #66481)

2023-10-19 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,104 @@ +//===- TaggedUnionModeling.h -*- 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-tools-extra] [analyzer] Add std::variant checker (PR #66481)

2023-10-19 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,327 @@ +//===- StdVariantChecker.cpp -*- 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-tools-extra] [analyzer] Add std::variant checker (PR #66481)

2023-10-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. I had a quick look once again. This this time I focused on the library boundaries and APIs. https://github.com/llvm/llvm-project/pull/66481 ___ cfe-commits mailing list cfe-commits@lis

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-10-19 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,104 @@ +//===- TaggedUnionModeling.h -*- 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-tools-extra] [analyzer] Add std::variant checker (PR #66481)

2023-10-19 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,327 @@ +//===- StdVariantChecker.cpp -*- 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-tools-extra] [analyzer] Add std::variant checker (PR #66481)

2023-10-19 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,104 @@ +//===- TaggedUnionModeling.h -*- 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] [analyzer] Add std::variant checker (PR #66481)

2023-10-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. I had a quick look once again. This this time I focused on the library boundaries and APIs. https://github.com/llvm/llvm-project/pull/66481 ___ cfe-commits mailing list cfe-commits@lis

[clang] fdfe0b0 - Fix test clang/test/Driver/cl-offload.cu

2023-10-19 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-10-19T12:56:06-04:00 New Revision: fdfe0b095f629a59a361813231fb5a6de4ef7ef9 URL: https://github.com/llvm/llvm-project/commit/fdfe0b095f629a59a361813231fb5a6de4ef7ef9 DIFF: https://github.com/llvm/llvm-project/commit/fdfe0b095f629a59a361813231fb5a6de4ef7ef9.dif

[clang] [Sema] Add check for bitfield assignments to integral types (PR #69049)

2023-10-19 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 -Wconversion -fsyntax-only -verify %s +// RUN: %clang_cc1 -Wbitfield-conversion -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple armebv7-unknown-linux -Wbitfield-conversion \ +// RUN: -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple

[clang] [OpenMP 5.2] Deprecate syntax of map modifiers without comma separators (PR #69534)

2023-10-19 Thread Alexey Bataev via cfe-commits
@@ -1534,6 +1534,8 @@ def warn_omp51_compat_attributes : Warning< "standards before OpenMP 5.1">, InGroup, DefaultIgnore; def err_omp_expected_colon : Error<"missing ':' in %0">; +def err_omp_missing_comma : Error< + "missing ',' %select{after|in}0 %1">; a

[clang] [Sema] Add check for bitfield assignments to integral types (PR #69049)

2023-10-19 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 -Wconversion -fsyntax-only -verify %s +// RUN: %clang_cc1 -Wbitfield-conversion -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple armebv7-unknown-linux -Wbitfield-conversion \ +// RUN: -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple

[PATCH] D154581: [clang][Interp] Track existing InitMaps in InterpState

2023-10-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/Descriptor.cpp:328-330 +InitMap::T *InitMap::data() { return Data.get(); } +const InitMap::T *InitMap::data() const { return Data.get(); } Inline these into the header now? Even though these

[clang] [Clang][InstrProf] Allow absolute path in fun.list of -fprofile-list= (PR #67519)

2023-10-19 Thread Ellis Hoag via cfe-commits
@@ -139,9 +139,23 @@ std::optional ProfileList::isFileExcluded(StringRef FileName, CodeGenOptions::ProfileInstrKind Kind) const { StringRef Section = getSectionName(Kind); - // Check for "source:=" + + // Convert the input file path to its canoni

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > There's some danger here. _BitInt is a C23 feature as are enumerations with > > a fixed underlying type. Enumerations with a fixed underlying type > > explicitly disallow using a bit-precise integer type as the underlying > > type. See C23 6.7.2.2p4, which says in part,

[clang] [OpenMP 5.2] Deprecate syntax of map modifiers without comma separators (PR #69534)

2023-10-19 Thread Fazlay Rabbi via cfe-commits
@@ -1534,6 +1534,8 @@ def warn_omp51_compat_attributes : Warning< "standards before OpenMP 5.1">, InGroup, DefaultIgnore; def err_omp_expected_colon : Error<"missing ':' in %0">; +def err_omp_missing_comma : Error< + "missing ',' %select{after|in}0 %1">; m

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Erich Keane via cfe-commits
erichkeane wrote: > > > There's some danger here. _BitInt is a C23 feature as are enumerations > > > with a fixed underlying type. Enumerations with a fixed underlying type > > > explicitly disallow using a bit-precise integer type as the underlying > > > type. See C23 6.7.2.2p4, which says in

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-19 Thread Reid Kleckner via cfe-commits
rnk wrote: > I think there should be a proper Clang flag to control this, instead of > requiring users to pass internal `-mllvm` flags. (Also the flag should be > well documented.) I believe Zequan did that at one point, but he ran into the problem that Rust and Clang need to agree on the cov

[clang] [OpenMP 5.2] Deprecate syntax of map modifiers without comma separators (PR #69534)

2023-10-19 Thread Alexey Bataev via cfe-commits
@@ -1534,6 +1534,8 @@ def warn_omp51_compat_attributes : Warning< "standards before OpenMP 5.1">, InGroup, DefaultIgnore; def err_omp_expected_colon : Error<"missing ':' in %0">; +def err_omp_missing_comma : Error< + "missing ',' %select{after|in}0 %1">; a

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread Iain Sandoe via cfe-commits
iains wrote: > I still support disabling delayed template parsing by default in all > configurations. Ultimately, this feature is a source of bugs, and we should > start the clock on its deprecation and removal. This, of course, involves > real work, and I haven't allocated any time (mine or o

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-19 Thread David Li via cfe-commits
@@ -98,13 +99,16 @@ extern cl::opt PrintPipelinePasses; static cl::opt ClSanitizeOnOptimizerEarlyEP( "sanitizer-early-opt-ep", cl::Optional, cl::desc("Insert sanitizers on OptimizerEarlyEP."), cl::init(false)); -} + +extern cl::opt ProfileCorrelate; dav

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-19 Thread David Li via cfe-commits
@@ -374,6 +376,14 @@ class RawInstrProfReader : public InstrProfReader { return (Version & VARIANT_MASK_DBG_CORRELATE) != 0; } + bool useBinaryCorrelate() const override { +return (Version & VARIANT_MASK_BIN_CORRELATE) != 0; + } + + bool useCorrelate() const { ---

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-19 Thread David Li via cfe-commits
@@ -66,8 +66,9 @@ int __llvm_profile_check_compatibility(const char *ProfileData, Header->NumCounters != __llvm_profile_get_num_counters(__llvm_profile_begin_counters(), __llvm_profile_end_counters()) || - Header->

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-19 Thread David Li via cfe-commits
@@ -267,6 +267,9 @@ uint64_t __llvm_profile_get_num_data(const __llvm_profile_data *Begin, uint64_t __llvm_profile_get_data_size(const __llvm_profile_data *Begin, const __llvm_profile_data *End); +/*! \brief Get the size of the profile na

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-19 Thread David Li via cfe-commits
@@ -61,9 +64,20 @@ uint64_t __llvm_profile_get_num_data(const __llvm_profile_data *Begin, COMPILER_RT_VISIBILITY uint64_t __llvm_profile_get_data_size(const __llvm_profile_data *Begin, const __llvm_profile_data *End) { + if ((__llvm_profi

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-19 Thread David Li via cfe-commits
@@ -259,19 +259,19 @@ lprofWriteDataImpl(ProfDataWriter *Writer, const __llvm_profile_data *DataBegin, const char *CountersBegin, const char *CountersEnd, VPDataReaderType *VPDataReader, const char *NamesBegin, const cha

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-19 Thread David Li via cfe-commits
@@ -61,9 +64,20 @@ uint64_t __llvm_profile_get_num_data(const __llvm_profile_data *Begin, COMPILER_RT_VISIBILITY uint64_t __llvm_profile_get_data_size(const __llvm_profile_data *Begin, const __llvm_profile_data *End) { + if ((__llvm_profi

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-19 Thread David Li via cfe-commits
@@ -540,10 +540,10 @@ Error RawInstrProfReader::readHeader( "\nPLEASE update this tool to version in the raw profile, or " "regenerate raw profile with expected version.") .str()); - if (useDebugInfoCorrelate() && !Corr

[PATCH] D151709: [Clang][SVE2.1] Add builtins for svrevd

2023-10-19 Thread Caroline via Phabricator via cfe-commits
CarolineConcatto updated this revision to Diff 557788. CarolineConcatto added a comment. -Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151709/new/ https://reviews.llvm.org/D151709 Files: clang/include/clang/Basic/arm_sve.td clang/test/

[PATCH] D157331: [clang] Implement C23

2023-10-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D157331#4654362 , @jrtc27 wrote: > In D157331#4654353 , @aaron.ballman > wrote: > >> In D157331#4654265 , @mstorsjo >> wrote: >> >>> Th

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread David Blaikie via cfe-commits
dwblaikie wrote: > > I still support disabling delayed template parsing by default in all > > configurations. Ultimately, this feature is a source of bugs, and we should > > start the clock on its deprecation and removal. This, of course, involves > > real work, and I haven't allocated any tim

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-19 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > > I think there should be a proper Clang flag to control this, instead of > > requiring users to pass internal `-mllvm` flags. (Also the flag should be > > well documented.) > > I believe Zequan did that at one point, but he ran into the problem that Rust > and Clang need to

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread Reid Kleckner via cfe-commits
rnk wrote: We can definitely disable delayed template parsing in C++20 mode, I wouldn't argue against that. Whoever actually does the work should decide how much effort they are willing to put in. I'm just saying there are benefits to starting the deprecation clock sooner, since it will ultima

[clang-tools-extra] [run-clang-tidy, clang-tidy-diff] Accept directory as value for -export-fixes (PR #69453)

2023-10-19 Thread Amadeus Gebauer via cfe-commits
amgebauer wrote: >From my side it is ready to be merged. I don't have the access rights to do so. https://github.com/llvm/llvm-project/pull/69453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [clang][dataflow] Remove `DataflowAnalysisContext::flowConditionIsTautology()`. (PR #69601)

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

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-19 Thread Zequan Wu via cfe-commits
@@ -98,13 +99,16 @@ extern cl::opt PrintPipelinePasses; static cl::opt ClSanitizeOnOptimizerEarlyEP( "sanitizer-early-opt-ep", cl::Optional, cl::desc("Insert sanitizers on OptimizerEarlyEP."), cl::init(false)); -} + +extern cl::opt ProfileCorrelate; Zeq

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/69104 >From 976aa5c8f3d936a15e7123069a49d97ad3bf7a05 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 15 Oct 2023 13:14:55 +0300 Subject: [PATCH 1/6] [clang] Add clang::debug_info_type attribute --- clang

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Aaron Ballman via cfe-commits
@@ -5910,6 +5910,30 @@ static void handleBuiltinAliasAttr(Sema &S, Decl *D, D->addAttr(::new (S.Context) BuiltinAliasAttr(S.Context, AL, Ident)); } +static void handleDebugInfoTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + if (!AL.hasParsedType()) { +S.Diag(AL.get

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -5910,6 +5910,28 @@ static void handleBuiltinAliasAttr(Sema &S, Decl *D, D->addAttr(::new (S.Context) BuiltinAliasAttr(S.Context, AL, Ident)); } +static void handleDebugInfoTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + if (!AL.hasParsedType()) { +S.Diag(AL.get

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-19 Thread David Li via cfe-commits
@@ -98,13 +99,16 @@ extern cl::opt PrintPipelinePasses; static cl::opt ClSanitizeOnOptimizerEarlyEP( "sanitizer-early-opt-ep", cl::Optional, cl::desc("Insert sanitizers on OptimizerEarlyEP."), cl::init(false)); -} + +extern cl::opt ProfileCorrelate; dav

[clang] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-10-19 Thread via cfe-commits
@@ -2840,6 +2841,46 @@ static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC) { return nullptr; FShiftArgs = {ShVal0, ShVal1, ShAmt}; + } else if (isa(Or0) || isa(Or1)) { +// If there are two 'or' instructions concat variables in opposite o

[clang] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

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

[clang-tools-extra] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

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

[clang] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

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

[clang-tools-extra] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

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

[clang] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-10-19 Thread via cfe-commits
@@ -354,6 +354,48 @@ define <2 x i64> @fshl_select_vector(<2 x i64> %x, <2 x i64> %y, <2 x i64> %sham ret <2 x i64> %r } +; Convert 'or concat' to fshl if opposite 'or concat' exists. + +define i32 @fshl_concat(i8 %x, i24 %y, ptr %addr) { +; CHECK-LABEL: @fshl_concat( +; CH

[clang] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-10-19 Thread via cfe-commits
@@ -2840,6 +2841,46 @@ static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC) { return nullptr; FShiftArgs = {ShVal0, ShVal1, ShAmt}; + } else if (isa(Or0) || isa(Or1)) { +// If there are two 'or' instructions concat variables in opposite o

[clang] 5175cd7 - Disallow _BitInt as an underlying type for an enumeration

2023-10-19 Thread via cfe-commits
Author: erichkeane Date: 2023-10-19T11:02:29-07:00 New Revision: 5175cd777c57190ab9860c304796d386e4df9b8f URL: https://github.com/llvm/llvm-project/commit/5175cd777c57190ab9860c304796d386e4df9b8f DIFF: https://github.com/llvm/llvm-project/commit/5175cd777c57190ab9860c304796d386e4df9b8f.diff LO

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Erich Keane via cfe-commits
erichkeane wrote: > I filed an issue for this, automatically mentioned above. Fixed! https://github.com/llvm/llvm-project/pull/69104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-19 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 21e1b13f3384b875bd2205a736570320cb020f3e..7a9f17a4c7688958fce8bfbe80dc2e85ff37952f libcxx

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-19 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 21e1b13f3384b875bd2205a736570320cb020f3e..7a9f17a4c7688958fce8bfbe80dc2e85ff37952f libcxx

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-19 Thread Reid Kleckner via cfe-commits
@@ -7,6 +7,8 @@ //===--===// #include <__memory/aligned_alloc.h> +#include <__overridable_function> rnk wrote: If this is only needed from files in src/, can the file be moved out of libcxx

[clang] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-19 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,38 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-19 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,38 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-

[clang] [DebugMetadata][DwarfDebug] Clone uniqued function-local types after metadata loading (PR #68986)

2023-10-19 Thread David Blaikie via cfe-commits
dwblaikie wrote: > > FWIW, I think we also saw, internally at Google, some significant and > > surprising (growth in sections, like .debug_loclists and > > .debug_gnu_pubnames/types) that were a bit surprising/not what I'd have > > expected of the original committed/reverted patch. > > Could y

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/69104 >From 976aa5c8f3d936a15e7123069a49d97ad3bf7a05 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 15 Oct 2023 13:14:55 +0300 Subject: [PATCH 1/7] [clang] Add clang::debug_info_type attribute --- clang

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Aaron Ballman via cfe-commits
@@ -5910,6 +5910,30 @@ static void handleBuiltinAliasAttr(Sema &S, Decl *D, D->addAttr(::new (S.Context) BuiltinAliasAttr(S.Context, AL, Ident)); } +static void handleDebugInfoTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + if (!AL.hasParsedType()) { +S.Diag(AL.get

[clang] [X86] Add regcall4 attribute to make a specific function respect regc… (PR #69628)

2023-10-19 Thread via cfe-commits
https://github.com/yubingex007-a11y created https://github.com/llvm/llvm-project/pull/69628 …all ABIv4 >From 786b954e621ac53902ceff4640d1372ef1652699 Mon Sep 17 00:00:00 2001 From: Bing1 Yu Date: Fri, 20 Oct 2023 02:33:35 +0800 Subject: [PATCH] [X86] Add regcall4 attribute to make a specific f

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -5910,6 +5910,30 @@ static void handleBuiltinAliasAttr(Sema &S, Decl *D, D->addAttr(::new (S.Context) BuiltinAliasAttr(S.Context, AL, Ident)); } +static void handleDebugInfoTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + if (!AL.hasParsedType()) { +S.Diag(AL.get

[clang] [Driver] Ignore non-clang pch files when -include a.h probes a.h.gch (PR #69204)

2023-10-19 Thread via cfe-commits
zmodem wrote: @MaskRay ping? https://github.com/llvm/llvm-project/pull/69204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'm ignoring signed/unsigned mismatch as @erichkeane and @AaronBallman suggested. The only outstanding aspect is the following diagnostic I added today and haven't received feedback on: ```cpp [[clang::preferred_type(bool)]] unsigned b4 : 1; [[clang::preferred_type(bool)]] un

[clang] [Sema] Add check for bitfield assignments to integral types (PR #69049)

2023-10-19 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 -Wconversion -fsyntax-only -verify %s +// RUN: %clang_cc1 -Wbitfield-conversion -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple armebv7-unknown-linux -Wbitfield-conversion \ +// RUN: -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple

[clang] [X86] Add regcall4 attribute to make a specific function respect regc… (PR #69628)

2023-10-19 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 94123d164b910e0e9cca59438a00e619615e5776 786b954e621ac53902ceff4640d1372ef1652699 --

[clang-tools-extra] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-19 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,17 @@ +//===-- Implementation of the GPU lroundf function jhuber6 wrote: This and some other headers need to be reformatted. https://github.com/llvm/llvm-project/pull/66034 ___ cfe-commits mailing list cfe-c

[clang] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-19 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,17 @@ +//===-- Implementation of the GPU lroundf function jhuber6 wrote: This and some other headers need to be reformatted. https://github.com/llvm/llvm-project/pull/66034 ___ cfe-commits mailing list cfe-c

[clang] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-19 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,21 @@ +//===-- Implementation of the GPU atan2f function jhuber6 wrote: Fix header https://github.com/llvm/llvm-project/pull/66034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang-tools-extra] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-19 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,21 @@ +//===-- Implementation of the GPU atan2f function jhuber6 wrote: Fix header https://github.com/llvm/llvm-project/pull/66034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang-tools-extra] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-19 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,19 @@ +//===-- Implementation of the GPU logbf function jhuber6 wrote: Fix header https://github.com/llvm/llvm-project/pull/66034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang-tools-extra] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-19 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. LG after fixing the header formatting. https://github.com/llvm/llvm-project/pull/66034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-19 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,19 @@ +//===-- Implementation of the GPU logbf function jhuber6 wrote: Fix header https://github.com/llvm/llvm-project/pull/66034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-19 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/66034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-19 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/66034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/69104 >From 976aa5c8f3d936a15e7123069a49d97ad3bf7a05 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 15 Oct 2023 13:14:55 +0300 Subject: [PATCH 1/8] [clang] Add clang::debug_info_type attribute --- clang

[clang-tools-extra] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-19 Thread Anton Rydahl via cfe-commits
AntonRydahl wrote: > LG after fixing the header formatting. Thanks a bunch! I don't know how I did not notice the misformatted headers. I have fixed those now. https://github.com/llvm/llvm-project/pull/66034 ___ cfe-commits mailing list cfe-commits@l

[clang] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-19 Thread Anton Rydahl via cfe-commits
AntonRydahl wrote: > LG after fixing the header formatting. Thanks a bunch! I don't know how I did not notice the misformatted headers. I have fixed those now. https://github.com/llvm/llvm-project/pull/66034 ___ cfe-commits mailing list cfe-commits@l

[clang] [X86] Add regcall4 attribute to make a specific function respect regc… (PR #69628)

2023-10-19 Thread via cfe-commits
https://github.com/yubingex007-a11y updated https://github.com/llvm/llvm-project/pull/69628 >From 786b954e621ac53902ceff4640d1372ef1652699 Mon Sep 17 00:00:00 2001 From: Bing1 Yu Date: Fri, 20 Oct 2023 02:33:35 +0800 Subject: [PATCH 1/2] [X86] Add regcall4 attribute to make a specific function

[clang] [X86] Add regcall4 attribute to make a specific function respect regc… (PR #69628)

2023-10-19 Thread via cfe-commits
https://github.com/yubingex007-a11y updated https://github.com/llvm/llvm-project/pull/69628 >From 786b954e621ac53902ceff4640d1372ef1652699 Mon Sep 17 00:00:00 2001 From: Bing1 Yu Date: Fri, 20 Oct 2023 02:33:35 +0800 Subject: [PATCH 1/3] [X86] Add regcall4 attribute to make a specific function

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Erich Keane via cfe-commits
erichkeane wrote: > I'm ignoring signed/unsigned mismatch as @erichkeane and @AaronBallman > suggested. The only outstanding aspect is the following diagnostic I added > today and haven't received feedback on: > > ```c++ > [[clang::preferred_type(bool)]] unsigned b4 : 1; > [[clang::preferr

[clang] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-19 Thread Anton Rydahl via cfe-commits
https://github.com/AntonRydahl closed https://github.com/llvm/llvm-project/pull/66034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-19 Thread Anton Rydahl via cfe-commits
https://github.com/AntonRydahl closed https://github.com/llvm/llvm-project/pull/66034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-19 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/69498 >From 77c0256c3ae99808a8def68bfcf5eee2fad704ca Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 14 Jun 2023 17:49:22 -0700 Subject: [PATCH 1/6] [libc++] Fix the behavior of throwing `operator new` under -f

[clang] [OpenMP 5.2] Deprecate syntax of map modifiers without comma separators (PR #69534)

2023-10-19 Thread Fazlay Rabbi via cfe-commits
https://github.com/mdfazlay updated https://github.com/llvm/llvm-project/pull/69534 >From 87ecbd099948219faa31a61050cec4d99e60bc23 Mon Sep 17 00:00:00 2001 From: Fazlay Rabbi Date: Wed, 18 Oct 2023 13:21:17 -0700 Subject: [PATCH] [OpenMP 5.2] Deprecate syntax of map modifiers without comma sep

[clang] [OpenMP 5.2] Deprecate syntax of map modifiers without comma separators (PR #69534)

2023-10-19 Thread Fazlay Rabbi via cfe-commits
@@ -1534,6 +1534,8 @@ def warn_omp51_compat_attributes : Warning< "standards before OpenMP 5.1">, InGroup, DefaultIgnore; def err_omp_expected_colon : Error<"missing ':' in %0">; +def err_omp_missing_comma : Error< + "missing ',' %select{after|in}0 %1">; m

[clang] [OpenMP 5.2] Deprecate syntax of map modifiers without comma separators (PR #69534)

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

[clang] [OpenMP 5.2] Deprecate syntax of map modifiers without comma separators (PR #69534)

2023-10-19 Thread Fazlay Rabbi via cfe-commits
mdfazlay wrote: > LG Thanks so much. https://github.com/llvm/llvm-project/pull/69534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D158561: [-Wunsafe-buffer-usage] Add AST info to the unclaimed DRE debug notes for analysis

2023-10-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Thanks! Looks great now, let's try to land this! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158561/new/ https://reviews.llvm.org/D158561 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

<    1   2   3   4   5   >