[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-08 Thread Piotr Zegar via cfe-commits
@@ -156,6 +156,10 @@ Changes in existing checks `AllowStringArrays` option, enabling the exclusion of array types with deduced length initialized from string literals. +- Improved :doc:`bugprone-too-small-loop-variable PiotrZSL wrote: put this in

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-08 Thread Piotr Zegar via cfe-commits
@@ -82,10 +82,14 @@ void TooSmallLoopVariableCheck::registerMatchers(MatchFinder *Finder) { // We are interested in only those cases when the loop bound is a variable // value (not const, enum, etc.). StatementMatcher LoopBoundMatcher = -

[clang] [Clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-08 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,41 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -O0 -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu

[clang] [Clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-08 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/80823 >From 560713b5d45236956198654a10e0795eb56cad7b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 6 Feb 2024 13:23:36 +0300 Subject: [PATCH 1/2] [Clang] Add some CodeGen tests for CWG 2xx issues This

[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)

2024-02-08 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/81167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-08 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -O0 -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-08 Thread Shourya Goel via cfe-commits
Sh0g0-1758 wrote: done. Please review and suggest further changes. https://github.com/llvm/llvm-project/pull/81183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-08 Thread Shourya Goel via cfe-commits
@@ -82,10 +82,14 @@ void TooSmallLoopVariableCheck::registerMatchers(MatchFinder *Finder) { // We are interested in only those cases when the loop bound is a variable // value (not const, enum, etc.). StatementMatcher LoopBoundMatcher = -

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-08 Thread Shourya Goel via cfe-commits
@@ -44,3 +44,5 @@ a larger user input. for (unsigned i = 0; i < size; ++i) {} // no warning with MagnitudeBitsUpperLimit = 31 on a system where unsigned is 32-bit for (int i = 0; i < size; ++i) {} // warning with MagnitudeBitsUpperLimit = 31 on a system where int is

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-08 Thread Shourya Goel via cfe-commits
@@ -169,6 +169,9 @@ Miscellaneous option is specified. Now ``clang-apply-replacements`` applies formatting only with the option. +- Fixed incorrect implementation of ``too-small-loop-variable`` check when a const loop + variable is initialized with a function

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-08 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 updated https://github.com/llvm/llvm-project/pull/81183 >From 88dac6713284ee4f0b7ce73c944f78085412645f Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Fri, 9 Feb 2024 01:21:14 +0530 Subject: [PATCH 1/4] Fix : bugprone-too-small-loop-variable ---

[clang] [clang-format][docs] Fix version (PR #81185)

2024-02-08 Thread Owen Pan via cfe-commits
=?utf-8?q?Bj=C3=B6rn_Sch=C3=A4pers?= Message-ID: In-Reply-To: https://github.com/owenca approved this pull request. Good catch! https://github.com/llvm/llvm-project/pull/81185 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-08 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 updated https://github.com/llvm/llvm-project/pull/81183 >From 88dac6713284ee4f0b7ce73c944f78085412645f Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Fri, 9 Feb 2024 01:21:14 +0530 Subject: [PATCH 1/3] Fix : bugprone-too-small-loop-variable ---

[clang] [clang-format] Add BreakAfterReturnType option to deprecate AlwaysBreakAfterReturnType. (PR #80827)

2024-02-08 Thread Owen Pan via cfe-commits
@@ -1010,7 +1010,8 @@ struct FormatStyle { /// \version 3.7 DefinitionReturnTypeBreakingStyle AlwaysBreakAfterDefinitionReturnType; - /// The function declaration return type breaking style to use. + /// The function declaration return type breaking style to use. This

[clang] [clang-format] Add BreakAfterReturnType option to deprecate AlwaysBreakAfterReturnType. (PR #80827)

2024-02-08 Thread Owen Pan via cfe-commits
owenca wrote: @rmarker we only need to change the user-facing part and should leave the internal naming unchanged (at least in this patch) in order to have the smallest diff possible. I've added the support for deprecating/renaming top-level struct-type options to `dump_format_style.py` in

[clang] [clang-format] Rename option AlwaysBreakTemplateDeclarations (PR #81093)

2024-02-08 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/81093 >From b9463c6664227edd6e579840292389909be04ab2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 7 Feb 2024 22:43:15 -0800 Subject: [PATCH 1/3] [clang-format] Rename option AlwaysBreakTemplateDeclarations Drop

[clang] [clang-format] Update FormatToken::isSimpleTypeSpecifier() (PR #80241)

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

[clang] 763139a - [clang-format] Update FormatToken::isSimpleTypeSpecifier() (#80241)

2024-02-08 Thread via cfe-commits
Author: Owen Pan Date: 2024-02-08T21:42:29-08:00 New Revision: 763139afc19ddf2e0f0265dc828ce8e5fbe92530 URL: https://github.com/llvm/llvm-project/commit/763139afc19ddf2e0f0265dc828ce8e5fbe92530 DIFF: https://github.com/llvm/llvm-project/commit/763139afc19ddf2e0f0265dc828ce8e5fbe92530.diff

[clang] [llvm] [MC/DC] Refactor: Make `MCDCParams` as `std::variant` (PR #81227)

2024-02-08 Thread NAKAMURA Takumi via cfe-commits
@@ -264,9 +266,10 @@ class MCDCRecordProcessor { MCDCRecordProcessor(const BitVector , const CounterMappingRegion , ArrayRef Branches) - : Bitmap(Bitmap), Region(Region), Branches(Branches), -

[clang] [llvm] [MC/DC] Refactor: Make `MCDCParams` as `std::variant` (PR #81227)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-pgo Author: NAKAMURA Takumi (chapuni) Changes Introduce `MCDCDecisionParameters` and `MCDCBranchParameters` and make sure them not initialized as zero. FIXME: Could we make `CoverageMappingRegion` as a smart tagged union? --- Patch is 25.91 KiB,

[clang] [llvm] [MC/DC] Refactor: Make `MCDCParams` as `std::variant` (PR #81227)

2024-02-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/81227 Introduce `MCDCDecisionParameters` and `MCDCBranchParameters` and make sure them not initialized as zero. FIXME: Could we make `CoverageMappingRegion` as a smart tagged union? >From

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-08 Thread Erich Keane via cfe-commits
@@ -0,0 +1,140 @@ +//===- StmtOpenACC.h - Classes for OpenACC directives --*- 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:

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81172)

2024-02-08 Thread via cfe-commits
mahtohappy wrote: Closing this, as created a PR from forked main branch. Correct PR https://github.com/llvm/llvm-project/pull/81225 https://github.com/llvm/llvm-project/pull/81172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81172)

2024-02-08 Thread via cfe-commits
https://github.com/mahtohappy closed https://github.com/llvm/llvm-project/pull/81172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (mahtohappy) Changes For templates, isDependentContext() is true, that's why the previous if check was failing. Here, we traverse the RD and upon finding a Union declaration we check if at least one member of the union is

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-08 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,

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-08 Thread via cfe-commits
https://github.com/mahtohappy created https://github.com/llvm/llvm-project/pull/81225 For templates, isDependentContext() is true, that's why the previous if check was failing. Here, we traverse the RD and upon finding a Union declaration we check if at least one member of the union is

[clang] [llvm] [MC/DC] Refactor: Introduce `ConditionIDs` as `std::array<2>` (PR #81221)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: NAKAMURA Takumi (chapuni) Changes Its 0th element corresponds to `FalseID` and 1st to `TrueID`. CoverageMappingGen.cpp: `DecisionIDPair` is replaced with `ConditionIDs` --- Full diff: https://github.com/llvm/llvm-project/pull/81221.diff

[clang] [llvm] [MC/DC] Refactor: Introduce `ConditionIDs` as `std::array<2>` (PR #81221)

2024-02-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/81221 Its 0th element corresponds to `FalseID` and 1st to `TrueID`. CoverageMappingGen.cpp: `DecisionIDPair` is replaced with `ConditionIDs` >From 66bb6cc3fd339360c16c6a98ce08f34978f665e0 Mon Sep 17 00:00:00 2001

[clang] [SemaCXX] Make __builtin_addressof more like std::addressof (PR #78035)

2024-02-08 Thread Shafik Yaghmour via cfe-commits
@@ -39,7 +39,43 @@ namespace addressof { struct U { int n : 5; } u; int *pbf = __builtin_addressof(u.n); // expected-error {{address of bit-field requested}} - S *ptmp = __builtin_addressof(S{}); // expected-error {{taking the address of a temporary}} expected-warning

[clang] [libcxx] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r (PR #81213)

2024-02-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/81213 >From 8657d0de76373665c55b774b9cdffe9707288efc Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Sep 2023 04:31:02 +0200 Subject: [PATCH] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r

[clang] [llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)

2024-02-08 Thread Fangrui Song via cfe-commits
@@ -3,6 +3,11 @@ // RUN: %clang -### --target=riscv64-linux %s 2>&1 | FileCheck --check-prefix=NODESC %s // RUN: %clang -### --target=x86_64-linux -mtls-dialect=gnu %s 2>&1 | FileCheck --check-prefix=NODESC %s +/// Android supports TLSDESC by default after Android version

[clang] [llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)

2024-02-08 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. LGTM once the `!isAndroidVersionLT(29)` check is removed. https://github.com/llvm/llvm-project/pull/81198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)

2024-02-08 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/81198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r (PR #81213)

2024-02-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/81213 >From f2394044b0397cbe3bd15f96f43fbf0e50def206 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Sep 2023 04:31:02 +0200 Subject: [PATCH] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r

[clang] [libcxx] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r (PR #81213)

2024-02-08 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 9cc2122bf5a81f7063c2a32b2cb78c8d615578a1 6c74eb263dd889858f3f7be328d85fe354f71835 --

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-02-08 Thread Shafik Yaghmour via cfe-commits
@@ -1600,12 +1600,25 @@ Sema::BuildCXXTypeConstructExpr(TypeSourceInfo *TInfo, return ExprError(Diag(TyBeginLoc, diag::err_init_for_function_type) << Ty << FullRange); - // C++17 [expr.type.conv]p2: - // If the type is cv void and the

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-02-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Just a quick question https://github.com/llvm/llvm-project/pull/78060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-02-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/78060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r (PR #81213)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx @llvm/pr-subscribers-clang Author: Nikolas Klauser (philnik777) Changes This patch also uses the new builtins in libc++. --- Patch is 37.90 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/81213.diff

[clang] [libcxx] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r (PR #81213)

2024-02-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/81213 This patch also uses the new builtins in libc++. >From 6c74eb263dd889858f3f7be328d85fe354f71835 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Sep 2023 04:31:02 +0200 Subject: [PATCH] [Clang]

[clang] [llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)

2024-02-08 Thread Paul Kirth via cfe-commits
ilovepi wrote: Sounds good. I’ll update this when I have a chance tomorrow. https://github.com/llvm/llvm-project/pull/81198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)

2024-02-08 Thread via cfe-commits
enh-google wrote: i think my suggestion would be instead of ``` return isAndroid() && (!isAndroidVersionLT(29) || isRISCV64()); ``` just go with ``` return isAndroid() && isRISCV64(); ``` that solves today's problem, and we can worry about arm64 later[1]. (and x86-64 if/when that's

[clang] [llvm] InstCombine: Enable SimplifyDemandedUseFPClass and remove flag (PR #81108)

2024-02-08 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/81108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] Use relative includes to allow source-based dependencies without `-I` (PR #80443)

2024-02-08 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: It does seem like all other libunwind sources use `#include "` to find headers that are part of libunwind, so I think doing it for the includes that are installed should also be fine. I don't think installing these headers into separate directories

[clang] [llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)

2024-02-08 Thread via cfe-commits
pirama-arumuga-nainar wrote: LGTM but let's wait for any comments from enh and maskray as well. https://github.com/llvm/llvm-project/pull/81198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)

2024-02-08 Thread via cfe-commits
https://github.com/pirama-arumuga-nainar approved this pull request. https://github.com/llvm/llvm-project/pull/81198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81194 >From 92aef5a078583f69cede47374e2b97de865c5c5d Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 13:56:50 -0800 Subject: [PATCH 1/4] [clang][fmv] Drop .ifunc from target_version's entrypoint's

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-08 Thread via cfe-commits
PiJoules wrote: cc @lntue https://github.com/llvm/llvm-project/pull/81207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-08 Thread via cfe-commits
https://github.com/PiJoules updated https://github.com/llvm/llvm-project/pull/81207 >From 3360e6cf2542d4a53f87d8cafdd3a5638bd4a4ef Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Thu, 8 Feb 2024 16:12:35 -0800 Subject: [PATCH] [clang] Add fixed point precision macros This defines the

[clang] [llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Paul Kirth (ilovepi) Changes Sets TLSDESC as the default on Android versions newer than 29, or if its Android on RISC-V. --- Full diff: https://github.com/llvm/llvm-project/pull/81198.diff 2 Files Affected: - (modified)

[clang] [llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)

2024-02-08 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/81198 >From 3221a5e60c58e64dabdf23c52d33ba7ed5bdf81e Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Thu, 8 Feb 2024 14:21:49 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-adt Author: None (PiJoules) Changes This defines the builtin macros specified in `7.18a.3 Precision macros` of N1169. These are the `__*__` versions of them and the formal definitions in stdfix.h can use them. --- Full diff:

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-08 Thread via cfe-commits
https://github.com/PiJoules created https://github.com/llvm/llvm-project/pull/81207 This defines the builtin macros specified in `7.18a.3 Precision macros` of N1169. These are the `__*__` versions of them and the formal definitions in stdfix.h can use them. >From

[clang] [-Wunsafe-buffer-usage] Fixits for array decayed to pointer (PR #80347)

2024-02-08 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 86cd2fbdfe67d70a7fe061ed5d3a644f50f070f5 b7471ab0ec3e7d20e971ed61dea727b55c944d5a --

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-08 Thread Andy Kaylor via cfe-commits
andykaylor wrote: I just created https://github.com/llvm/llvm-project/issues/81204 to describe the linking versus compiling problem. https://github.com/llvm/llvm-project/pull/80475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 Thread via cfe-commits
@@ -4393,7 +4394,7 @@ llvm::Constant *CodeGenModule::GetOrCreateMultiVersionResolver(GlobalDecl GD) { // a separate resolver). std::string ResolverName = MangledName; if (getTarget().supportsIFunc()) { -if (!FD->isTargetClonesMultiVersion()) +if

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread Farzon Lotfi via cfe-commits
@@ -4518,6 +4518,12 @@ def HLSLCreateHandle : LangBuiltin<"HLSL_LANG"> { let Prototype = "void*(unsigned char)"; } +def HLSLDotProduct : LangBuiltin<"HLSL_LANG"> { + let Spellings = ["__builtin_hlsl_dot"]; + let Attributes = [NoThrow, Const, CustomTypeChecking]; + let

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-08 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > > I don't see why the current denormal-fp-math setting behavior is a blocking > > issue for this change > > Because this PR as-is causes us to start parsing the "-shared" flag for > compilation actions in order to determine which denormal-fp-math setting to > use. Users

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-08 Thread Alexey Bataev via cfe-commits
@@ -0,0 +1,140 @@ +//===- StmtOpenACC.h - Classes for OpenACC directives --*- 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:

[clang] [llvm] [LinkerWrapper] Allow 'all' as a generic bundled architecture (PR #81193)

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

[clang] 42230e2 - [LinkerWrapper] Allow 'all' as a generic bundled architecture (#81193)

2024-02-08 Thread via cfe-commits
Author: Joseph Huber Date: 2024-02-08T17:17:21-06:00 New Revision: 42230e213e11a0cf9cdbdcd49225eb0d325ef007 URL: https://github.com/llvm/llvm-project/commit/42230e213e11a0cf9cdbdcd49225eb0d325ef007 DIFF: https://github.com/llvm/llvm-project/commit/42230e213e11a0cf9cdbdcd49225eb0d325ef007.diff

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 Thread Jon Roelofs via cfe-commits
@@ -4393,7 +4394,7 @@ llvm::Constant *CodeGenModule::GetOrCreateMultiVersionResolver(GlobalDecl GD) { // a separate resolver). std::string ResolverName = MangledName; if (getTarget().supportsIFunc()) { -if (!FD->isTargetClonesMultiVersion()) +if

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 Thread via cfe-commits
@@ -4393,7 +4394,7 @@ llvm::Constant *CodeGenModule::GetOrCreateMultiVersionResolver(GlobalDecl GD) { // a separate resolver). std::string ResolverName = MangledName; if (getTarget().supportsIFunc()) { -if (!FD->isTargetClonesMultiVersion()) +if

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-08 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > > I'd like to see this change land, but with the "-mdaz-ftz" option removed > > (because I don't think it's useful). That would fix the critical problem of > > fast-math infecting shared libraries with the ftz setting, and we could > > straighten out the other problems,

[clang] [Clang] CGCoroutine: Skip moving parameters if the allocation decision is false (PR #81195)

2024-02-08 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/81195 >From fe55a632883d801a4688d787323be243d031df5b Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Wed, 7 Feb 2024 16:05:42 -0800 Subject: [PATCH] Skip moving parameters if the allocation decision is false

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-08 Thread David Li via cfe-commits
david-xl wrote: > > Good example. This pass should be run post-inline. @aeubanks, any reason we > > want to run it early in the pipeline? > > We want the main function simplification pipeline to see these function > attributes because some optimizations trigger or don't trigger depending on

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/81173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-08 Thread Joshua Cranmer via cfe-commits
jcranmer-intel wrote: > I'd like to see this change land, but with the "-mdaz-ftz" option removed > (because I don't think it's useful). That would fix the critical problem of > fast-math infecting shared libraries with the ftz setting, and we could > straighten out the other problems, which

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Andy Kaylor via cfe-commits
@@ -2842,9 +2862,8 @@ static void RenderFloatingPointOptions(const ToolChain , const Driver , << Args.MakeArgString("-ffp-model=" + FPModel) << Args.MakeArgString("-ffp-model=" + Val); if (Val.equals("fast")) { -optID =

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81194 >From 92aef5a078583f69cede47374e2b97de865c5c5d Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 13:56:50 -0800 Subject: [PATCH 1/3] [clang][fmv] Drop .ifunc from target_version's entrypoint's

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread David Peixotto via cfe-commits
@@ -144,6 +144,92 @@ double3 cos(double3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos) double4 cos(double4); +//===--===// +// dot product builtins

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread David Peixotto via cfe-commits
@@ -144,6 +144,92 @@ double3 cos(double3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos) double4 cos(double4); +//===--===// +// dot product builtins

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread Chris B via cfe-commits
@@ -144,6 +144,92 @@ double3 cos(double3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos) double4 cos(double4); +//===--===// +// dot product builtins

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread Chris B via cfe-commits
@@ -144,6 +144,92 @@ double3 cos(double3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos) double4 cos(double4); +//===--===// +// dot product builtins

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread Chris B via cfe-commits
@@ -4518,6 +4518,12 @@ def HLSLCreateHandle : LangBuiltin<"HLSL_LANG"> { let Prototype = "void*(unsigned char)"; } +def HLSLDotProduct : LangBuiltin<"HLSL_LANG"> { + let Spellings = ["__builtin_hlsl_dot"]; + let Attributes = [NoThrow, Const, CustomTypeChecking];

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread Chris B via cfe-commits
@@ -19,4 +19,9 @@ def int_dx_flattened_thread_id_in_group : Intrinsic<[llvm_i32_ty], [], [IntrNoMe def int_dx_create_handle : ClangBuiltin<"__builtin_hlsl_create_handle">, Intrinsic<[ llvm_ptr_ty ], [llvm_i8_ty], [IntrWillReturn]>; -} + +def int_dx_dot : +

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread Chris B via cfe-commits
@@ -17895,6 +17898,52 @@ llvm::Value *CodeGenFunction::EmitScalarOrConstFoldImmArg(unsigned ICEArguments, return Arg; } +Value *CodeGenFunction::EmitDXILBuiltinExpr(unsigned BuiltinID, +const CallExpr *E) { + switch (BuiltinID)

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread Chris B via cfe-commits
@@ -19,4 +19,9 @@ def int_dx_flattened_thread_id_in_group : Intrinsic<[llvm_i32_ty], [], [IntrNoMe def int_dx_create_handle : ClangBuiltin<"__builtin_hlsl_create_handle">, Intrinsic<[ llvm_ptr_ty ], [llvm_i8_ty], [IntrWillReturn]>; -} + +def int_dx_dot : +

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread Chris B via cfe-commits
@@ -17895,6 +17898,52 @@ llvm::Value *CodeGenFunction::EmitScalarOrConstFoldImmArg(unsigned ICEArguments, return Arg; } +Value *CodeGenFunction::EmitDXILBuiltinExpr(unsigned BuiltinID, +const CallExpr *E) { + switch (BuiltinID)

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/81190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: Super excited to see this coming along. https://github.com/llvm/llvm-project/pull/81190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Consider aggregate bases when checking if an InitListExpr is constant (PR #80519)

2024-02-08 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/80519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] CGCoroutine: Skip moving parameters if the allocation decision is false (PR #81195)

2024-02-08 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/81195 >From c976747972ffb2e38874eb1f572d110479b109fc Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Wed, 7 Feb 2024 16:05:42 -0800 Subject: [PATCH] Skip moving parameters if the allocation decision is false

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81194 >From 92aef5a078583f69cede47374e2b97de865c5c5d Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 13:56:50 -0800 Subject: [PATCH 1/2] [clang][fmv] Drop .ifunc from target_version's entrypoint's

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread David Peixotto via cfe-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/81190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread Xiang Li via cfe-commits
https://github.com/python3kgae edited https://github.com/llvm/llvm-project/pull/81190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread Xiang Li via cfe-commits
https://github.com/python3kgae edited https://github.com/llvm/llvm-project/pull/81190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Consider aggregate bases when checking if an InitListExpr is constant (PR #80519)

2024-02-08 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/80519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread Xiang Li via cfe-commits
@@ -4518,6 +4518,12 @@ def HLSLCreateHandle : LangBuiltin<"HLSL_LANG"> { let Prototype = "void*(unsigned char)"; } +def HLSLDotProduct : LangBuiltin<"HLSL_LANG"> { + let Spellings = ["__builtin_hlsl_dot"]; + let Attributes = [NoThrow, Const, CustomTypeChecking]; + let

[clang] Consider aggregate bases when checking if an InitListExpr is constant (PR #80519)

2024-02-08 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: Thanks! I added notes. https://github.com/llvm/llvm-project/pull/80519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] CGCoroutine: Skip moving parameters if the allocation decision is false (PR #81195)

2024-02-08 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 created https://github.com/llvm/llvm-project/pull/81195 There's a [comment](https://github.com/llvm/llvm-project/blob/0572dabb71147fdc156d90a3ecd036d1652c2006/clang/lib/CodeGen/CGCoroutine.cpp#L728-L730) left in the coroutine codegen that reads ``` TODO:

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 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 ff8c865838b46d0202963b816fbed50aaf96a7f4 92aef5a078583f69cede47374e2b97de865c5c5d --

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jon Roelofs (jroelofs) Changes Fixes: https://github.com/llvm/llvm-project/issues/81043 --- Full diff: https://github.com/llvm/llvm-project/pull/81194.diff 5 Files Affected: - (modified) clang/include/clang/AST/Decl.h (+4) -

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/81194 Fixes: https://github.com/llvm/llvm-project/issues/81043 >From 92aef5a078583f69cede47374e2b97de865c5c5d Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 13:56:50 -0800 Subject: [PATCH]

[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)

2024-02-08 Thread Argyrios Kyrtzidis via cfe-commits
https://github.com/akyrtzi approved this pull request. https://github.com/llvm/llvm-project/pull/81167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LinkerWrapper] Allow 'all' as a generic bundled architecture (PR #81193)

2024-02-08 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/81193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LinkerWrapper] Allow 'all' as a generic bundled architecture (PR #81193)

2024-02-08 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/81193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-08 Thread Shilei Tian via cfe-commits
@@ -4181,13 +4181,20 @@ bool SIInstrInfo::isInlineConstant(const MachineOperand , case AMDGPU::OPERAND_REG_INLINE_C_V2INT16: case AMDGPU::OPERAND_REG_INLINE_AC_V2INT16: return AMDGPU::isInlinableLiteralV2I16(Imm); + case AMDGPU::OPERAND_REG_IMM_V2BF16:

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-08 Thread David Peixotto via cfe-commits
@@ -144,6 +144,92 @@ double3 cos(double3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos) double4 cos(double4); +//===--===// +// dot product builtins

  1   2   3   4   5   >