[clang] [clang][dataflow] Add `Environment::get<>()`. (PR #76027)

2023-12-20 Thread Yitzhak Mandelbaum via cfe-commits
@@ -489,8 +489,7 @@ Environment Environment::pushCall(const CallExpr *Call) const { if (const auto *MethodCall = dyn_cast(Call)) { if (const Expr *Arg = MethodCall->getImplicitObjectArgument()) { if (!isa(Arg)) - Env.ThisPointeeLoc = - cast(ge

[clang] [clang][dataflow] Strengthen pointer comparison. (PR #75170)

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

[clang] [Clang][SME] Add IsStreamingOrSVE2p1 (PR #75958)

2023-12-20 Thread Kerry McLaughlin via cfe-commits
@@ -10,6 +10,10 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu \ // RUN: -target-feature +sve2p1 -S -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-

[clang] [Clang][SME] Add IsStreamingOrSVE2p1 (PR #75958)

2023-12-20 Thread Kerry McLaughlin via cfe-commits
@@ -1,14 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p

[clang] [Clang][SME] Add IsStreamingOrSVE2p1 (PR #75958)

2023-12-20 Thread Sam Tebbs via cfe-commits
@@ -11,10 +11,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu -target-feature +sve2p1 \ // RUN: -S -disable-O0-optnone -Werror -Wall -o /dev/null %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu -target-feature

[clang] [Clang][SME] Add IsStreamingOrSVE2p1 (PR #75958)

2023-12-20 Thread Sam Tebbs via cfe-commits
@@ -1,14 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p

[clang] [Clang][SME] Add IsStreamingOrSVE2p1 (PR #75958)

2023-12-20 Thread Sam Tebbs via cfe-commits
@@ -10,6 +10,10 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu \ // RUN: -target-feature +sve2p1 -S -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-

[clang] [Clang][SME] Add IsStreamingOrSVE2p1 (PR #75958)

2023-12-20 Thread Kerry McLaughlin via cfe-commits
@@ -11,10 +11,16 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu -target-feature +sve2p1 \ // RUN: -S -disable-O0-optnone -Werror -Wall -o /dev/null %s // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu -target-feature

[clang] [Clang][SME] Add IsStreamingOrSVE2p1 (PR #75958)

2023-12-20 Thread Kerry McLaughlin via cfe-commits
@@ -1,14 +1,20 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p

[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)

2023-12-20 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: @gendalph, this warning is meant to always warn if a {{default}} label is missing, even if all enumeration values are covered. If you don't want a warning on enumerations, use the previously mentioned clang-tidy check [bugprone-switch-missing-default-case](https://clang.llv

[clang-tools-extra] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)

2023-12-20 Thread via cfe-commits
https://github.com/BenBlaise created https://github.com/llvm/llvm-project/pull/76065 Finds literals explicitly casted to a type that could be expressed using builtin prefixes or suffixes. In elementary cases, provides automated fix-it hints. ```cpp (char)'a';//

[clang] [clang][analyzer] Support `fflush` in the StreamChecker (PR #74296)

2023-12-20 Thread Balázs Kéri via cfe-commits
https://github.com/balazske edited https://github.com/llvm/llvm-project/pull/74296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Support `fflush` in the StreamChecker (PR #74296)

2023-12-20 Thread Balázs Kéri via cfe-commits
https://github.com/balazske requested changes to this pull request. https://github.com/llvm/llvm-project/pull/74296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Support `fflush` in the StreamChecker (PR #74296)

2023-12-20 Thread Balázs Kéri via cfe-commits
@@ -299,6 +299,74 @@ void error_fseek_0(void) { fclose(F); } +void error_fflush_after_fclose(void) { + FILE *F = tmpfile(); + int Ret; + fflush(NULL); // no-warning + if (!F) +return; + if ((Ret = fflush(F)) != 0) +clang_analyzer_eval(Ret ==

[clang] [clang][analyzer] Support `fflush` in the StreamChecker (PR #74296)

2023-12-20 Thread Balázs Kéri via cfe-commits
@@ -1191,6 +1199,82 @@ void StreamChecker::evalSetFeofFerror(const FnDescription *Desc, C.addTransition(State); } +void StreamChecker::preFflush(const FnDescription *Desc, const CallEvent &Call, + CheckerContext &C) const { + ProgramStateRef St

[clang] [clang][analyzer] Support `fflush` in the StreamChecker (PR #74296)

2023-12-20 Thread Balázs Kéri via cfe-commits
@@ -1191,6 +1199,82 @@ void StreamChecker::evalSetFeofFerror(const FnDescription *Desc, C.addTransition(State); } +void StreamChecker::preFflush(const FnDescription *Desc, const CallEvent &Call, + CheckerContext &C) const { + ProgramStateRef St

[clang] [clang][analyzer] Support `fflush` in the StreamChecker (PR #74296)

2023-12-20 Thread Balázs Kéri via cfe-commits
@@ -299,6 +299,74 @@ void error_fseek_0(void) { fclose(F); } +void error_fflush_after_fclose(void) { + FILE *F = tmpfile(); + int Ret; + fflush(NULL); // no-warning + if (!F) +return; + if ((Ret = fflush(F)) != 0) +clang_analyzer_eval(Ret ==

[clang] [clang][analyzer] Support `fflush` in the StreamChecker (PR #74296)

2023-12-20 Thread Balázs Kéri via cfe-commits
@@ -1191,6 +1199,82 @@ void StreamChecker::evalSetFeofFerror(const FnDescription *Desc, C.addTransition(State); } +void StreamChecker::preFflush(const FnDescription *Desc, const CallEvent &Call, + CheckerContext &C) const { + ProgramStateRef St

[clang] [clang][analyzer] Support `fflush` in the StreamChecker (PR #74296)

2023-12-20 Thread Balázs Kéri via cfe-commits
@@ -299,6 +299,74 @@ void error_fseek_0(void) { fclose(F); } +void error_fflush_after_fclose(void) { + FILE *F = tmpfile(); + int Ret; + fflush(NULL); // no-warning + if (!F) +return; + if ((Ret = fflush(F)) != 0) +clang_analyzer_eval(Ret ==

[clang-tools-extra] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)

2023-12-20 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it i

[clang] [clang][analyzer] Support `fflush` in the StreamChecker (PR #74296)

2023-12-20 Thread Balázs Kéri via cfe-commits
@@ -1191,6 +1199,82 @@ void StreamChecker::evalSetFeofFerror(const FnDescription *Desc, C.addTransition(State); } +void StreamChecker::preFflush(const FnDescription *Desc, const CallEvent &Call, + CheckerContext &C) const { + ProgramStateRef St

[clang-tools-extra] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)

2023-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (BenBlaise) Changes Finds literals explicitly casted to a type that could be expressed using builtin prefixes or suffixes. In elementary cases, provides automated fix-it hints. ```cpp (char)'a';/

[clang-tools-extra] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)

2023-12-20 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 7767c5856d85cd1acf2efc32f77fdf07f00f9ff4 b4d7dbcf67117471a2d7025013fb1fcd188b33b6 --

[clang-tools-extra] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)

2023-12-20 Thread via cfe-commits
@@ -0,0 +1,161 @@ +//===--- UseBuiltinLiteralsCheck.cpp - clang-tidy -===// +// +// 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] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)

2023-12-20 Thread via cfe-commits
https://github.com/EugeneZelenko requested changes to this pull request. https://github.com/llvm/llvm-project/pull/76065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)

2023-12-20 Thread via cfe-commits
https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/76065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)

2023-12-20 Thread via cfe-commits
@@ -0,0 +1,38 @@ +.. title:: clang-tidy - readability-use-builtin-literals + +readability-use-builtin-literals + + +Finds literals explicitly casted to a type that could be expressed using builtin prefixes or suffixes. EugeneZelenk

[clang] d43fc5a - Reland: [AArch64] Assembly support for the Checked Pointer Arithmetic Extension (#73777)

2023-12-20 Thread Lucas Prates via cfe-commits
Author: Lucas Duarte Prates Date: 2023-12-20T15:43:17Z New Revision: d43fc5a6ad2f6092ac82b76590951235ec46f6e2 URL: https://github.com/llvm/llvm-project/commit/d43fc5a6ad2f6092ac82b76590951235ec46f6e2 DIFF: https://github.com/llvm/llvm-project/commit/d43fc5a6ad2f6092ac82b76590951235ec46f6e2.diff

[libc] [mlir] [clang] [compiler-rt] [clang-tools-extra] [llvm] [OpenMP] atomic compare fail : Codegen support (PR #75709)

2023-12-20 Thread David Pagan via cfe-commits
https://github.com/ddpagan commented: Aside from Alexey's comments, LGTM. https://github.com/llvm/llvm-project/pull/75709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [mlir] [lldb] [compiler-rt] [lld] [flang] [libcxx] [builtins][arm64] Implement __init_cpu_features_resolver on Apple platforms (PR #75636)

2023-12-20 Thread Pavel Iliin via cfe-commits
@@ -0,0 +1,69 @@ +#include +#if TARGET_OS_OSX || TARGET_OS_IPHONE +#include +#include + +static bool isKnownAndSupported(const char *name) { + int32_t val = 0; + size_t size = sizeof(val); + if (sysctlbyname(name, &val, &size, NULL, 0)) +return false; + return val; +} +

[clang-tools-extra] [clang] [flang] [llvm] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-20 Thread Peter Klausler via cfe-commits
https://github.com/klausler approved this pull request. https://github.com/llvm/llvm-project/pull/74628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Report narrowing conversions with const references (PR #75332)

2023-12-20 Thread via cfe-commits
alexfh wrote: The change in the diagnostic happens to make it much noisier than it was before. Our code was clean w.r.t. -Wc++11-narrowing, but now we see hundreds if not thousands of compilation breakages (we use -Werror, which turns out to be the only robust way to avoid backsliding). I thin

[clang] [SystemZ][z/OS] Add support for recognizing z/OS personality function in Clang (PR #76073)

2023-12-20 Thread Yusra Syeda via cfe-commits
https://github.com/ysyeda created https://github.com/llvm/llvm-project/pull/76073 This PR adds support makes Clang aware of the name of the personality function on z/OS. >From 7f4ba13348b0d4ca3165954def670de916e7beb9 Mon Sep 17 00:00:00 2001 From: Yusra Syeda Date: Wed, 20 Dec 2023 11:27:29 -

[flang] [lld] [libcxx] [clang] [lldb] [mlir] [llvm] [compiler-rt] [builtins] Refactor cpu_model support to reduce #if nesting. NFCI (PR #75635)

2023-12-20 Thread Jon Roelofs via cfe-commits
jroelofs wrote: @petrhosek I don't have a Fucshia sysroot to build this against, so I think it would help me a lot if you could grab the preprocessed version of the `cpu_model.c` before all these changes and stick it in a github gist... I feel a little bad for dragging this out in-tree. > The

[clang] [SystemZ][z/OS] Add support for recognizing z/OS personality function in Clang (PR #76073)

2023-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Yusra Syeda (ysyeda) Changes This PR adds support makes Clang aware of the name of the personality function on z/OS. --- Full diff: https://github.com/llvm/llvm-project/pull/76073.diff 3 Files Affected: - (modified) clang/lib/C

[clang] [SystemZ][z/OS] Add support for recognizing z/OS personality function in Clang (PR #76073)

2023-12-20 Thread Abhina Sree via cfe-commits
https://github.com/abhina-sree approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/76073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][driver] Remove Fortain_main static library from linking stages (PR #75816)

2023-12-20 Thread Daniel Chen via cfe-commits
@@ -163,6 +163,40 @@ forward compiler options to the frontend driver, `flang-new -fc1`. You can read more on the design of `clangDriver` in Clang's [Driver Design & Internals](https://clang.llvm.org/docs/DriverInternals.html). +## Linker Driver +When used as a linker, Flang's

[clang] [Clang][Parser] Fix crash of clang when using C++ constructs like :: in C code (PR #74926)

2023-12-20 Thread via cfe-commits
https://github.com/ChipsSpectre updated https://github.com/llvm/llvm-project/pull/74926 >From b8bd6e9551da9aefec0597e9ed84cdee2af58344 Mon Sep 17 00:00:00 2001 From: ChipsSpectre Date: Wed, 20 Dec 2023 17:43:13 +0100 Subject: [PATCH] [clang][Parse] `TryAnnotateCXXScopeToken` to be called only

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-12-20 Thread Daniel Chen via cfe-commits
DanielCChen wrote: Thanks @banach-space for the pointer! https://github.com/llvm/llvm-project/pull/73124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Fix crash of clang when using C++ constructs like :: in C code (PR #74926)

2023-12-20 Thread via cfe-commits
ChipsSpectre wrote: ok @cor3ntin, the nit is addressed. Is the pull request now ready to be merged? https://github.com/llvm/llvm-project/pull/74926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[llvm] [clang-tools-extra] [flang] [clang] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2023-12-20 Thread via cfe-commits
https://github.com/jeanPerier approved this pull request. https://github.com/llvm/llvm-project/pull/74628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Fix crash of clang when using C++ constructs like :: in C code (PR #74926)

2023-12-20 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks for working on this! It looks good now https://github.com/llvm/llvm-project/pull/74926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[flang] [clang] [flang][driver] Remove Fortain_main static library from linking stages (PR #75816)

2023-12-20 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen edited https://github.com/llvm/llvm-project/pull/75816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add `Environment::get<>()`. (PR #76027)

2023-12-20 Thread Gábor Horváth via cfe-commits
@@ -489,8 +489,7 @@ Environment Environment::pushCall(const CallExpr *Call) const { if (const auto *MethodCall = dyn_cast(Call)) { if (const Expr *Arg = MethodCall->getImplicitObjectArgument()) { if (!isa(Arg)) - Env.ThisPointeeLoc = - cast(ge

[clang] [clang][dataflow] Add `Environment::get<>()`. (PR #76027)

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

[clang] [Clang][Parser] Fix crash of clang when using C++ constructs like :: in C code (PR #74926)

2023-12-20 Thread via cfe-commits
ChipsSpectre wrote: @cor3ntin thank you for your fast review! Is it possible to merge it after your approval, or is it needed to wait for all reviewers? https://github.com/llvm/llvm-project/pull/74926 ___ cfe-commits mailing list cfe-commits@lists.ll

[flang] [clang] [flang][driver] Remove Fortain_main static library from linking stages (PR #75816)

2023-12-20 Thread Michael Klemm via cfe-commits
@@ -163,6 +163,40 @@ forward compiler options to the frontend driver, `flang-new -fc1`. You can read more on the design of `clangDriver` in Clang's [Driver Design & Internals](https://clang.llvm.org/docs/DriverInternals.html). +## Linker Driver +When used as a linker, Flang's

[clang] [clang][dataflow] Disallow setting properties on `RecordValue`s. (PR #76042)

2023-12-20 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/76042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Disallow setting properties on `RecordValue`s. (PR #76042)

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

[clang] [clang][dataflow] Disallow setting properties on `RecordValue`s. (PR #76042)

2023-12-20 Thread Gábor Horváth via cfe-commits
@@ -636,40 +636,37 @@ class OptionalIntAnalysis final if (!CS) return; const Stmt *S = CS->getStmt(); -auto OptionalIntRecordDecl = recordDecl(hasName("OptionalInt")); -auto HasOptionalIntType = hasType(OptionalIntRecordDecl); - -SmallVector Matches =

[clang] [clang][dataflow] Disallow setting properties on `RecordValue`s. (PR #76042)

2023-12-20 Thread Gábor Horváth via cfe-commits
@@ -184,33 +188,23 @@ class PointerValue final : public Value { /// In C++, prvalues of class type serve only a limited purpose: They can only /// be used to initialize a result object. It is not possible to access member /// variables or call member functions on a prvalue of c

[clang] [Clang][Sema] Fix Wswitch-default bad warning in template (PR #76007)

2023-12-20 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert approved this pull request. For now I guess this is Ok, although I think the better fix would be to diagnose missing or duplicate `default` labels even in the dependent case. Because `default` labels themselves are never dependent. https://github.com/llvm/llvm-p

[clang-tools-extra] [clang] [llvm] [XCOFF] Use RLDs to print branches even without -r (PR #74342)

2023-12-20 Thread via cfe-commits
https://github.com/stephenpeckham updated https://github.com/llvm/llvm-project/pull/74342 >From 4d255c7164b92e6dbfa34226d31055f9438855f0 Mon Sep 17 00:00:00 2001 From: Stephen Peckham Date: Mon, 4 Dec 2023 11:41:32 -0500 Subject: [PATCH 01/12] [XCOFF] Use RLDs to print branches even without -r

[clang] [Clang][SME] Add IsStreamingOrSVE2p1 (PR #75958)

2023-12-20 Thread Kerry McLaughlin via cfe-commits
@@ -2069,21 +2070,20 @@ def SVDOT_LANE_X2_U : SInst<"svdot_lane[_{d}_{2}_{3}]", "ddhhi", "Ui", MergeNone def SVDOT_LANE_X2_F : SInst<"svdot_lane[_{d}_{2}_{3}]", "ddhhi", "f", MergeNone, "aarch64_sve_fdot_lane_x2", [], [ImmCheck<3, ImmCheck0_3>]>; } -let TargetGuard = "sve2p

[clang] [compiler-rt] [AIX] Undefine __STDC_NO_ATOMICS__ to enable c11 atomics functionality (PR #76025)

2023-12-20 Thread David Tenty via cfe-commits
https://github.com/daltenty requested changes to this pull request. Last time I tested this functionality, we had some deadlocks if the standard library interfaces were used, which was part of the motivation for leaving this macro in. It's possible the situation has changed since, but I'd like

[llvm] [clang] [TargetParser] Define AEK_FCMA and AEK_JSCVT for tsv110 (PR #75516)

2023-12-20 Thread Momchil Velikov via cfe-commits
@@ -81,6 +81,15 @@ static bool DecodeAArch64Features(const Driver &D, StringRef text, else return false; +// +jsconv and +complxnum implies +neon and +fp-armv8 momchil-velikov wrote: According to the latest Arm ARM (https://developer.arm.com/d

[clang] [llvm] [clang-tools-extra] [compiler-rt] [libc] [mlir] [OpenMP] atomic compare fail : Codegen support (PR #75709)

2023-12-20 Thread via cfe-commits
https://github.com/SunilKuravinakop updated https://github.com/llvm/llvm-project/pull/75709 >From fe931d64741f427629407bca3e68a61bec6f2b67 Mon Sep 17 00:00:00 2001 From: Sunil Kuravinakop Date: Sat, 16 Dec 2023 11:43:35 -0600 Subject: [PATCH 1/3] Adding parameter to fail clause (i.e. memory ord

[clang] [llvm] [clang-tools-extra] [compiler-rt] [libc] [mlir] [OpenMP] atomic compare fail : Codegen support (PR #75709)

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

[clang] [Clang][SME] Add IsStreamingOrSVE2p1 (PR #75958)

2023-12-20 Thread Sam Tebbs via cfe-commits
@@ -2069,21 +2070,20 @@ def SVDOT_LANE_X2_U : SInst<"svdot_lane[_{d}_{2}_{3}]", "ddhhi", "Ui", MergeNone def SVDOT_LANE_X2_F : SInst<"svdot_lane[_{d}_{2}_{3}]", "ddhhi", "f", MergeNone, "aarch64_sve_fdot_lane_x2", [], [ImmCheck<3, ImmCheck0_3>]>; } -let TargetGuard = "sve2p

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

2023-12-20 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/75992 >From b6ea2ffe22f414ec79cd9ccd7e47c7b063583bcc Mon Sep 17 00:00:00 2001 From: MaxEW707 <82551778+maxew...@users.noreply.github.com> Date: Tue, 19 Dec 2023 19:55:21 -0500 Subject: [PATCH 1/5] Move Intel ADC instri

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

2023-12-20 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > Thanks @MaxEW707 ! I don't have other comments now. Do you need help to merge > it for you? Thanks for the review :). I don't have commit access so we need someone to commit the PR for me. https://github.com/llvm/llvm-project/pull/75992 __

[clang] b03f0c5 - [RISCV] Add sifive-p450 CPU. (#75760)

2023-12-20 Thread via cfe-commits
Author: Craig Topper Date: 2023-12-20T09:52:02-08:00 New Revision: b03f0c596a180399f7730ed75d78055c81b3d771 URL: https://github.com/llvm/llvm-project/commit/b03f0c596a180399f7730ed75d78055c81b3d771 DIFF: https://github.com/llvm/llvm-project/commit/b03f0c596a180399f7730ed75d78055c81b3d771.diff

[clang] [llvm] [RISCV] Add sifive-p450 CPU. (PR #75760)

2023-12-20 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/75760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [TargetParser] Define AEK_FCMA and AEK_JSCVT for tsv110 (PR #75516)

2023-12-20 Thread Hassnaa Hamdi via cfe-commits
@@ -173,6 +173,8 @@ enum ArchExtKind : unsigned { AEK_SMEF8F16 = 69, // FEAT_SME_F8F16 AEK_SMEF8F32 = 70, // FEAT_SME_F8F32 AEK_SMEFA64 = 71, // FEAT_SME_FA64 + AEK_JSCVT = 72, // FEAT_JSCVT + AEK_FCMA = 73, // FEAT_FCMA

[clang] [clang] Add getClangVendor() and use it in CodeGenModule.cpp (PR #75935)

2023-12-20 Thread Shoaib Meenai via cfe-commits
https://github.com/smeenai approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/75935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Recommit [RISCV] Update the interface of sifive vqmaccqoq (#74284) (PR #75768)

2023-12-20 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/75768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Recommit [RISCV] Update the interface of sifive vqmaccqoq (#74284) (PR #75768)

2023-12-20 Thread Craig Topper via cfe-commits
https://github.com/topperc requested changes to this pull request. https://github.com/llvm/llvm-project/pull/75768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] Recommit [RISCV] Update the interface of sifive vqmaccqoq (#74284) (PR #75768)

2023-12-20 Thread Craig Topper via cfe-commits
@@ -7,10 +7,10 @@ declare @llvm.riscv.sf.vqmacc.4x8x4.nxv2i32.nxv8i8.nxv8i8( , , - , + , iXLen, iXLen); -define @intrinsic_vqmacc_4x8x4_tu_i32m1( %0, %1, %2, iXLen %3) nounwind { +define @intrinsic_vqmacc_4x8x4_tu_i32m1( %0, %1, %2, iXLen %3) nounwind { ; C

[llvm] [clang] Recommit [RISCV] Update the interface of sifive vqmaccqoq (#74284) (PR #75768)

2023-12-20 Thread Craig Topper via cfe-commits
@@ -13,7 +13,7 @@ declare @llvm.riscv.sf.vfwmacc.4x4x4.nxv1f32.nxv4bf16.nxv1b define @intrinsic_vfwmacc_4x4x4_tu_f32mf2( %0, %1, %2, iXLen %3) nounwind { ; CHECK-LABEL: intrinsic_vfwmacc_4x4x4_tu_f32mf2: ; CHECK: # %bb.0: # %entry -; CHECK-NEXT:vsetvli zero, a0,

[clang] [llvm] [compiler-rt] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/75957 >From d72f0e1ad7759bad81767418604d27f11d74d6de Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 19 Dec 2023 12:32:15 -0500 Subject: [PATCH 1/3] [Profile] Allow profile merging with multiple correlate files.

[clang] [clang] Add getClangVendor() and use it in CodeGenModule.cpp (PR #75935)

2023-12-20 Thread Dimitry Andric via cfe-commits
https://github.com/DimitryAndric closed https://github.com/llvm/llvm-project/pull/75935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9055519 - [clang] Add getClangVendor() and use it in CodeGenModule.cpp (#75935)

2023-12-20 Thread via cfe-commits
Author: Dimitry Andric Date: 2023-12-20T20:03:19+01:00 New Revision: 9055519103eadfba0b48810be926883a71890c55 URL: https://github.com/llvm/llvm-project/commit/9055519103eadfba0b48810be926883a71890c55 DIFF: https://github.com/llvm/llvm-project/commit/9055519103eadfba0b48810be926883a71890c55.diff

[clang] [libunwind] [clang-tools-extra] [llvm] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2023-12-20 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. Just one question otherwise this looks good to me. https://github.com/llvm/llvm-project/pull/74791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[llvm] [libunwind] [clang-tools-extra] [clang] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2023-12-20 Thread Alexander Richardson via cfe-commits
@@ -2974,6 +2966,37 @@ bool UnwindCursor::getFunctionName(char *buf, size_t bufLen, buf, bufLen, offset); } +#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN) +template +bool UnwindCursor::isReadableAddr(const pint_t addr) const { + // T

[clang] [clang-tools-extra] [libunwind] [llvm] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2023-12-20 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/74791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5c1a41f - Revert "[clang] Add getClangVendor() and use it in CodeGenModule.cpp (#75935)"

2023-12-20 Thread Dimitry Andric via cfe-commits
Author: Dimitry Andric Date: 2023-12-20T20:07:22+01:00 New Revision: 5c1a41f8ad0c02a24345efb4adc424396b7e446b URL: https://github.com/llvm/llvm-project/commit/5c1a41f8ad0c02a24345efb4adc424396b7e446b DIFF: https://github.com/llvm/llvm-project/commit/5c1a41f8ad0c02a24345efb4adc424396b7e446b.diff

[clang] 2c27013 - [clang] Add getClangVendor() and use it in CodeGenModule.cpp (#75935)

2023-12-20 Thread Dimitry Andric via cfe-commits
Author: Dimitry Andric Date: 2023-12-20T20:09:39+01:00 New Revision: 2c27013fa918211816d24c9d2530469fd822bc00 URL: https://github.com/llvm/llvm-project/commit/2c27013fa918211816d24c9d2530469fd822bc00 DIFF: https://github.com/llvm/llvm-project/commit/2c27013fa918211816d24c9d2530469fd822bc00.diff

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

2023-12-20 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Thanks for adding the guard to the include adxintrin.h, now that it has only the ADX stuff it is the right way to go. As PS4 code owner I approve! https://github.com/llvm/llvm-project/pull/75992 ___ cfe-commits mailing list cfe-commits@l

[clang] [libcxx] [clang-tools-extra] [llvm] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
@@ -0,0 +1,89 @@ +//===--===// +// +// 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

[llvm] [libcxx] [clang-tools-extra] [clang] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
https://github.com/var-const edited https://github.com/llvm/llvm-project/pull/75259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [libcxx] [clang-tools-extra] [clang] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
@@ -0,0 +1,259 @@ +//===--===// +// +// 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: Apa

[libcxx] [llvm] [clang-tools-extra] [clang] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
@@ -0,0 +1,118 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [llvm] [libcxx] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
@@ -0,0 +1,118 @@ +// -*- 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

[llvm] [libcxx] [clang-tools-extra] [clang] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
@@ -0,0 +1,89 @@ +//===--===// +// +// 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-tools-extra] [llvm] [libcxx] [clang] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
@@ -0,0 +1,315 @@ +//===--===// +// +// 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: Apa

[clang] [clang-tools-extra] [llvm] [libcxx] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
https://github.com/var-const commented: This patch has changed substantially since I last reviewed it. I'll send more feedback in a follow-up review. https://github.com/llvm/llvm-project/pull/75259 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[libcxx] [clang] [clang-tools-extra] [llvm] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
@@ -0,0 +1,104 @@ +//===--===// +// +// 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: Apa

[libcxx] [llvm] [clang-tools-extra] [clang] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
@@ -0,0 +1,104 @@ +//===--===// +// +// 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: Apa

[llvm] [clang] [clang-tools-extra] [libcxx] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
@@ -0,0 +1,104 @@ +//===--===// +// +// 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: Apa

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2023-12-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/76094 https://github.com/llvm/llvm-project/pull/75332 diagnosed narrowing involving const reference. Our depot has hundreds if not thousands of breakages (https://github.com/llvm/llvm-project/pull/75332#issuecomment-186

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2023-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes https://github.com/llvm/llvm-project/pull/75332 diagnosed narrowing involving const reference. Our depot has hundreds if not thousands of breakages (https://github.com/llvm/llvm-project/pull/75332#issuecomment

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2023-12-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/76094 >From cea507db33bc1fe376b4a75c5ff96225a4e0e67e Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 20 Dec 2023 10:57:15 -0800 Subject: [PATCH] [Sema] Add -Wc++11-narrowing-const-reference https://github.com/l

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2023-12-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/76094 >From 132a5293a89d15d3e38c768727723157427f49db Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 20 Dec 2023 10:57:15 -0800 Subject: [PATCH] [Sema] Add -Wc++11-narrowing-const-reference https://github.com/l

[clang] [clang-tools-extra] [compiler-rt] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -25,6 +25,25 @@ // RUN: diff <(llvm-profdata show --all-functions --counts %t.cov.normal.profdata) <(llvm-profdata show --all-functions --counts %t.cov.profdata) +// Test debug info correlate with build id. ellishg wrote: Can you add a test to `Darwin/i

[compiler-rt] [clang] [clang-tools-extra] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available ellishg wrote: Why is lld required? https://github.com/llvm/llvm-project/pull/75957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [clang-tools-extra] [compiler-rt] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available +// Test llvm-profdata merging with multiple correlation files mixing different correlation modes. + +// RUN: %clang_pgogen -o %t.normal -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instr

[llvm] [clang-tools-extra] [clang] [compiler-rt] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -118,18 +118,18 @@ cl::opt ProfiledBinary( "profiled-binary", cl::init(""), cl::desc("Path to binary from which the profile was collected."), cl::sub(ShowSubcommand), cl::sub(MergeSubcommand)); -cl::opt DebugInfoFilename( -"debug-info", cl::init(""), +cl::lis

[clang] [compiler-rt] [llvm] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available +// Test llvm-profdata merging with multiple correlation files mixing different correlation modes. + +// RUN: %clang_pgogen -o %t.normal -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instr

[compiler-rt] [llvm] [clang-tools-extra] [clang] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -481,3 +509,49 @@ Error BinaryInstrProfCorrelator::correlateProfileNameImpl() { this->Names.append(this->Ctx->NameStart, this->Ctx->NameSize); return Error::success(); } + +llvm::Expected> InstrProfCorrelators::get( +ArrayRef> +CorrelateInputs, +uint32_

[clang] [clang-tools-extra] [compiler-rt] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available ellishg wrote: Can we also add a test to `Darwin/instrprof-correlation-mixed.test`? https://github.com/llvm/llvm-project/pull/75957 ___ cfe-commits mailing list cfe-commits@

<    1   2   3   >