[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-01 Thread Fred Fu via cfe-commits
capfredf wrote: @vgvassilev https://github.com/llvm/llvm-project/pull/67349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-01 Thread Pol M via cfe-commits
Destroyerrrocket wrote: Thank you for your work, @ChuanqiXu9, have the best of luck! https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-01 Thread Pol M via cfe-commits
https://github.com/Destroyerrrocket edited https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-01 Thread Pol M via cfe-commits
@@ -0,0 +1,53 @@ +//===-- ProjectModules.h -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-01 Thread Pol M via cfe-commits
@@ -0,0 +1,86 @@ +//===- PrerequisiteModules.h -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-01 Thread Pol M via cfe-commits
https://github.com/Destroyerrrocket requested changes to this pull request. https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream APINotesOptions (PR #70827)

2023-11-01 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/70827 >From 573e7ea751af1be41b3c984e7dc6b334f0ac0142 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Tue, 31 Oct 2023 16:39:45 + Subject: [PATCH] [APINotes] Upstream APINotesOptions This upstreams more of the Cl

[clang] [lldb] [clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (PR #70639)

2023-11-01 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/70639 >From 18db082fc5008283f77cc98d9c733a47c63b7096 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 27 Oct 2023 16:19:47 +0100 Subject: [PATCH 1/8] [clang][DebugInfo] Emit global variable definitions for st

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-01 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev edited https://github.com/llvm/llvm-project/pull/67349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-01 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev commented: Looks like this is heading in a good direction. Thank you! https://github.com/llvm/llvm-project/pull/67349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-01 Thread Vassil Vassilev via cfe-commits
@@ -56,26 +69,135 @@ class ReplCompletionConsumer : public CodeCompleteConsumer { std::shared_ptr CCAllocator; CodeCompletionTUInfo CCTUInfo; std::vector &Results; + ReplCodeCompletion &CC; +}; + +class CompletionContextHanndler { +protected: + CodeCompletionContext CC

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-01 Thread Vassil Vassilev via cfe-commits
@@ -101,6 +223,7 @@ class ExternalSource : public clang::ExternalASTSource { ASTContext &ParentASTCtxt, FileManager &ParentFM); bool FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name) override; +

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-01 Thread Vassil Vassilev via cfe-commits
@@ -56,26 +69,135 @@ class ReplCompletionConsumer : public CodeCompleteConsumer { std::shared_ptr CCAllocator; CodeCompletionTUInfo CCTUInfo; std::vector &Results; + ReplCodeCompletion &CC; +}; + +class CompletionContextHanndler { +protected: + CodeCompletionContext CC

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-01 Thread Vassil Vassilev via cfe-commits
@@ -56,26 +69,135 @@ class ReplCompletionConsumer : public CodeCompleteConsumer { std::shared_ptr CCAllocator; CodeCompletionTUInfo CCTUInfo; std::vector &Results; + ReplCodeCompletion &CC; +}; + +class CompletionContextHanndler { +protected: + CodeCompletionContext CC

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-01 Thread Vassil Vassilev via cfe-commits
@@ -23,8 +23,13 @@ namespace clang { class CodeCompletionResult; class CompilerInstance; -void codeComplete(CompilerInstance *InterpCI, llvm::StringRef Content, - unsigned Line, unsigned Col, const CompilerInstance *ParentCI, - std::vector &C

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-01 Thread Vassil Vassilev via cfe-commits
@@ -166,8 +300,37 @@ void ExternalSource::completeVisibleDeclsMap( SetExternalVisibleDeclsForName(ChildDeclContext, importedNamedDecl->getDeclName(), importedNamedDecl); -

[clang] [ClangRepl] Type Directed Code Completion (PR #67349)

2023-11-01 Thread Vassil Vassilev via cfe-commits
@@ -56,26 +69,135 @@ class ReplCompletionConsumer : public CodeCompleteConsumer { std::shared_ptr CCAllocator; CodeCompletionTUInfo CCTUInfo; std::vector &Results; + ReplCodeCompletion &CC; +}; + +class CompletionContextHanndler { vgvassilev wrote: ```

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-01 Thread Yusra Syeda via cfe-commits
https://github.com/ysyeda updated https://github.com/llvm/llvm-project/pull/68926 >From 78f82bcf33998de0663f4684a64a240f2e97f8a9 Mon Sep 17 00:00:00 2001 From: Yusra Syeda Date: Thu, 12 Oct 2023 16:56:27 -0400 Subject: [PATCH 01/13] This change adds support for the PPA2 section in zOS --- cla

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-01 Thread Yusra Syeda via cfe-commits
@@ -976,6 +976,40 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +getModule().addModuleFlag(llvm::Modu

[clang-tools-extra] [clang] [libcxx] [llvm] [libc++] Fix complexity guarantee in ranges::clamp (PR #68413)

2023-11-01 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/68413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Improve locality of recently refactored enums (PR #70943)

2023-11-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/70943 This patch moves definition of recently refactored enums closer to the types where they were originally defined. Since they are scoped enums at namespace scope now, they can be forward-declared. Refactorings in

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -192,6 +192,13 @@ class AttributeCommonInfo { bool isC23Attribute() const { return SyntaxUsed == AS_C23; } + bool isAlignas() const { +// In the current state of code, IsAlignas is only configured to return AaronBallman wrote: How about: ``` // FIX

[clang] [clang][NFC] Improve locality of recently refactored enums (PR #70943)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch moves definition of recently refactored enums closer to the types where they were originally defined. Since they are scoped enums at namespace scope now, they can be forward-declared. Refac

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread David Truby via cfe-commits
https://github.com/DavidTruby updated https://github.com/llvm/llvm-project/pull/70833 >From 9e84729cada6c032c64934ee519e605407aab049 Mon Sep 17 00:00:00 2001 From: David Truby Date: Tue, 31 Oct 2023 15:07:13 + Subject: [PATCH 1/3] [flang][windows] Add option to link against specific MSVC C

[compiler-rt] [llvm] [clang] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-01 Thread Matthew Devereau via cfe-commits
@@ -2,6 +2,8 @@ // RUN:| FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \ // RUN:| FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: llvm-mc -triple=aarch64 -show-encoding -m

[clang] [SPIRV] Add -spirv option to DXC driver (PR #65989)

2023-11-01 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/65989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [llvm] [clang] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-01 Thread Matthew Devereau via cfe-commits
@@ -491,13 +491,13 @@ bool AArch64Subtarget::isStreamingCompatible() const { } bool AArch64Subtarget::isNeonAvailable() const { - return hasNEON() && !isStreaming() && !isStreamingCompatible(); + return (hasNEON() || hasSMEFA64()) && !isStreaming() && MDever

[compiler-rt] [llvm] [clang] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-01 Thread Matthew Devereau via cfe-commits
@@ -508,6 +508,9 @@ def FeatureSMEI16I64 : SubtargetFeature<"sme-i16i64", "HasSMEI16I64", "true", def FeatureSMEF16F16 : SubtargetFeature<"sme-f16f16", "HasSMEF16F16", "true", "Enable SME2.1 non-widening Float16 instructions (FEAT_SME_F16F16)", []>; +def FeatureSMEFA64 : Su

[compiler-rt] [llvm] [clang] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-01 Thread Matthew Devereau via cfe-commits
@@ -1363,6 +1364,8 @@ static void __init_cpu_features_constructor(unsigned long hwcap, setCPUFeature(FEAT_SME_I64); if (hwcap2 & HWCAP2_SME_F64F64) setCPUFeature(FEAT_SME_F64); + if (hwcap2 & HWCAP2_SME_FA64) MDevereau wrote: I've defined it now.

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-01 Thread Yusra Syeda via cfe-commits
https://github.com/ysyeda updated https://github.com/llvm/llvm-project/pull/68926 >From 78f82bcf33998de0663f4684a64a240f2e97f8a9 Mon Sep 17 00:00:00 2001 From: Yusra Syeda Date: Thu, 12 Oct 2023 16:56:27 -0400 Subject: [PATCH 01/14] This change adds support for the PPA2 section in zOS --- cla

[compiler-rt] [llvm] [clang] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-01 Thread Matthew Devereau via cfe-commits
@@ -248,8 +250,9 @@ inline constexpr ExtensionInfo Extensions[] = { {"simd", AArch64::AEK_SIMD, "+neon", "-neon", FEAT_SIMD, "+fp-armv8,+neon", 100}, {"sm4", AArch64::AEK_SM4, "+sm4", "-sm4", FEAT_SM4, "+sm4,+fp-armv8,+neon", 60}, {"sme-f16f16", AArch64::AEK_SMEF1

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread David Truby via cfe-commits
@@ -976,12 +976,46 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[clang] [Clang] Fix a crash when using ast-dump=json (PR #70224)

2023-11-01 Thread Chris B via cfe-commits
llvm-beanz wrote: @elizabethandrews ignore the clang-format failure. The action isn't fetching enough commits from git in some cases which leads to this failure. https://github.com/llvm/llvm-project/pull/70224 ___ cfe-commits mailing list cfe-commits@

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-01 Thread via cfe-commits
@@ -421,13 +421,102 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm_unreachable("Unexpected C++ library type; only libc++ is supported."); } +// This function processes all the mtocdata options to build the final +// simplified toc data options to pass

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-01 Thread via cfe-commits
@@ -421,13 +421,102 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm_unreachable("Unexpected C++ library type; only libc++ is supported."); } +// This function processes all the mtocdata options to build the final +// simplified toc data options to pass

[clang] [llvm] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-01 Thread via cfe-commits
@@ -421,13 +421,102 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm_unreachable("Unexpected C++ library type; only libc++ is supported."); } +// This function processes all the mtocdata options to build the final +// simplified toc data options to pass

[clang] [llvm] [clang-tools-extra] [llvm-profdata] Emit warning when counter value is greater than 2^56. (PR #69513)

2023-11-01 Thread via cfe-commits
zmodem wrote: Great, thanks for confirming! https://github.com/llvm/llvm-project/pull/69513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-01 Thread via cfe-commits
@@ -421,13 +421,102 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm_unreachable("Unexpected C++ library type; only libc++ is supported."); } +// This function processes all the mtocdata options to build the final +// simplified toc data options to pass

[clang] [AArch64][Clang] Refactor code to emit SVE & SME builtins (PR #70662)

2023-11-01 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm closed https://github.com/llvm/llvm-project/pull/70662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread David Truby via cfe-commits
@@ -976,12 +976,46 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[clang] [llvm] [libcxx] [clang-tools-extra] [libc++] Allow running the test suite with optimizations (PR #68753)

2023-11-01 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/68753 >From 9824ef111975386152173916c1fd6a85264be0a0 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 10 Oct 2023 16:35:11 -0700 Subject: [PATCH 1/3] [libc++] Allow running the test suite with optimizations This

[clang] [clang][NFC] Improve locality of recently refactored enums (PR #70943)

2023-11-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/70943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 24228ae - [clang][NFC] Improve locality of recently refactored enums (#70943)

2023-11-01 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-01T19:47:06+04:00 New Revision: 24228aef56291bae6d10f44d1a40b5cf25bc59d2 URL: https://github.com/llvm/llvm-project/commit/24228aef56291bae6d10f44d1a40b5cf25bc59d2 DIFF: https://github.com/llvm/llvm-project/commit/24228aef56291bae6d10f44d1a40b5cf25bc59d2.

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread David Truby via cfe-commits
@@ -976,12 +976,46 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[clang] [clang]get non-injected-class before finding instantiated decl (PR #70886)

2023-11-01 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/70886 >From 73471336857b84c69e51d4561838e588c7162bfa Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 31 Oct 2023 17:27:35 +0800 Subject: [PATCH 1/3] [clang]get non-injected-class before finding instantiated

[clang] [llvm] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-11-01 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/67166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-11-01 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/67166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-11-01 Thread Nikita Popov via cfe-commits
@@ -978,8 +1031,10 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, } // If the client is only demanding bits that we know, return the known - // constant. - if (DemandedMask.isSubsetOf(Known.Zero|Known.One)) + // constant. We can't dir

[llvm] [clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-11-01 Thread Nikita Popov via cfe-commits
@@ -6411,6 +6411,44 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +if (isa(Op0) || isa(Op1)) + return PoisonValue::get(Op0->getType()); + +

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread David Truby via cfe-commits
https://github.com/DavidTruby edited https://github.com/llvm/llvm-project/pull/70833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-11-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D140996#4655288 , @bolshakov-a wrote: > Sorry, but I don't know what remains to be done here. It seems that the only > important question is about ABI, but I've already answered that the changes > under discussion seem

[llvm] [clang] [compiler-rt] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-01 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 e2550b7aa072130230baa9dba0feff808ffe907d 053409736cd1ab748d9aef01cd896a889062ddc6 --

[clang] Reland "[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes" (PR #69676)

2023-11-01 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: this breaks ``` $ cat /tmp/a2.ii template struct enable_if; template struct A { template struct C { C(B...); template = 0> C(A); }; template C(B...) -> C; }; int New; struct S : A { void f() { C{New}; } }; $ clang -fsyntax-only -std=c++20 /tmp/a2.ii

[clang] [lldb] [clang][NFC] Rename ArgPassingKind to RecordArgPassingKind (PR #70955)

2023-11-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/70955 During the recent refactoring (b120fe8d3288c4dca1b5427ca34839ce8833f71c) this enum was moved out of `RecordDecl`. During post-commit review it was found out that its association with `RecordDecl` should be expre

[clang] [lldb] [clang][NFC] Rename ArgPassingKind to RecordArgPassingKind (PR #70955)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes During the recent refactoring (b120fe8d3288c4dca1b5427ca34839ce8833f71c) this enum was moved out of `RecordDecl`. During post-commit review it was found out that its association with `RecordDecl` shoul

[compiler-rt] [clang] [llvm] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-01 Thread Sander de Smalen via cfe-commits
@@ -1133,6 +1133,9 @@ typedef struct __ifunc_arg_t { #ifndef HWCAP2_SME_F64F64 #define HWCAP2_SME_F64F64 (1 << 25) #endif +#ifndef HWCAP2_SME_FA64 +#define HWCAP2_SME_FA64 (1 << 26) sdesmalen-arm wrote: Where did you get the `1 << 26` from? I think it should b

[llvm] [clang] [compiler-rt] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-01 Thread Sander de Smalen via cfe-commits
@@ -491,13 +491,15 @@ bool AArch64Subtarget::isStreamingCompatible() const { } bool AArch64Subtarget::isNeonAvailable() const { - return hasNEON() && !isStreaming() && !isStreamingCompatible(); + if (hasSMEFA64()) +return true; + return (hasNEON() && !isStreaming() && !

[compiler-rt] [clang] [llvm] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-01 Thread Sander de Smalen via cfe-commits
@@ -491,13 +491,15 @@ bool AArch64Subtarget::isStreamingCompatible() const { } bool AArch64Subtarget::isNeonAvailable() const { - return hasNEON() && !isStreaming() && !isStreamingCompatible(); + if (hasSMEFA64()) +return true; + return (hasNEON() && !isStreaming() && !

[clang] [openmp] [OpenMP][FIX] Allocate per launch memory for GPU team reductions (PR #70752)

2023-11-01 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. LG with some nits https://github.com/llvm/llvm-project/pull/70752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [OpenMP][FIX] Allocate per launch memory for GPU team reductions (PR #70752)

2023-11-01 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/70752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [OpenMP][FIX] Allocate per launch memory for GPU team reductions (PR #70752)

2023-11-01 Thread Shilei Tian via cfe-commits
@@ -194,6 +191,9 @@ int32_t __kmpc_nvptx_teams_reduce_nowait_v2( ThreadId = 0; } + uint32_t &IterCnt = state::getKernelLaunchEnvironment().ReductionIterCnt; + uint32_t &Cnt = state::getKernelLaunchEnvironment().ReductionCnt; shiltian wrote: These two

[openmp] [clang] [OpenMP][FIX] Allocate per launch memory for GPU team reductions (PR #70752)

2023-11-01 Thread Shilei Tian via cfe-commits
@@ -387,7 +387,7 @@ struct GenericKernelTy { KernelEnvironmentTy KernelEnvironment; /// The prototype kernel launch environment. - KernelLaunchEnvironmentTy KernelLaunchEnvironment; + KernelLaunchEnvironmentTy KernelLaunchEnvironment = {0, 0}; shiltian w

[PATCH] D156910: [clang] Add pragma force_vectorize

2023-11-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D156910#4602946 , @kitaisreal wrote: > Hello @aaron.ballman, @erichkeane could you please review this revision ? I > wondering if this feature would be useful. My apologies, this fell off my radar by accident, sorry fo

[openmp] [clang] [OpenMP][FIX] Allocate per launch memory for GPU team reductions (PR #70752)

2023-11-01 Thread Johannes Doerfert via cfe-commits
@@ -194,6 +191,9 @@ int32_t __kmpc_nvptx_teams_reduce_nowait_v2( ThreadId = 0; } + uint32_t &IterCnt = state::getKernelLaunchEnvironment().ReductionIterCnt; + uint32_t &Cnt = state::getKernelLaunchEnvironment().ReductionCnt; jdoerfert wrote: They are,

[PATCH] D159309: [ASTMatchers] basic matcher support for ConceptReference

2023-11-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM as well btw -- @sammccall, it looks like this one may have fallen off your radar? (Please add a release note when landing though; we have a section for AST matchers specifically.) Repository: rG LLVM Github Monorepo C

[clang] a8ead56 - [clang][NFC] Rename ArgPassingKind to RecordArgPassingKind (#70955)

2023-11-01 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-01T20:38:28+04:00 New Revision: a8ead5606800261e94c2c703a366c59a12347fc4 URL: https://github.com/llvm/llvm-project/commit/a8ead5606800261e94c2c703a366c59a12347fc4 DIFF: https://github.com/llvm/llvm-project/commit/a8ead5606800261e94c2c703a366c59a12347fc4.

[lldb] [clang] [clang][NFC] Rename ArgPassingKind to RecordArgPassingKind (PR #70955)

2023-11-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/70955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [llvm] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-01 Thread Matthew Devereau via cfe-commits
@@ -1133,6 +1133,9 @@ typedef struct __ifunc_arg_t { #ifndef HWCAP2_SME_F64F64 #define HWCAP2_SME_F64F64 (1 << 25) #endif +#ifndef HWCAP2_SME_FA64 +#define HWCAP2_SME_FA64 (1 << 26) MDevereau wrote: Where did you get 30 from? https://github.com/llvm/llvm-proj

[compiler-rt] [clang] [llvm] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-01 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau edited https://github.com/llvm/llvm-project/pull/70809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Please be sure to add a reasonable description to the patch summary so that reviewers know more about what's going on, but thank you for already having written docs (that helps give context). The changes should come with a release note as well. https

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/70762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -7416,3 +7416,46 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CodeAlignAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "clang::code_align"; + let Content = [{ +The ``clang::code_align(N)``

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -322,6 +322,56 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI, +Expr *E) { + if

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -4280,3 +4280,12 @@ def PreferredType: InheritableAttr { let Args = [TypeArgument<"Type", 1>]; let Documentation = [PreferredTypeDocumentation]; } + +def CodeAlign: StmtAttr { + let Spellings = [CXX11<"clang", "code_align">, + C23<"clang", "code_align"

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -788,6 +797,20 @@ void LoopInfoStack::push(BasicBlock *Header, clang::ASTContext &Ctx, } } + // Translate 'loop attributes' arguments to equivalent Attr enums. + // It's being handled separately from LoopHintAttrs not to support + // legacy GNU attributes and prag

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -322,6 +322,56 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI, +Expr *E) { + if

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -7416,3 +7416,46 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CodeAlignAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "clang::code_align"; + let Content = [{ +The ``clang::code_align(N)``

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Aaron Ballman via cfe-commits
@@ -10026,6 +10026,10 @@ def err_duplicate_case_differing_expr : Error< def warn_case_empty_range : Warning<"empty case range specified">; def warn_missing_case_for_condition : Warning<"no case matching constant switch condition '%0'">; +def err_loop_attr_duplication : Error<

[compiler-rt] [llvm] [clang] [clang-tools-extra] Bfi precision (PR #66285)

2023-11-01 Thread David Li via cfe-commits
david-xl wrote: @MatzeB ,Our internal release testing have seen lots of very large regressions for tests without PGO or with XFDO only. While I agree this patch is the right way to go and the good performance (without PGO) with oldBFI is somewhat by chance, it is still better not to regress th

[clang-tools-extra] [llvm] [clang] [compiler-rt] Bfi precision (PR #66285)

2023-11-01 Thread Matthias Braun via cfe-commits
MatzeB wrote: Do you just see regression or also some wins? I don't know whether this is all stems from the `isColdCallSite` behavior, and not just the usual some things get better some things get worse situation you can easily have when inlining changes? https://github.com/llvm/llvm-project/

[clang] [llvm] [compiler-rt] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-11-01 Thread Mingming Liu via cfe-commits
@@ -43,7 +45,8 @@ int main(int argc, const char *argv[]) { uint64_t bufsize = __llvm_profile_get_size_for_buffer_internal( __llvm_profile_begin_data(), __llvm_profile_end_data(), __llvm_profile_begin_counters(), __llvm_profile_end_counters(), - __llvm_profile

[clang] [llvm] [compiler-rt] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-11-01 Thread Mingming Liu via cfe-commits
@@ -1,7 +1,7 @@ RUN: %clang_pgogen -O2 -fuse-ld=bfd -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -DSTRESS=1 -o %t.ir.warn %S/../Inputs/instrprof-value-prof-real.c RUN: env LLVM_PROFILE_FILE=%t.ir.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t.ir.warn 2>&1 |FileC

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-01 Thread Yeoul Na via cfe-commits
@@ -330,6 +330,14 @@ def warn_alias_with_section : Warning< "as the %select{aliasee|resolver}2">, InGroup; +let CategoryName = "Bounds Safety Issue" in { +def err_bounds_safety_lang_not_supported : Error< + "bounds safety is only supported for C">; +def warn_bounds_safety

[clang] [llvm] [compiler-rt] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-11-01 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 7c2ef38c36eda2907cd6a3efff88bb86a1b381a3 82fac8e25798772862c52a6b31ef09f6a2be4757 --

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -4280,3 +4280,12 @@ def PreferredType: InheritableAttr { let Args = [TypeArgument<"Type", 1>]; let Documentation = [PreferredTypeDocumentation]; } + +def CodeAlign: StmtAttr { + let Spellings = [CXX11<"clang", "code_align">, + C23<"clang", "code_align"

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -0,0 +1,124 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local %s erichkeane wrote: ```suggestion // RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local %s -x c ``` https://github.com/llvm/llvm-project/pull/70762

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -0,0 +1,124 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s + +// Add diagnostics tests for Loop attribute: [[clang::code_align()]]. erichkeane wrote:

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -7416,3 +7416,46 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CodeAlignAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "clang::code_align"; + let Content = [{ +The ``clang::code_align(N)``

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -0,0 +1,124 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s + +// Add diagnostics tests for Loop attribute: [[clang::code_align()]]. + +void foo() { + int i; + int a

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -7416,3 +7416,46 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CodeAlignAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "clang::code_align"; + let Content = [{ +The ``clang::code_align(N)``

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -322,6 +322,56 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI, +Expr *E) { + if

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -788,6 +797,20 @@ void LoopInfoStack::push(BasicBlock *Header, clang::ASTContext &Ctx, } } + // Translate 'loop attributes' arguments to equivalent Attr enums. + // It's being handled separately from LoopHintAttrs not to support + // legacy GNU attributes and prag

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -440,6 +440,14 @@ MDNode *LoopInfo::createMetadata( Ctx, {MDString::get(Ctx, "llvm.loop.parallel_accesses"), AccGroup})); } + // Setting clang::code_align attribute. + if (Attrs.CodeAlign > 0) { erichkeane wrote: Where is this consumed? http

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -322,6 +322,56 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI, +Expr *E) { + if

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Erich Keane via cfe-commits
@@ -7416,3 +7416,46 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CodeAlignAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "clang::code_align"; + let Content = [{ +The ``clang::code_align(N)``

[clang] [clang-tools-extra] [clang][AST] Fix crash in MatchChildASTVisitor::TraverseLambdaExpr (PR #70962)

2023-11-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/70962 When a lambda expression captures a VLA array by reference, the 'capture_init' array contains one element, which is 'nullptr'. While traversing the AST with the 'IgnoreUnlessSpelledInSource' flag, there is a de

[clang] [clang-tools-extra] [clang][AST] Fix crash in MatchChildASTVisitor::TraverseLambdaExpr (PR #70962)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes When a lambda expression captures a VLA array by reference, the 'capture_init' array contains one element, which is 'nullptr'. While traversing the AST with the 'IgnoreUnlessSpelledInSource' flag, there

[clang] [AArch64][Clang] Refactor code to emit SVE & SME builtins (PR #70959)

2023-11-01 Thread Kerry McLaughlin via cfe-commits
kmclaughlin-arm wrote: This patch was originally committed in #70662, but it was reverted as it was missing updates to the acle_sve2p1_st1.c & acle_sve2p1_stnt1.c tests. The first commit in this pull request contains the original patch and the second contains the updated tests. https://github

[compiler-rt] [llvm] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-11-01 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/66825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][Clang] Refactor code to emit SVE & SME builtins (PR #70959)

2023-11-01 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm unassigned https://github.com/llvm/llvm-project/pull/70959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >