[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-06-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. I accept this change as it's fine for 1.0 version Any fixed can be always done in this or new change. https://github.com/llvm/llvm-project/pull/90830 ___ cfe-commits mailing list cfe-commits@lists

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-06-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.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: Apa

[clang] [clang] Macro for constant rounding mode (PR #92699)

2024-06-04 Thread Serge Pavlov via cfe-commits
spavloff wrote: The discussion for the proposed mechanism is open here: https://discourse.llvm.org/t/rfc-calling-functions-if-pragma-fenv-round-is-present/79372 > > This change introduces macro ROUNDING_MODE, which is a string dependent on > > the constant rounding mode > > It expands to an id

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-06-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/93966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't format comments in SkipMacroDefinitionBody (PR #94425)

2024-06-04 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/94425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM][clang] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-06-04 Thread Chris Copeland via cfe-commits
chrisnc wrote: Ping https://github.com/llvm/llvm-project/pull/91870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-04 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: I think the point is there are two things going on here that people think of as unqualified: 1. "Give me a pointer that's whatever `void *` is" 2. "Give me a pointer in some address space just so I can put a global in some metadata" The vast majority of the time we're talking abou

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-04 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: llvm::PointerType::getUnqual assumes pointers to addr-space 0 are "unqualified"... but the discussion on #88182 concluded that doesn't make sense: the "unqualified" address space is a target-specific choice, and address-space zero isn't required to have any meaning at all.

[clang] [clang-format] Don't format comments in SkipMacroDefinitionBody (PR #94425)

2024-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #94326. --- Full diff: https://github.com/llvm/llvm-project/pull/94425.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+3-3) - (modified) clang/unittests/Format/Forma

[clang] [clang-format] Don't format comments in SkipMacroDefinitionBody (PR #94425)

2024-06-04 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/94425 Fixes #94326. >From 7e4c3e6b5b77085f795d6ccdfbf7279e32741b16 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 4 Jun 2024 21:10:14 -0700 Subject: [PATCH] [clang-format] Don't format comments in SkipMacroDefinit

[clang] [clang-format] Add DiagHandler for getStyle function (PR #91317)

2024-06-04 Thread Owen Pan via cfe-commits
@@ -3945,20 +3945,23 @@ const char *DefaultFallbackStyle = "LLVM"; llvm::ErrorOr> loadAndParseConfigFile(StringRef ConfigFile, llvm::vfs::FileSystem *FS, - FormatStyle *Style, bool AllowUnknownOptions) { + FormatStyle *Style, bool Al

[clang] [clang-format] Add DiagHandler for getStyle function (PR #91317)

2024-06-04 Thread Owen Pan via cfe-commits
@@ -4026,12 +4030,13 @@ Expected getStyle(StringRef StyleName, StringRef FileName, // Reset possible inheritance Style.InheritsParentConfig = false; - auto dropDiagnosticHandler = [](const llvm::SMDiagnostic &, void *) {}; + auto diagHandlerOrDropHandling = + DiagH

[clang] [clang-format] Add DiagHandler for getStyle function (PR #91317)

2024-06-04 Thread Owen Pan via cfe-commits
@@ -4026,12 +4030,13 @@ Expected getStyle(StringRef StyleName, StringRef FileName, // Reset possible inheritance Style.InheritsParentConfig = false; - auto dropDiagnosticHandler = [](const llvm::SMDiagnostic &, void *) {}; + auto diagHandlerOrDropHandling = + DiagH

[clang] [flang] [llvm] [OpenMP][LLVM] Update alloca IP after `PrivCB` in `OMPIRBUIlder` (PR #93920)

2024-06-04 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy closed https://github.com/llvm/llvm-project/pull/93920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7db4e6c - [OpenMP][LLVM] Update alloca IP after `PrivCB` in `OMPIRBUIlder` (#93920)

2024-06-04 Thread via cfe-commits
Author: Kareem Ergawy Date: 2024-06-05T05:13:47+02:00 New Revision: 7db4e6c1ec18785ad3f622556362d83c11d7efef URL: https://github.com/llvm/llvm-project/commit/7db4e6c1ec18785ad3f622556362d83c11d7efef DIFF: https://github.com/llvm/llvm-project/commit/7db4e6c1ec18785ad3f622556362d83c11d7efef.diff

[clang] [clang-format] Allow open brace with trailing comment (no line break) (PR #89956)

2024-06-04 Thread Owen Pan via cfe-commits
owenca wrote: > @owenca Re. draft status: I thought a draft would be a better way (less > presumptuous, more tentative suggestion) to present one particular solution, > while acknowledging the possibility of alternatives. If that's not really the > way a draft is used or if it's more of a prob

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-06-04 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.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: Apa

[clang] Reland "[Win32][ELF] Make CodeView a DebugInfoFormat only for COFF format", second try (PR #88245)

2024-06-04 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/88245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 99b2581 - Reland "[Win32][ELF] Make CodeView a DebugInfoFormat only for COFF format", second try (#88245)

2024-06-04 Thread via cfe-commits
Author: Phoebe Wang Date: 2024-06-05T09:56:08+08:00 New Revision: 99b2581a4b162b718925b791433faaa108745a90 URL: https://github.com/llvm/llvm-project/commit/99b2581a4b162b718925b791433faaa108745a90 DIFF: https://github.com/llvm/llvm-project/commit/99b2581a4b162b718925b791433faaa108745a90.diff L

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-06-04 Thread Vitaly Buka via cfe-commits
@@ -1509,6 +1511,11 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, AddLinkSanitizerLibArgs(Args, CmdArgs, "asan"); } vitalybuka wrote: Driver needs tests https://github.com/llvm/llvm-project/pull/92460 __

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-06-04 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: If you want another round, make sure to click `re-request review` https://github.com/llvm/llvm-project/pull/92460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[Win32][ELF] Make CodeView a DebugInfoFormat only for COFF format", second try (PR #88245)

2024-06-04 Thread Phoebe Wang via cfe-commits
@@ -5,15 +5,15 @@ // NO_GHASH-NOT: "-gcodeview-ghash" // default -// RUN: %clang_cl /Z7 -### -- %s 2>&1 | FileCheck -check-prefix=NO_GHASH %s +// RUN: %clang_cl -target x86_64-windows /Z7 -### -- %s 2>&1 | FileCheck -check-prefix=NO_GHASH %s // enabled -// RUN: %clang_cl /Z7

[clang] Reland "[Win32][ELF] Make CodeView a DebugInfoFormat only for COFF format", second try (PR #88245)

2024-06-04 Thread Phoebe Wang via cfe-commits
@@ -298,15 +298,15 @@ // FioRACE2: "-E" // FioRACE2: "-o" "foo.x" -// RUN: %clang_cl /Z7 /Foa.obj -### -- %s 2>&1 | FileCheck -check-prefix=ABSOLUTE_OBJPATH %s +// RUN: %clang_cl -target x86_64-windows /Z7 /Foa.obj -### -- %s 2>&1 | FileCheck -check-prefix=ABSOLUTE_OBJPATH %

[clang] [clang][RISCV] Update vcpop.v C interface to follow the nameing convention (PR #94318)

2024-06-04 Thread Kito Cheng via cfe-commits
https://github.com/kito-cheng approved this pull request. https://github.com/llvm/llvm-project/pull/94318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV] Update vcpop.v C interface to follow the nameing convention (PR #94318)

2024-06-04 Thread Brandon Wu via cfe-commits
4vtomat wrote: > Could you give few more word on the description to mention we missed that in > the vector crpyto intrinsic proposal, and it's fixing but rather than > incompatible/breaking change for the intrinsic API? Updated description. We are missing `vcpop.v` in the rvv_intrinsic_doc, so

[clang] [clang][RISCV] Update vcpop.v C interface to follow the nameing convention (PR #94318)

2024-06-04 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat edited https://github.com/llvm/llvm-project/pull/94318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV] Update vcpop.v C interface to follow the nameing convention (PR #94318)

2024-06-04 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat edited https://github.com/llvm/llvm-project/pull/94318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [compiler-rt] [flang] [llvm] [BOLT][BAT] Add support for three-way split functions (PR #93760)

2024-06-04 Thread Amir Ayupov via cfe-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/93760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang/utils/TableGen/ClangAttrEmitter.cpp: 2 * pointless copy ? (#94372) (PR #94414)

2024-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (akshaykumars614) Changes modified parameter for code quality --- Full diff: https://github.com/llvm/llvm-project/pull/94414.diff 1 Files Affected: - (modified) clang/utils/TableGen/ClangAttrEmitter.cpp (+3-3) ``diff dif

[clang] clang/utils/TableGen/ClangAttrEmitter.cpp: 2 * pointless copy ? (#94372) (PR #94414)

2024-06-04 Thread via cfe-commits
https://github.com/akshaykumars614 created https://github.com/llvm/llvm-project/pull/94414 modified parameter for code quality >From f4dd886d3a33401865f03a4ca086f6f1f0332293 Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Tue, 4 Jun 2024 19:25:10 -0400 Subject: [PATCH] clang/utils/TableGe

[clang] clang/utils/TableGen/ClangOptionDocEmitter.cpp:220: Pointless string copy ? (#94373) (PR #94413)

2024-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (akshaykumars614) Changes modified parameter for code quality --- Full diff: https://github.com/llvm/llvm-project/pull/94413.diff 1 Files Affected: - (modified) clang/utils/TableGen/ClangOptionDocEmitter.cpp (+1-1) ``dif

[clang] clang/utils/TableGen/ClangOptionDocEmitter.cpp:220: Pointless string copy ? (#94373) (PR #94413)

2024-06-04 Thread via cfe-commits
https://github.com/akshaykumars614 created https://github.com/llvm/llvm-project/pull/94413 modified parameter for code quality >From d07d360dcb00a4e6710c177b79ca4d76a5a863d3 Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Tue, 4 Jun 2024 19:21:25 -0400 Subject: [PATCH] clang/utils/TableGe

[clang] clang/utils/TableGen/NeonEmitter.cpp:1058: pointless string copy ? (#94375) (PR #94408)

2024-06-04 Thread via cfe-commits
https://github.com/akshaykumars614 updated https://github.com/llvm/llvm-project/pull/94408 >From a018f2598f860498711cc46dcb41916d11127f15 Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Tue, 4 Jun 2024 18:59:05 -0400 Subject: [PATCH 1/2] clang/utils/TableGen/NeonEmitter.cpp:1058: pointless

[clang] clang/utils/TableGen/NeonEmitter.cpp:1058: pointless string copy ? (#94375) (PR #94408)

2024-06-04 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 0360d03240f59e6b26a16769943f905c9520fe04 a018f2598f860498711cc46dcb41916d11127f15 --

[clang] clang/utils/TableGen/NeonEmitter.cpp:1058: pointless string copy ? (#94375) (PR #94408)

2024-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (akshaykumars614) Changes modified parameter for code quality --- Full diff: https://github.com/llvm/llvm-project/pull/94408.diff 1 Files Affected: - (modified) clang/utils/TableGen/NeonEmitter.cpp (+1-1) ``diff diff --

[clang] clang/utils/TableGen/NeonEmitter.cpp:1058: pointless string copy ? (#94375) (PR #94408)

2024-06-04 Thread via cfe-commits
https://github.com/akshaykumars614 created https://github.com/llvm/llvm-project/pull/94408 modified parameter for code quality >From a018f2598f860498711cc46dcb41916d11127f15 Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Tue, 4 Jun 2024 18:59:05 -0400 Subject: [PATCH] clang/utils/TableG

[clang] [llvm] [Clang][Sanitizers] Add numerical sanitizer (PR #93783)

2024-06-04 Thread Fangrui Song via cfe-commits
@@ -826,6 +826,10 @@ SanitizerMask Linux::getSupportedSanitizers() const { if (IsX86_64 || IsAArch64) { Res |= SanitizerKind::KernelHWAddress; } + if (IsX86_64) { +Res |= SanitizerKind::NumericalStability; MaskRay wrote: This needs a `fsanitize-*.

[clang] [llvm] [Clang][Sanitizers] Add numerical sanitizer (PR #93783)

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

[clang] [llvm] [Clang][Sanitizers] Add numerical sanitizer (PR #93783)

2024-06-04 Thread Fangrui Song via cfe-commits
@@ -826,6 +826,10 @@ SanitizerMask Linux::getSupportedSanitizers() const { if (IsX86_64 || IsAArch64) { Res |= SanitizerKind::KernelHWAddress; } + if (IsX86_64) { +Res |= SanitizerKind::NumericalStability; MaskRay wrote: drop braces for single-lin

[clang] [llvm] [Clang][Sanitizers] Add numerical sanitizer (PR #93783)

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

[clang] [Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-06-04 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 edited https://github.com/llvm/llvm-project/pull/92031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-06-04 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: Learned more about how loaded files & ASTs are managed in clang. Now opt-out regions in a loaded AST can span over multiple files (within one TU). They now behave in a consistent way when they are from loaded files or local files. https://github.com/llvm/llvm-project/pul

[clang] [lldb] [llvm] Refactor GDB Index into a new file (PR #94405)

2024-06-04 Thread Sayhaan Siddiqui via cfe-commits
https://github.com/sayhaan updated https://github.com/llvm/llvm-project/pull/94405 >From f3533c92b6b64f50a933a9eb2f9cc4229bbd8da3 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Tue, 1 Jun 2021 11:37:41 -0700 Subject: [PATCH 1/2] Rebase: [Facebook] Add clang driver options to test debug info

[clang] [lldb] [llvm] Refactor GDB Index into a new file (PR #94405)

2024-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sayhaan Siddiqui (sayhaan) Changes Create a new class and file for functions that update GDB index. --- Patch is 40.93 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/94405.diff 24 Files Affec

[clang] [lldb] [llvm] Refactor GDB Index into a new file (PR #94405)

2024-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Sayhaan Siddiqui (sayhaan) Changes Create a new class and file for functions that update GDB index. --- Patch is 40.93 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/94405.diff 24 Files Affect

[clang] [lldb] [llvm] Refactor GDB Index into a new file (PR #94405)

2024-06-04 Thread Sayhaan Siddiqui via cfe-commits
https://github.com/sayhaan created https://github.com/llvm/llvm-project/pull/94405 Create a new class and file for functions that update GDB index. >From f3533c92b6b64f50a933a9eb2f9cc4229bbd8da3 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Tue, 1 Jun 2021 11:37:41 -0700 Subject: [PATCH 1/7

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-04 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Following the logic in this argument, would you also say it's appropriate for > someone to commit an LLVM patch that changes how textual LLVM IR is printed > in a way that it breaks existing tests in Clang — without updating those > tests? Possibly! I'm talking about rel

[clang] [WIP][Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-06-04 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/92031 >From ac5aeb5c3a134d085320fc7fc5cf3f2c8c41a1f1 Mon Sep 17 00:00:00 2001 From: ziqingluo-90 Date: Mon, 13 May 2024 13:31:21 -0700 Subject: [PATCH 1/4] fix safe buffer opt-out region serialization --- clang/

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
@@ -140,14 +337,51 @@ class IndirectCallPromoter { // indirect callee with functions. Returns true if there are IR // transformations and false otherwise. bool tryToPromoteWithFuncCmp( - CallBase &CB, const std::vector &Candidates, - uint64_t TotalCount, ArrayRe

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
@@ -321,14 +746,127 @@ bool IndirectCallPromoter::processFunction(ProfileSummaryInfo *PSI) { if (!NumCandidates || (PSI && PSI->hasProfileSummary() && !PSI->isHotCount(TotalCount))) continue; + auto PromotionCandidates = getPromotionCandidatesForCallSite

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
@@ -103,30 +110,220 @@ static cl::opt ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden, cl::desc("Dump IR after transformation happens")); +// This option is meant to be used by LLVM regression test and test the +// transformation that compares vt

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
@@ -103,30 +110,220 @@ static cl::opt ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden, cl::desc("Dump IR after transformation happens")); +// This option is meant to be used by LLVM regression test and test the +// transformation that compares vt

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
@@ -140,14 +337,51 @@ class IndirectCallPromoter { // indirect callee with functions. Returns true if there are IR // transformations and false otherwise. bool tryToPromoteWithFuncCmp( - CallBase &CB, const std::vector &Candidates, - uint64_t TotalCount, ArrayRe

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
@@ -341,6 +879,17 @@ static bool promoteIndirectCalls(Module &M, ProfileSummaryInfo *PSI, bool InLTO, return false; } bool Changed = false; + VirtualCallSiteTypeInfoMap VirtualCSInfo; + + computeVirtualCallSiteTypeInfoMap(M, MAM, VirtualCSInfo); + + // This map reco

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
@@ -103,30 +110,222 @@ static cl::opt ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden, cl::desc("Dump IR after transformation happens")); +// This option is meant to be used by LLVM regression test and test the +// transformation that compares vt

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
@@ -276,35 +585,151 @@ CallBase &llvm::pgo::promoteIndirectCall(CallBase &CB, Function *DirectCallee, // Promote indirect-call to conditional direct-call for one callsite. bool IndirectCallPromoter::tryToPromoteWithFuncCmp( -CallBase &CB, const std::vector &Candidates, -

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
@@ -276,35 +585,151 @@ CallBase &llvm::pgo::promoteIndirectCall(CallBase &CB, Function *DirectCallee, // Promote indirect-call to conditional direct-call for one callsite. bool IndirectCallPromoter::tryToPromoteWithFuncCmp( -CallBase &CB, const std::vector &Candidates, -

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
https://github.com/teresajohnson commented: I haven't looked at the tests yet, but some comments/questions from a first pass through most of the code https://github.com/llvm/llvm-project/pull/81442 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
https://github.com/teresajohnson edited https://github.com/llvm/llvm-project/pull/81442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
@@ -103,30 +110,220 @@ static cl::opt ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden, cl::desc("Dump IR after transformation happens")); +// This option is meant to be used by LLVM regression test and test the +// transformation that compares vt

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
@@ -103,30 +110,220 @@ static cl::opt ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden, cl::desc("Dump IR after transformation happens")); +// This option is meant to be used by LLVM regression test and test the +// transformation that compares vt

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-04 Thread Teresa Johnson via cfe-commits
@@ -103,30 +110,220 @@ static cl::opt ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden, cl::desc("Dump IR after transformation happens")); +// This option is meant to be used by LLVM regression test and test the +// transformation that compares vt

[clang] [llvm] [CLANG][LLVM][AArch64]Add SME2.1 intrinsics for MOVAZ tile to vector,… (PR #88499)

2024-06-04 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov approved this pull request. https://github.com/llvm/llvm-project/pull/88499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CLANG][LLVM][AArch64]SME2.1 intrinsics for MOVAZ tile to 2/4 vectors (PR #88710)

2024-06-04 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov approved this pull request. https://github.com/llvm/llvm-project/pull/88710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][OpenMP] Add -fopenmp-force-usm option to flang (PR #94359)

2024-06-04 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. https://github.com/llvm/llvm-project/pull/94359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-04 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: > A revert is not appropriate when: > lldb tests fail because AST printing has changed in Clang and the printed > output is valid Following the logic in this argument, would you also say it's appropriate for someone to commit an LLVM patch that changes how textual LLVM IR

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/93966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/93966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -899,6 +899,8 @@ class Sema; /// object argument. bool IgnoreObjectArgument : 1; +bool TookAddressOfOverload : 1; AaronBallman wrote: CC @Endilll -- it might be nice to refactor this code to use `LLVM_PREFERRED_TYPE`, but also to fix the bit-f

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -5813,6 +5813,27 @@ static TypoCorrection TryTypoCorrectionForCall(Sema &S, Expr *Fn, return TypoCorrection(); } +// [C++26][[expr.unary.op]/p4 +// A pointer to member is only formed when an explicit & +// is used and its operand is a qualified-id not enclosed in parenth

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -999,6 +1001,8 @@ class Sema; /// Initialization of an object of class type by constructor, /// using either a parenthesized or braced list of arguments. CSK_InitByConstructor, + + CSK_AddressOfOverloadSet, AaronBallman wrote: Please

[clang] [Clang] `constexpr` builtin floating point classification / comparison functions (PR #94118)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/94118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] `constexpr` builtin floating point classification / comparison functions (PR #94118)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! Thank you! https://github.com/llvm/llvm-project/pull/94118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -Wno-return-type -std=c++23 -fsyntax-only -verify %s +// expected-no-diagnostics +constexpr int f() { } +static_assert(__is_same(decltype([] constexpr -> int { }( )), int)); AaronBallman wrote: We already have such an option, b

[clang] [clang] Fix self-capturing `__block` variables (PR #89475)

2024-06-04 Thread via cfe-commits
@@ -2764,6 +2794,9 @@ void CodeGenFunction::emitByrefStructureInit(const AutoVarEmission &emission) { auto layoutInfo = CGM.getObjCRuntime().BuildByrefLayout(CGM, type); storeHeaderField(layoutInfo, getPointerSize(), "byref.layout"); } + + if (emission.NeedsInitOnHe

[clang] [clang] Fix self-capturing `__block` variables (PR #89475)

2024-06-04 Thread via cfe-commits
https://github.com/ille-apple updated https://github.com/llvm/llvm-project/pull/89475 >From 26be4b6332bf6b58b3d99bb0065b854dcce2a944 Mon Sep 17 00:00:00 2001 From: ille-apple Date: Fri, 19 Apr 2024 15:36:44 -0700 Subject: [PATCH 1/3] [clang] Fix self-capturing `__block` variables Clang special

[clang] [clang] Fix self-capturing `__block` variables (PR #89475)

2024-06-04 Thread via cfe-commits
https://github.com/ille-apple updated https://github.com/llvm/llvm-project/pull/89475 >From 26be4b6332bf6b58b3d99bb0065b854dcce2a944 Mon Sep 17 00:00:00 2001 From: ille-apple Date: Fri, 19 Apr 2024 15:36:44 -0700 Subject: [PATCH 1/2] [clang] Fix self-capturing `__block` variables Clang special

[clang] [Clang] Fix potential null pointer dereferences in Sema::AddInitializerToDecl (PR #94368)

2024-06-04 Thread Fred Grim via cfe-commits
https://github.com/feg208 approved this pull request. ltgm https://github.com/llvm/llvm-project/pull/94368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] Reland "[clang] Enable sized deallocation by default in C++14 onwards" (PR #90373)

2024-06-04 Thread Mike Hommey via cfe-commits
glandium wrote: What kind of detail are you looking for? https://github.com/llvm/llvm-project/pull/90373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-04 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89811 >From 3094e6026925ebcba6da86dd16111f4f70f9a700 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 23 Apr 2024 19:33:00 + Subject: [PATCH] [clang-repl] Lay the foundation of pretty printing for C. -

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-04 Thread via cfe-commits
@@ -13367,6 +13367,8 @@ static void DiagnoseConstAssignment(Sema &S, const Expr *E, if (!DiagnosticEmitted) { S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstVariable << VD << VD->getType(); + S.Diag(Loc, diag::note_t

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-04 Thread Rajveer Singh Bharadwaj via cfe-commits
@@ -13367,6 +13367,8 @@ static void DiagnoseConstAssignment(Sema &S, const Expr *E, if (!DiagnosticEmitted) { S.Diag(Loc, diag::err_typecheck_assign_const) << ExprRange << ConstVariable << VD << VD->getType(); + S.Diag(Loc, diag::note_t

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-06-04 Thread Eli Friedman via cfe-commits
@@ -128,6 +128,15 @@ class CodeGenTypes { /// memory representation is usually i8 or i32, depending on the target. llvm::Type *ConvertTypeForMem(QualType T, bool ForBitField = false); + /// Check that size and abi alignment of given LLVM type matches size and + /// align

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-06-04 Thread Eli Friedman via cfe-commits
@@ -761,6 +761,10 @@ bool ConstStructBuilder::Build(const InitListExpr *ILE, bool AllowOverwrite) { if (Field->hasAttr()) AllowOverwrite = true; } else { + llvm::Type *LoadType = CGM.getTypes().convertTypeForLoadStore( efriedma-quic wrot

[clang] [Clang][AMDGPU] Use `I` to decorate imm argument for `__builtin_amdgcn_global_load_lds` (PR #94376)

2024-06-04 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/94376 >From d5ecf4e5f3cd5b7191acf3fd24ef0ac98b8a9f3e Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 4 Jun 2024 15:10:08 -0400 Subject: [PATCH] [Clang][AMDGPU] Use `I` to decorate imm argument for `__builtin_am

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

2024-06-04 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -Wno-return-type -std=c++23 -fsyntax-only -verify %s +// expected-no-diagnostics +constexpr int f() { } +static_assert(__is_same(decltype([] constexpr -> int { }( )), int)); a-tarasyuk wrote: @AaronBallman Thanks for the review

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

2024-06-04 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/94123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

2024-06-04 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -Wno-return-type -std=c++23 -fsyntax-only -verify %s +// expected-no-diagnostics +constexpr int f() { } +static_assert(__is_same(decltype([] constexpr -> int { }( )), int)); a-tarasyuk wrote: @AaronBallman Should a new option (

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

2024-06-04 Thread Oleksandr T. via cfe-commits
@@ -2487,6 +2477,26 @@ static bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl, return true; } +static bool CheckConstexprMissingReturn(Sema &SemaRef, +const FunctionDecl *Dcl) { + bool IsVoidOrDependentType = D

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-04 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: I don't think that assumption is currently true. I think it's also worth clarifying what this thing is, and possibly renaming it, because "unqualified" has C language level meaning that would contradict what it is here. https://github.com/llvm/llvm-project/pull/94388

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-04 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/94388 >From cdf95a804614950167d2d4df227d06a86a70d4bb Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 4 Jun 2024 19:52:28 +0100 Subject: [PATCH] Unqualified `ptr`s should be truly unqualified, and not AS0 ptrs. -

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Alex Voicu (AlexVlx) Changes At the moment we alias `UnqualPtrTy` with the other default AS pointer types, which means that for certain targets using it doesn't actually yield an unqualified pointer. Thi

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

2024-06-04 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/94123 >From 90eeafc82ee08129c2d290e6382f42ec89680049 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 2 Jun 2024 00:07:35 +0300 Subject: [PATCH 1/3] feat(92583): [C++23] update constexpr diagnostics for missin

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-04 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx created https://github.com/llvm/llvm-project/pull/94388 At the moment we alias `UnqualPtrTy` with the other default AS pointer types, which means that for certain targets using it doesn't actually yield an unqualified pointer. This patch changes that so that it does

[clang] [clang][RISCV] Enable RVV with function attribute __attribute__((target("arch=+v"))) (PR #83674)

2024-06-04 Thread Camel Coder via cfe-commits
camel-cdr wrote: Ah, thanks, that works. How can support for behavior be detected? The intrinsic spec says: > The `__riscv_v_intrinsic` macro is the C macro to test the compiler's support > for the RISC-V "V" extension intrinsics. and recommends using: ```c #ifdef __riscv_v_intrinsic #include

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-06-04 Thread Eli Friedman via cfe-commits
@@ -5348,18 +5348,8 @@ Value *ScalarExprEmitter::VisitVAArgExpr(VAArgExpr *VE) { return llvm::UndefValue::get(ArgTy); } - // FIXME Volatility. - llvm::Value *Val = Builder.CreateLoad(ArgPtr); - - // If EmitVAArg promoted the type, we must truncate it. - if (ArgTy !=

[clang] [llvm] [CLANG][LLVM][AArch64]Add SME2.1 intrinsics for MOVAZ tile to vector,… (PR #88499)

2024-06-04 Thread Amara Emerson via cfe-commits
https://github.com/aemerson approved this pull request. https://github.com/llvm/llvm-project/pull/88499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CLANG][LLVM][AArch64]SME2.1 intrinsics for MOVAZ tile to 2/4 vectors (PR #88710)

2024-06-04 Thread Amara Emerson via cfe-commits
https://github.com/aemerson approved this pull request. LGTM unless others have comments. https://github.com/llvm/llvm-project/pull/88710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [llvm] [CLANG][LLVM][AArch64]SME2.1 intrinsics for MOVAZ tile to 2/4 vectors (PR #88710)

2024-06-04 Thread Amara Emerson via cfe-commits
@@ -674,3 +674,26 @@ let TargetGuard = "sme2" in { def SVLUTI2_LANE_ZT_X2 : Inst<"svluti2_lane_zt_{d}_x2", "2.di[i", "cUcsUsiUibhf", MergeNone, "aarch64_sme_luti2_lane_zt_x2", [IsStreaming, IsInZT0], [ImmCheck<0, ImmCheck0_0>, ImmCheck<2, ImmCheck0_7>]>; def SVLUTI4_LANE_Z

[clang] [ASTMatchers] forCallable should not erase binding on success (PR #89657)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from a small nit with the release notes. Do you need someone to land this on your behalf? https://github.com/llvm/llvm-project/pull/89657 ___ cfe-commits mailing list cfe-commits@l

  1   2   3   4   >