[clang] [clang][AMDGPU][CUDA] Handle __builtin_printf for device printf (PR #68515)

2024-02-05 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/68515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxxabi] [lldb] [llvm] [flang] [libc] [compiler-rt] [clang] [libcxx] [clang-tools-extra] [lld] [docs] Fix malformed csv files (PR #80567)

2024-02-05 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. https://github.com/llvm/llvm-project/pull/80567

[clang] [llvm] [Github] Use building LLVM as perf-training for CI container (PR #80713)

2024-02-05 Thread Tom Stellard via cfe-commits
@@ -0,0 +1,13 @@ +diff --git a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +index 1a04ca9a74e5..d092820e4115 100644 +--- a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +@@ -4,6 +4,8 @@ set(CLANG_BOOTSTRAP_TARGETS + stage2-

[llvm] [clang] [Github] Use building LLVM as perf-training for CI container (PR #80713)

2024-02-05 Thread Aiden Grossman via cfe-commits
@@ -0,0 +1,13 @@ +diff --git a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +index 1a04ca9a74e5..d092820e4115 100644 +--- a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +@@ -4,6 +4,8 @@ set(CLANG_BOOTSTRAP_TARGETS + stage2-

[llvm] [clang] [clang-tools-extra] [DebugInfo][RemoveDIs] Don't allocate one DPMarker per instruction (PR #79345)

2024-02-05 Thread Jeremy Morse via cfe-commits
jmorse wrote: (Note that I've merged main into this branch for various reasons,) I've adjusted `adoptDbgValues` to always clean up the `DPMarker` that it adopts, so that there's no return value for people to accidentally miss. This means that we have to test in `adoptDbgValues` whether we're a

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-05 Thread David Goldman via cfe-commits
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl &RenameDecl, Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Re

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-05 Thread David Goldman via cfe-commits
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl &RenameDecl, Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Re

[flang] [clang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-02-05 Thread Valentin Clement バレンタイン クレメン via cfe-commits
clementval wrote: This is breaking couple of arm buildbots. https://github.com/llvm/llvm-project/pull/78755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-02-05 Thread Mats Petersson via cfe-commits
Leporacanthicus wrote: Thanks for letting me klnow. I have a fix in https://github.com/llvm/llvm-project/pull/80717 I'm not entirely sure why it's broken on Arm but not x86 - the tests run on both, and should give identical output [but clearly doesn't]. -- Mats [https://opengraph.githubassets

[flang] [clang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-02-05 Thread Valentin Clement バレンタイン クレメン via cfe-commits
clementval wrote: If you think this is the right fix then you should push it to solve the buildbots or revert the initial commit. https://github.com/llvm/llvm-project/pull/78755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [llvm] [clang-tools-extra] [AArch64] Implement -fno-plt for SelectionDAG/GlobalISel (PR #78890)

2024-02-05 Thread Fangrui Song via cfe-commits
@@ -1293,8 +1293,19 @@ bool AArch64CallLowering::lowerCall(MachineIRBuilder &MIRBuilder, !Subtarget.noBTIAtReturnTwice() && MF.getInfo()->branchTargetEnforcement()) Opc = AArch64::BLR_BTI; - else + else { +// For an intrinsic call (e.g. memset),

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2024-02-05 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2024-02-05 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2024-02-05 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2024-02-05 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2024-02-05 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2024-02-05 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2024-02-05 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[llvm] [clang] [Github] Use building LLVM as perf-training for CI container (PR #80713)

2024-02-05 Thread Tom Stellard via cfe-commits
@@ -0,0 +1,13 @@ +diff --git a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +index 1a04ca9a74e5..d092820e4115 100644 +--- a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +@@ -4,6 +4,8 @@ set(CLANG_BOOTSTRAP_TARGETS + stage2-

[clang] [clang] Fix unexpected `-Wconstant-logical-operand` in C23 (PR #80724)

2024-02-05 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/80724 C23 has bool, but logical operators still return int. Double check that we're not in C23 to avoid false-positive -Wconstant-logical-operand. Fixes https://github.com/llvm/llvm-project/issues/64356 >From dd81e

[clang] [clang] Fix unexpected `-Wconstant-logical-operand` in C23 (PR #80724)

2024-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes C23 has bool, but logical operators still return int. Double check that we're not in C23 to avoid false-positive -Wconstant-logical-operand. Fixes https://github.com/llvm/llvm-project/issues/64356

[clang] 0bf165e - [RISCV] Add support for RISC-V Pointer Masking (#79929)

2024-02-05 Thread via cfe-commits
Author: Michael Maitland Date: 2024-02-05T13:56:25-05:00 New Revision: 0bf165e383ac9c58dcb1764aef9f35334afa0cc7 URL: https://github.com/llvm/llvm-project/commit/0bf165e383ac9c58dcb1764aef9f35334afa0cc7 DIFF: https://github.com/llvm/llvm-project/commit/0bf165e383ac9c58dcb1764aef9f35334afa0cc7.di

[llvm] [clang] [RISCV] Add support for RISC-V Pointer Masking (PR #79929)

2024-02-05 Thread Michael Maitland via cfe-commits
https://github.com/michaelmaitland closed https://github.com/llvm/llvm-project/pull/79929 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG] Fix INF/NAN warning. (PR #80290)

2024-02-05 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/80290 >From 529879c78ae4c1bf4d04110b543f37c1d1af20f7 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Thu, 1 Feb 2024 05:26:00 -0800 Subject: [PATCH 1/4] Fix INF/NAN warning. --- .../clang/Basic/DiagnosticCommonKin

[clang] [CLANG] Fix INF/NAN warning. (PR #80290)

2024-02-05 Thread Zahira Ammarguellat via cfe-commits
@@ -73,7 +73,7 @@ def warn_pragma_debug_unexpected_argument : Warning< def warn_fp_nan_inf_when_disabled : Warning< "use of %select{infinity|NaN}0%select{| via a macro}1 is undefined behavior " "due to the currently enabled floating-point options">, - InGroup>; + InGroup>

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-02-05 Thread Leandro Lupori via cfe-commits
luporl wrote: https://github.com/llvm/llvm-project/issues/80728 opened to track this issue. https://github.com/llvm/llvm-project/pull/77365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Daniel Rodríguez Troitiño via cfe-commits
drodriguez wrote: > I need to take a closer look, since at first reading I can't evaluate the > consequences, especially if this does change the behaviour when -isysroot is > **not** provided. Small detail that I think you are aware: the `-isysroot` can be provided, but it needs to have the `

[llvm] [clang] [clang-tools-extra] [AArch64] Implement -fno-plt for SelectionDAG/GlobalISel (PR #78890)

2024-02-05 Thread Matt Arsenault via cfe-commits
@@ -1293,8 +1293,19 @@ bool AArch64CallLowering::lowerCall(MachineIRBuilder &MIRBuilder, !Subtarget.noBTIAtReturnTwice() && MF.getInfo()->branchTargetEnforcement()) Opc = AArch64::BLR_BTI; - else + else { +// For an intrinsic call (e.g. memset),

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/80730 Previously when fixing ambiguous lookup diagnostics in cc1b6668c57170cd440d321037ced89d6a61a9cb The change refactored `LookupResult` to split out diagnosing access and ambiguous lookups. The call to `getSema().C

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes Previously when fixing ambiguous lookup diagnostics in cc1b6668c57170cd440d321037ced89d6a61a9cb The change refactored `LookupResult` to split out diagnosing access and ambiguous lookups. The call to `getS

[clang] [CLANG] Fix INF/NAN warning. (PR #80290)

2024-02-05 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/80290 >From 529879c78ae4c1bf4d04110b543f37c1d1af20f7 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Thu, 1 Feb 2024 05:26:00 -0800 Subject: [PATCH 1/5] Fix INF/NAN warning. --- .../clang/Basic/DiagnosticCommonKin

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. This'll need a cherry pick to 18 as it is a break against 17, right? Otherwise LGTM. https://github.com/llvm/llvm-project/pull/80730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

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

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread via cfe-commits
@@ -201,6 +201,8 @@ Bug Fixes to C++ Support parameter where we did an incorrect specialization of the initialization of the default parameter. Fixes (`#68490 `_) +- Fix regression due missing ambiguity check before check

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/80730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 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 5942868a215ce4dbd927a7f0b06432e1eeaed698 16968712c7caa38c80c6e8ac4db0e318511aaa99 --

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/80730 >From 1795bc031b9f5367e3bb61e8420278668964c416 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Mon, 5 Feb 2024 11:08:25 -0800 Subject: [PATCH] [Clang][Sema] Fix regression due to missing ambiguity check befo

[llvm] [clang-tools-extra] [mlir] [clang] [mlir][sparse] Change LevelType enum to 64 bit (PR #80501)

2024-02-05 Thread Yinying Li via cfe-commits
https://github.com/yinying-lisa-li updated https://github.com/llvm/llvm-project/pull/80501 >From 1754868fc5f600ff59fac02d21ce9a37dc9ebcad Mon Sep 17 00:00:00 2001 From: Yinying Li Date: Fri, 2 Feb 2024 22:08:10 + Subject: [PATCH 1/7] [mlir][sparse] Change enum to be 64 bit --- mlir/includ

[lldb] [libcxx] [clang] [libc] [llvm] [libcxxabi] [flang] [lld] [compiler-rt] [clang-tools-extra] [TTI][RISCV]Improve costs for fixed vector whole reg extract/insert. (PR #80164)

2024-02-05 Thread Alexey Bataev via cfe-commits
@@ -326,6 +326,48 @@ InstructionCost RISCVTTIImpl::getShuffleCost(TTI::ShuffleKind Kind, switch (Kind) { default: break; +case TTI::SK_ExtractSubvector: + if (isa(SubTp) && + LT.second.getVectorElementType() != MVT::i1) { +unsigned TpReg

[clang] [clang] Fix unexpected `-Wconstant-logical-operand` in C23 (PR #80724)

2024-02-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM though you should add a release note before landing. I think this is a good one to backport into Clang 18.x given how simple the fix is. Thank you! https://github.com/llvm/llvm-project/pull/80724 _

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Louis Dionne via cfe-commits
ldionne wrote: In https://reviews.llvm.org/D157283#4648242, I explained that the current upstream code actually matches exactly what we have downstream. I made sure to upstream everything to avoid differences after we started shipping libc++ in the SDK and were done with our transition. @drod

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Louis Dionne via cfe-commits
ldionne wrote: @dmpolukhin Replying to https://reviews.llvm.org/D157283#4648445: > @ldionne thank you for the reply. Unfortunately current behaviour makes > problems for clang-tools like clang-tidy and clangd that read CDBs from > compile_commands.json. They start looking headers relative to

[llvm] [clang] [clang-tools-extra] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-02-05 Thread via cfe-commits
https://github.com/sethp updated https://github.com/llvm/llvm-project/pull/74852 >From f281d34a51f662c934f158e4770774b0dc3588a2 Mon Sep 17 00:00:00 2001 From: Seth Pellegrino Date: Thu, 7 Dec 2023 08:45:51 -0800 Subject: [PATCH 01/12] [Clang][Sema] Print more static_assert exprs This change int

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-02-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify + + +int t(int array[static 12]); +int u(int i); +const int v(int i); /* expected-warning {{'const' type qualifier on return type has no effec}} */ +int x(long); + +typedef int (f1)(long); +typedef int (f2)(voi

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread Shafik Yaghmour via cfe-commits
@@ -201,6 +201,8 @@ Bug Fixes to C++ Support parameter where we did an incorrect specialization of the initialization of the default parameter. Fixes (`#68490 `_) +- Fix regression due missing ambiguity check before check

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -833,13 +885,207 @@ class AnnotatingParser { Left->setType(TT_ArrayInitializerLSquare); } FormatToken *Tok = CurrentToken; + if (Style.isTableGen()) { +if (CurrentToken->isOneOf(tok::comma, tok::minus, tok::ellipsis)) { + // '-' and

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -256,6 +256,18 @@ class AnnotatingParser { } } } + if (Style.isTableGen()) { +if (CurrentToken->isOneOf(tok::comma, tok::equal)) { + // They appears as a separator. Unless it is not in class definition. HazardyKn

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -833,13 +885,207 @@ class AnnotatingParser { Left->setType(TT_ArrayInitializerLSquare); } FormatToken *Tok = CurrentToken; + if (Style.isTableGen()) { +if (CurrentToken->isOneOf(tok::comma, tok::minus, tok::ellipsis)) { + // '-' and

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -1423,11 +1692,30 @@ class AnnotatingParser { if (!Tok->getPreviousNonComment()) Line.IsContinuation = true; } + if (Style.isTableGen()) { +if (Tok->is(Keywords.kw_assert)) { + if (!parseTableGenValue()) +return false

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -833,13 +885,207 @@ class AnnotatingParser { Left->setType(TT_ArrayInitializerLSquare); } FormatToken *Tok = CurrentToken; + if (Style.isTableGen()) { +if (CurrentToken->isOneOf(tok::comma, tok::minus, tok::ellipsis)) { + // '-' and

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -816,7 +816,7 @@ void FormatTokenLexer::handleTableGenMultilineString() { auto CloseOffset = Lex->getBuffer().find("}]", OpenOffset); if (CloseOffset == StringRef::npos) return; - auto Text = Lex->getBuffer().substr(OpenOffset, CloseOffset + 2); + auto Text = Lex->

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -833,13 +885,207 @@ class AnnotatingParser { Left->setType(TT_ArrayInitializerLSquare); } FormatToken *Tok = CurrentToken; + if (Style.isTableGen()) { +if (CurrentToken->isOneOf(tok::comma, tok::minus, tok::ellipsis)) { + // '-' and

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/80730 >From 80f7b2004a9ae980f8d652e870080a8ff53e3664 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Mon, 5 Feb 2024 11:08:25 -0800 Subject: [PATCH] [Clang][Sema] Fix regression due to missing ambiguity check befo

[clang-tools-extra] [llvm] [clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-02-05 Thread via cfe-commits
sethp wrote: Looks like I missed the branch for v18 with this one, hence the conflict (now resolved), too bad. The test that's failing is looking for clang to emit some options that it's not; it looks like the same test is failing on main, so I haven't dug too deep into it. I believe I'm just

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

2024-02-05 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > How does this relate to the existing `shouldOptimizeForSize(Function&, ...)` > and `shouldOptimizeForSize(MachineFunction&, ...)` APIs which appear to > provide similar functionality at a first glance. If they are the same, then > we should have a plan in place to cleanup and

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

2024-02-05 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > FWIW we've tried this with sampling PGO in the past. While on paper this > seems like an obvious thing to do, in reality aggressively tuning down opt > level for cold functions can lead to regression since profile isn't always > accurate. > > That said, as long as this chang

[lldb] [clang] [clang-tools-extra] [libcxxabi] [libc] [flang] [llvm] [lld] [libcxx] [compiler-rt] [TTI][RISCV]Improve costs for fixed vector whole reg extract/insert. (PR #80164)

2024-02-05 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev updated https://github.com/llvm/llvm-project/pull/80164 >From cfd0dcfa1f5fabd12cf4d7bf8d5a10bd324ace0a Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Wed, 31 Jan 2024 16:47:49 + Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-05 Thread David Goldman via cfe-commits
@@ -508,24 +513,46 @@ static bool mayBeValidIdentifier(llvm::StringRef Ident) { !isAsciiIdentifierStart(Ident.front(), AllowDollar)) return false; for (char C : Ident) { +if (AllowColon && C == ':') DavidGoldman wrote: This doesn't check the en

[lldb] [clang] [clang-tools-extra] [libcxxabi] [libc] [flang] [llvm] [lld] [libcxx] [compiler-rt] [TTI][RISCV]Improve costs for fixed vector whole reg extract/insert. (PR #80164)

2024-02-05 Thread Alexey Bataev via cfe-commits
@@ -326,6 +326,48 @@ InstructionCost RISCVTTIImpl::getShuffleCost(TTI::ShuffleKind Kind, switch (Kind) { default: break; +case TTI::SK_ExtractSubvector: + if (isa(SubTp) && + LT.second.getVectorElementType() != MVT::i1) { +unsigned TpReg

[llvm] [clang] [clang-tools-extra] [HLSL] Vector standard conversions (PR #71098)

2024-02-05 Thread Chris B via cfe-commits
llvm-beanz wrote: @rjmccall, friendly ping 😄 https://github.com/llvm/llvm-project/pull/71098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-05 Thread David Goldman via cfe-commits
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl &RenameDecl, Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Re

[llvm] [clang] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-05 Thread Jun Wang via cfe-commits
jwanggit86 wrote: @krzysz00 Code has been updated. Pls take a look when convenient. Pls note the following: (1) Two attributes are now supported, one for min and one for max num of workgroups. (2) It is allowed to only specify one of the two attributes. (3) An attribute is ignored if any one of

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

2024-02-05 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,73 @@ +//===--===// +// +// 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] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-02-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: It's generally not a good idea to use sugar to represent constructs that are semantically significant: anything that uses the canonical type will throw it away. We try to avoid throwing away sugar in most cases, but we aren't always successful. It's possible there are ot

[compiler-rt] [flang] [llvm] [openmp] [libc] [lldb] [mlir] [libcxx] [clang-tools-extra] [clang] [lld] [Driver] Report invalid target triple versions for all environment types. (PR #78655)

2024-02-05 Thread Mike Hommey via cfe-commits
glandium wrote: This broke the wasi-threads target: `clang: error: version 'threads' in target triple 'wasm32-unknown-wasi-threads' is invalid` https://github.com/llvm/llvm-project/pull/78655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

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

2024-02-05 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/69030 >From e52a811c3b643548837b4e630e8293a0b6857ad4 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Fri, 13 Oct 2023 14:40:28 -0700 Subject: [PATCH 1/6] [PGO] Add ability to mark cold functions as optsize/minsiz

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Daniel Rodríguez Troitiño via cfe-commits
drodriguez wrote: > @drodriguez I'm not certain why you think AppleClang prefers `isysroot` over > toolchain headers -- it might be because we simply don't ship libc++ > toolchain headers anymore and we only ship libc++ SDK headers. But if you try > installing libc++ headers in the toolchain a

[clang] [llvm] [Github] Use building LLVM as perf-training for CI container (PR #80713)

2024-02-05 Thread Aiden Grossman via cfe-commits
@@ -0,0 +1,13 @@ +diff --git a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +index 1a04ca9a74e5..d092820e4115 100644 +--- a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +@@ -4,6 +4,8 @@ set(CLANG_BOOTSTRAP_TARGETS + stage2-

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

2024-02-05 Thread via cfe-commits
WenleiHe wrote: > > FWIW we've tried this with sampling PGO in the past. While on paper this > > seems like an obvious thing to do, in reality aggressively tuning down opt > > level for cold functions can lead to regression since profile isn't always > > accurate. > > That said, as long as thi

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

2024-02-05 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/69030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Github] Use building LLVM as perf-training for CI container (PR #80713)

2024-02-05 Thread Tom Stellard via cfe-commits
@@ -0,0 +1,13 @@ +diff --git a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +index 1a04ca9a74e5..d092820e4115 100644 +--- a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +@@ -4,6 +4,8 @@ set(CLANG_BOOTSTRAP_TARGETS + stage2-

[clang-tools-extra] [mlir] [llvm] [clang] [mlir][linalg] Refactor `EraseIdentityGenericOp` to be reused by other `LinalgOp`s (PR #80466)

2024-02-05 Thread via cfe-commits
https://github.com/srcarroll updated https://github.com/llvm/llvm-project/pull/80466 >From f51bb7b15be55e682be76f2289b991ed42ab4d41 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 2 Feb 2024 11:37:03 -0600 Subject: [PATCH 1/3] [mlir][linalg]Implement canonicalizer for `linalg::BroadCastOp` on te

[llvm] [clang] [Github] Use building LLVM as perf-training for CI container (PR #80713)

2024-02-05 Thread Tom Stellard via cfe-commits
https://github.com/tstellar approved this pull request. https://github.com/llvm/llvm-project/pull/80713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-05 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I don't understand, if you're saying the profile is accurate, then those functions are actually cold, so we should be able to mark them as optsize? https://github.com/llvm/llvm-project/pull/69030 ___ cfe-commits mailing list cfe-commit

[clang-tools-extra] [mlir] [llvm] [clang] [MLIR][tensor] Improve `tensor.pack` verifier to catch more cases with unconditional runtime errors (PR #77217)

2024-02-05 Thread via cfe-commits
https://github.com/srcarroll updated https://github.com/llvm/llvm-project/pull/77217 >From e016ccb680d84257fe44e4e408bad6e510eb703d Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 6 Jan 2024 18:51:24 -0600 Subject: [PATCH 1/2] Include output size in determining UB for `tensor.pack` --- .../mlir

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/80741 Summary: The backend supports the wavefrontsize intrinsic, and suggests that it is tied to a corresponding clang builtin, but it is not actually present. This simply adds it in so it can be used from clang. This a

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-amdgpu Author: Joseph Huber (jhuber6) Changes Summary: The backend supports the wavefrontsize intrinsic, and suggests that it is tied to a corresponding clang builtin, but it is not actually present. This simply adds it

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

2024-02-05 Thread Joshua Cranmer via cfe-commits
jcranmer-intel wrote: > I think there is a bit of a problematic interaction with > getDenormalModeForType > [here](https://github.com/llvm/llvm-project/blob/7a94acb2da5b20d12f13f3c5f4eb0f3f46e78e73/clang/lib/Driver/ToolChains/Linux.cpp#L838C8-L838C37). > "-shared" is (should be) a flag used on

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

2024-02-05 Thread via cfe-commits
WenleiHe wrote: > I don't understand, if you're saying the profile is accurate, then those > functions are actually cold, so we should be able to mark them as optsize? Accurate is not black or white. The current heuristic requires certain level of accuracy to be effective. If you make the heur

[llvm] [clang] [Github] Use building LLVM as perf-training for CI container (PR #80713)

2024-02-05 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: Looks like there was a transient failure in the stage2 build while loading the container image. I've restarted it and everything seems to be going fine. Hopefully that's not an issue going forward. https://github.com/llvm/llvm-project/pull/80713 __

[clang] [clang-tools-extra] [mlir] [llvm] [mlir][sparse] Change LevelType enum to 64 bit (PR #80501)

2024-02-05 Thread Aart Bik via cfe-commits
https://github.com/aartbik approved this pull request. https://github.com/llvm/llvm-project/pull/80501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [mlir] [clang] [clang-tools-extra] [mlir][sparse] Change LevelType enum to 64 bit (PR #80501)

2024-02-05 Thread Aart Bik via cfe-commits
https://github.com/aartbik edited https://github.com/llvm/llvm-project/pull/80501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [mlir] [mlir][sparse] Change LevelType enum to 64 bit (PR #80501)

2024-02-05 Thread Aart Bik via cfe-commits
@@ -25,7 +25,9 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(SparseTensor, sparse_tensor); /// These correspond to SparseTensorEncodingAttr::LevelType in the C++ API. /// If updating, keep them in sync and update the static_assert in the impl /// file. -enum MlirSparseTensorLevelT

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

2024-02-05 Thread David Li via cfe-commits
david-xl wrote: > > I don't understand, if you're saying the profile is accurate, then those > > functions are actually cold, so we should be able to mark them as optsize? > > Accurate is not black or white. The current heuristic requires certain level > of accuracy to be effective. If you mak

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Dmitry Polukhin via cfe-commits
dmpolukhin wrote: @ldionne I also haven't see Apple compiler that matches upstream behavior. In https://reviews.llvm.org/D157283#4648242, you mentioned that "Xcode 15 RC" should be such compiler and checked it and couple version after that and none of them matched upstream so I decided to wait

[clang] c166a43 - New calling convention preserve_none (#76868)

2024-02-05 Thread via cfe-commits
Author: weiguozhi Date: 2024-02-05T13:28:43-08:00 New Revision: c166a43c6e6157b1309ea757324cc0a71c078e66 URL: https://github.com/llvm/llvm-project/commit/c166a43c6e6157b1309ea757324cc0a71c078e66 DIFF: https://github.com/llvm/llvm-project/commit/c166a43c6e6157b1309ea757324cc0a71c078e66.diff LOG

[llvm] [clang] New calling convention preserve_none (PR #76868)

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

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread Stanislav Mekhanoshin via cfe-commits
@@ -832,6 +832,13 @@ void test_atomic_inc_dec(local uint *lptr, global uint *gptr, uint val) { res = __builtin_amdgcn_atomic_dec32((volatile global uint*)gptr, val, __ATOMIC_SEQ_CST, ""); } +// CHECK-LABEL test_wavefrontsize( +unsigned test_wavefrontsize() { --

[llvm] [clang-tools-extra] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-02-05 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Unless you want this to be merged as "76656712+11ha...@users.noreply.github.com", change your email privacy settings. https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread Joseph Huber via cfe-commits
@@ -832,6 +832,13 @@ void test_atomic_inc_dec(local uint *lptr, global uint *gptr, uint val) { res = __builtin_amdgcn_atomic_dec32((volatile global uint*)gptr, val, __ATOMIC_SEQ_CST, ""); } +// CHECK-LABEL test_wavefrontsize( +unsigned test_wavefrontsize() { --

[llvm] [clang] [RISCV] Add support for RISC-V Pointer Masking (PR #79929)

2024-02-05 Thread Craig Topper via cfe-commits
topperc wrote: Looks like we missed updating llvm/test/MC/RISCV/attribute-arch.s https://github.com/llvm/llvm-project/pull/79929 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec edited https://github.com/llvm/llvm-project/pull/80741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec approved this pull request. https://github.com/llvm/llvm-project/pull/80741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread Stanislav Mekhanoshin via cfe-commits
@@ -832,6 +832,13 @@ void test_atomic_inc_dec(local uint *lptr, global uint *gptr, uint val) { res = __builtin_amdgcn_atomic_dec32((volatile global uint*)gptr, val, __ATOMIC_SEQ_CST, ""); } +// CHECK-LABEL test_wavefrontsize( +unsigned test_wavefrontsize() { --

[libcxxabi] [lldb] [clang] [flang] [compiler-rt] [lld] [libc] [clang-tools-extra] [libcxx] [llvm] [SLP]Improve findReusedOrderedScalars and graph rotation. (PR #77529)

2024-02-05 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev updated https://github.com/llvm/llvm-project/pull/77529 >From 7440ee8ba235fd871af0999f66d5d6130456400b Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Tue, 9 Jan 2024 21:43:31 + Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[llvm] [clang] [RISCV] Add Ssqosid support to -march. (PR #80747)

2024-02-05 Thread Craig Topper via cfe-commits
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/80747 None >From a92d11432df57ad7172d80157e794ebec63b3410 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 5 Feb 2024 13:46:32 -0800 Subject: [PATCH] [RISCV] Add Ssqosid support to -march. --- clang/test/Prepr

[llvm] [clang] [RISCV] Add Ssqosid support to -march. (PR #80747)

2024-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Craig Topper (topperc) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/80747.diff 8 Files Affected: - (modified) clang/test/Preprocessor/riscv-target-features.c (+9) - (modified) llvm/docs/RISCVUsage.rst (+3) - (modi

[llvm] [clang] [RISCV] Add Ssqosid support to -march. (PR #80747)

2024-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Craig Topper (topperc) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/80747.diff 8 Files Affected: - (modified) clang/test/Preprocessor/riscv-target-features.c (+9) - (modified) llvm/docs/RISCVUsage.rst (+3) - (modifie

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Daniel Rodríguez Troitiño via cfe-commits
drodriguez wrote: The `Xcode.app` I was using in the previous comment was 15.1. I tried again the same steps with the last version I have (Xcode 15.3b1, 15E5178i) and I obtain the same behaviour. https://github.com/llvm/llvm-project/pull/80524 ___ cf

[llvm] [clang-tools-extra] [clang] [codegen] Emit cleanups for lifetime-extended temporaries when an expr contains control-flow (PR #80698)

2024-02-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: If I understand correctly, a "lifetime-extended" cleanup deals with the case of a temporary whose lifetime continues beyond the expression. In other words, it has different lifetimes depending on how you exit the expression: if the variable's lifetime begins, it lasts unt

<    1   2   3   4   5   >