[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-28 Thread Chuanqi Xu via cfe-commits
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation ) { return false; } + if (C.getArgs().hasArg(options::OPT_print_library_module_manifest_path)) { +llvm::outs() << "module: =" ChuanqiXu9 wrote: But "module: =" doesn't look

[clang] [llvm] [RFC][RISCV] Support RISC-V Profiles in -march option (PR #76357)

2023-12-28 Thread Wang Pengcheng via cfe-commits
W-angler wrote: Current implementation is based on the comment(https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/36#issuecomment-1867859642), not the RFC. @dtcxzyw https://github.com/llvm/llvm-project/pull/76357 ___ cfe-commits

[clang] [llvm] [RFC][RISCV] Support RISC-V Profiles in -march option (PR #76357)

2023-12-28 Thread Yingwei Zheng via cfe-commits
@@ -0,0 +1,112 @@ +// RUN: %clang -### -c %s 2>&1 -march=rvi20u32 | FileCheck -check-prefix=RVI20U32 %s +// RVI20U32: "-target-cpu" "generic-rv32" +// RVI20U32: "-target-feature" "-a" +// RVI20U32: "-target-feature" "-c" +// RVI20U32: "-target-feature" "-d" +// RVI20U32:

[llvm] [clang] [RFC][RISCV] Support RISC-V Profiles in -march option (PR #76357)

2023-12-28 Thread Yingwei Zheng via cfe-commits
@@ -206,6 +210,17 @@ static const RISCVSupportedExtension SupportedExperimentalExtensions[] = { {"zvfbfwma", RISCVExtensionVersion{0, 8}}, }; +static const RISCVProfile SupportedProfiles[] = { +{"rvi20u32", "rv32i"}, dtcxzyw wrote: Profile names

[clang-tools-extra] [clangd] Avoid crash when summarizing pointer-to-member expr for block-end hint (PR #76492)

2023-12-28 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/76492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] dbd1fb8 - [clangd] Avoid crash when summarizing pointer-to-member expr for block-end hint (#76492)

2023-12-28 Thread via cfe-commits
Author: Nathan Ridge Date: 2023-12-29T02:18:48-05:00 New Revision: dbd1fb8e6f1e4a8c91059308b286f8f2a9471a8e URL: https://github.com/llvm/llvm-project/commit/dbd1fb8e6f1e4a8c91059308b286f8f2a9471a8e DIFF: https://github.com/llvm/llvm-project/commit/dbd1fb8e6f1e4a8c91059308b286f8f2a9471a8e.diff

[clang-tools-extra] [clangd] Avoid crash when summarizing pointer-to-member expr for block-end hint (PR #76492)

2023-12-28 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > btw, it looks like there is a FIXME > (https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/ExprCXX.cpp#L677) > for supporting this particular case. I saw it, but I'm not clear on what that would look like. Which member function a member function pointer

[clang] [clang] Correctly implement CWG 2672 (PR #75001)

2023-12-28 Thread Younan Zhang via cfe-commits
zyn0217 wrote: friendly ping~ https://github.com/llvm/llvm-project/pull/75001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Avoid crash when summarizing pointer-to-member expr for block-end hint (PR #76492)

2023-12-28 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/76492 >From ec31d400915dba372501c49db8bab7c8123228df Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 28 Dec 2023 02:47:04 -0500 Subject: [PATCH] [clangd] Avoid crash when summarizing pointer-to-member

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-28 Thread Mark de Wever via cfe-commits
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation ) { return false; } + if (C.getArgs().hasArg(options::OPT_print_library_module_manifest_path)) { +llvm::outs() << "module: =" mordante wrote: returning an empty string gives

[clang] [clang-format] Fix bad indentation with attribute and templated type (PR #76336)

2023-12-28 Thread Owen Pan via cfe-commits
@@ -26492,6 +26492,10 @@ TEST_F(FormatTest, BreakAfterAttributes) { verifyFormat("[[nodiscard]]\n" "Foo& operator-(Foo&);", Style); + + verifyFormat("[[maybe_unused]]\n" + "foo f;", owenca wrote: ```suggestion

[clang] [clang-format] Fix bad indentation with attribute and templated type (PR #76336)

2023-12-28 Thread Owen Pan via cfe-commits
@@ -26492,6 +26492,10 @@ TEST_F(FormatTest, BreakAfterAttributes) { verifyFormat("[[nodiscard]]\n" "Foo& operator-(Foo&);", Style); + + verifyFormat("[[maybe_unused]]\n" + "foo f;", + Style); owenca

[llvm] [clang] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Yingwei Zheng (dtcxzyw) Changes This patch deduces `noundef` attributes for return values. IIUC, a function returns `noundef` values iff all of its return values are guaranteed not to be `undef` or `poison`. Definition of `noundef`

[clang] [llvm] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-clang Author: Yingwei Zheng (dtcxzyw) Changes This patch deduces `noundef` attributes for return values. IIUC, a function returns `noundef` values iff all of its return values are guaranteed not to be `undef` or

[clang] [llvm] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-28 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw created https://github.com/llvm/llvm-project/pull/76553 This patch deduces `noundef` attributes for return values. IIUC, a function returns `noundef` values iff all of its return values are guaranteed not to be `undef` or `poison`. Definition of `noundef` from

[llvm] [clang] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-28 Thread John McCall via cfe-commits
@@ -4598,8 +4602,7 @@ LValue CodeGenFunction::EmitLValueForField(LValue base, if (base.getTBAAInfo().isMayAlias() || rec->hasAttr() || FieldType->isVectorType()) { FieldTBAAInfo = TBAAAccessInfo::getMayAliasInfo(); - } else if (rec->isUnion()) { -// TODO:

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-28 Thread John McCall via cfe-commits
@@ -184,13 +205,59 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { return getChar(); // Handle pointers and references. - // TODO: Implement C++'s type "similarity" and consider dis-"similar" - // pointers distinct. - if (Ty->isPointerType() ||

[llvm] [clang] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-28 Thread John McCall via cfe-commits
@@ -105,13 +105,34 @@ static bool isValidBaseType(QualType QTy) { if (RD->hasFlexibleArrayMember()) return false; // RD can be struct, union, class, interface or enum. -// For now, we only handle struct and class. -if (RD->isStruct() || RD->isClass()) +

[llvm] [clang] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-28 Thread John McCall via cfe-commits
@@ -184,13 +199,24 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { return getChar(); // Handle pointers and references. - // TODO: Implement C++'s type "similarity" and consider dis-"similar" - // pointers distinct. - if (Ty->isPointerType() ||

[clang] [clang-format] Add .clang-format-ignore for ignoring files (PR #76327)

2023-12-28 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/76327 >From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 24 Dec 2023 01:18:55 -0800 Subject: [PATCH 1/7] [clang-format] Add .clang-format.ignore for ignoring files

[clang] [clang-format] Add .clang-format-ignore for ignoring files (PR #76327)

2023-12-28 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/76327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add .clang-format.ignore for ignoring files (PR #76327)

2023-12-28 Thread Owen Pan via cfe-commits
@@ -570,6 +571,74 @@ static int dumpConfig(bool IsSTDIN) { return 0; } +// Check whether `FilePath` is ignored according to the nearest +// .clang-format-ignore file based on the rules below: +// - A blank line is skipped. +// - Leading and trailing spaces of a line are

[clang] [clang-format] Add .clang-format.ignore for ignoring files (PR #76327)

2023-12-28 Thread Owen Pan via cfe-commits
@@ -570,6 +571,74 @@ static int dumpConfig(bool IsSTDIN) { return 0; } +// Check whether `FilePath` is ignored according to the nearest +// .clang-format-ignore file based on the rules below: +// - A blank line is skipped. +// - Leading and trailing spaces of a line are

[clang] 2d0b55c - [Driver][test] -fbasic-block-sections: replace legacy -target with --target=

2023-12-28 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-12-28T19:39:50-08:00 New Revision: 2d0b55c7756c376b221b58cd939b320c6b569de7 URL: https://github.com/llvm/llvm-project/commit/2d0b55c7756c376b221b58cd939b320c6b569de7 DIFF: https://github.com/llvm/llvm-project/commit/2d0b55c7756c376b221b58cd939b320c6b569de7.diff

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

2023-12-28 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Hmm. It looks like `[[maybe_unused]]` is still disallowed... `[[maybe_unused]]` should be allowed when the pull request includes commit 47413bb2760e63a3302871ea770d6c0f5a742036 (C++17 for libunwind). https://github.com/llvm/llvm-project/pull/74791

[clang] [clang-tools-extra] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/76471 >From 6c9381ec324595947237bd25642b03ab40b6a4df Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 27 Dec 2023 13:05:01 -0500 Subject: [PATCH 01/10] Initial commit ---

[clang] [clang-tools-extra] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/76471 >From 6c9381ec324595947237bd25642b03ab40b6a4df Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 27 Dec 2023 13:05:01 -0500 Subject: [PATCH 1/9] Initial commit --- .../ExpandModularHeadersPPCallbacks.cpp

[clang] [RISCV] Support __riscv_v_fixed_vlen for vbool types. (PR #76551)

2023-12-28 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/76551 >From 4e651e382ef68ae3f9ff7c9f9059ea1a1bddf892 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 28 Dec 2023 16:14:32 -0800 Subject: [PATCH 1/2] [RISCV] Support __riscv_v_fixed_vlen for vbool types. This

[clang] [RISCV] Support __riscv_v_fixed_vlen for vbool types. (PR #76551)

2023-12-28 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 2dc50d28414c827b6723ae6b01c20a7fc3f38165 4e651e382ef68ae3f9ff7c9f9059ea1a1bddf892 --

[clang] [RISCV] Support __riscv_v_fixed_vlen for vbool types. (PR #76551)

2023-12-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Craig Topper (topperc) Changes This adopts a similar behavior to AArch64 SVE, where bool vectors are represented as a vector of chars with 1/8 the number of elements. This ensures the vector always occupies a power of 2 number of bytes.

[clang] [RISCV] Support __riscv_v_fixed_vlen for vbool types. (PR #76551)

2023-12-28 Thread Craig Topper via cfe-commits
topperc wrote: CC @ita-sc https://github.com/llvm/llvm-project/pull/76551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Support __riscv_v_fixed_vlen for vbool types. (PR #76551)

2023-12-28 Thread Craig Topper via cfe-commits
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/76551 This adopts a similar behavior to AArch64 SVE, where bool vectors are represented as a vector of chars with 1/8 the number of elements. This ensures the vector always occupies a power of 2 number of bytes. A

[polly] [mlir] [libc] [compiler-rt] [openmp] [clang] [clang-tools-extra] [llvm] [flang] [libcxx] [lld] [CostModel][X86] Fix fpext conversion cost for 16 elements (PR #76278)

2023-12-28 Thread via cfe-commits
https://github.com/HaohaiWen updated https://github.com/llvm/llvm-project/pull/76278 >From 87f3d68e82dcc752aa727f62b8b1b56b1257b343 Mon Sep 17 00:00:00 2001 From: Haohai Wen Date: Sat, 23 Dec 2023 13:16:02 +0800 Subject: [PATCH 1/2] [CostModel][X86] Track fpext conversion for 16 elements ---

[clang] 2dc50d2 - [RISCV] Correct the CHECK prefixes in attr-riscv-rvv-vector-bits-globals.c to use the correct vector size. NFC

2023-12-28 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2023-12-28T18:15:12-08:00 New Revision: 2dc50d28414c827b6723ae6b01c20a7fc3f38165 URL: https://github.com/llvm/llvm-project/commit/2dc50d28414c827b6723ae6b01c20a7fc3f38165 DIFF: https://github.com/llvm/llvm-project/commit/2dc50d28414c827b6723ae6b01c20a7fc3f38165.diff

[clang] [clang][Sema] deleted overriding function can have lax except spec (PR #76248)

2023-12-28 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/76248 >From c219e38a7953b5bd494554760043053ae3b8ff60 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Sat, 23 Dec 2023 00:02:08 +0800 Subject: [PATCH 1/4] [clang][Sema] deleted overriding function can have lax except

[flang] [llvm] [libcxx] [clang-tools-extra] [compiler-rt] [clang] [polly] [mlir] [lld] [CostModel][X86] Fix fpext conversion cost for 16 elements (PR #76278)

2023-12-28 Thread via cfe-commits
HaohaiWen wrote: > I meant - llvm-mca currently says the throughput for skylake etc. is 3cy not > 5cy - so do you know why the intel scheduler models are underestimating the > throughput? SKX schedule model reports correct lat/uops/tpt for each instruction. vcvtps2pd:

[llvm] [clang] [RISCV] Add MC layer support for Zicfiss. (PR #66043)

2023-12-28 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk edited https://github.com/llvm/llvm-project/pull/66043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Add MC layer support for Zicfiss. (PR #66043)

2023-12-28 Thread Yeting Kuo via cfe-commits
@@ -1024,6 +1024,7 @@ static const char *ImpliedExtsZfinx[] = {"zicsr"}; static const char *ImpliedExtsZhinx[] = {"zhinxmin"}; static const char *ImpliedExtsZhinxmin[] = {"zfinx"}; static const char *ImpliedExtsZicntr[] = {"zicsr"}; +static const char *ImpliedExtsZicfiss[] =

[clang] [clang][Sema] deleted overriding function can have lax except spec (PR #76248)

2023-12-28 Thread Sirui Mu via cfe-commits
Lancern wrote: Oops, code formatter formats unrelated code. Revert and re-commit. https://github.com/llvm/llvm-project/pull/76248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] deleted overriding function can have lax except spec (PR #76248)

2023-12-28 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/76248 >From c219e38a7953b5bd494554760043053ae3b8ff60 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Sat, 23 Dec 2023 00:02:08 +0800 Subject: [PATCH 1/2] [clang][Sema] deleted overriding function can have lax except

[llvm] [clang] [RISCV] Add MC layer support for Zicfiss. (PR #66043)

2023-12-28 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/66043 >From 4a73535ec7206951c6b843e11c81e6c0c01cc1d0 Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 12 Sep 2023 12:28:00 +0800 Subject: [PATCH 1/4] [RISCV] Add MC layer support for Zicfiss. The patch adds the

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-28 Thread Chuanqi Xu via cfe-commits
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation ) { return false; } + if (C.getArgs().hasArg(options::OPT_print_library_module_manifest_path)) { +llvm::outs() << "module: =" ChuanqiXu9 wrote: I don't get why we can't just

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-28 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,15 @@ +// Test that -print-library-module-manifest-path finds the correct file. ChuanqiXu9 wrote: Let's change the suffix of this file to `.cpp` https://github.com/llvm/llvm-project/pull/76451 ___

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-28 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,9 @@ +// Test that -print-library-module-manifest-path finds the correct file. ChuanqiXu9 wrote: Let's change the suffix. https://github.com/llvm/llvm-project/pull/76451 ___ cfe-commits mailing list

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-28 Thread Chuanqi Xu via cfe-commits
@@ -602,6 +602,16 @@ class Driver { // FIXME: This should be in CompilationInfo. std::string GetProgramPath(StringRef Name, const ToolChain ) const; + /// GetModuleManifestPath - Lookup the name of the Standard library manifest. + /// + /// \param C - The compilation.

[clang] [clang][ASTImporter] import InstantiatedFromMember of ClassTemplateSpecializationDecl (PR #76493)

2023-12-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/76493 >From a891331098d34724495798650e4a6e7ad9ebefcb Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 28 Dec 2023 15:51:32 +0800 Subject: [PATCH] [clang][ASTImporter] import InstantiatedFromMember of

[clang] [clang][ASTImporter] import InstantiatedFromMember of ClassTemplateSpecializationDecl (PR #76493)

2023-12-28 Thread Qizhi Hu via cfe-commits
@@ -9342,6 +9342,38 @@ TEST_P(ASTImporterOptionSpecificTestBase, ImportConflictTypeAliasTemplate) { EXPECT_FALSE(ImportedCallable); } +AST_MATCHER(ClassTemplateSpecializationDecl, hasInstantiatedFromMember) { + if (auto Instantiate = Node.getInstantiatedFrom()) { +if

[clang] [clang][ASTImporter] import InstantiatedFromMember of ClassTemplateSpecializationDecl (PR #76493)

2023-12-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/76493 >From 9a9a203bbea079a033a14e610a3c00dff5ec408a Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 28 Dec 2023 15:51:32 +0800 Subject: [PATCH] [clang][ASTImporter] import InstantiatedFromMember of

[clang] [clang-tools-extra] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Qiongsi Wu via cfe-commits
@@ -12,6 +12,19 @@ #include "InstrProfilingPort.h" #include +// Make sure __LLVM_INSTR_PROFILE_GENERATE is always defined before +// including instr_prof_interface.h so the interface functions are +// declared correctly for the runtime. Additionally, make sure +// that

[clang] [compiler-rt] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Qiongsi Wu via cfe-commits
@@ -1364,12 +1364,22 @@ static void InitializePredefinedMacros(const TargetInfo , TI.getTargetDefines(LangOpts, Builder); } +static void InitializePGOProfileMacros(const CodeGenOptions , + MacroBuilder ) { + if

[compiler-rt] [clang] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Qiongsi Wu via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_pgogen -o %t %s +// RUN: not %t +// RUN: %clang -o %t %s +// RUN: %t + +__attribute__((weak)) void __llvm_profile_reset_counters(void); + +__attribute__((noinline)) int bar() { return 4; } +int foo() { + if (__llvm_profile_reset_counters) { +

[compiler-rt] [clang-tools-extra] [clang] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Qiongsi Wu via cfe-commits
@@ -1364,12 +1364,22 @@ static void InitializePredefinedMacros(const TargetInfo , TI.getTargetDefines(LangOpts, Builder); } +static void InitializePGOProfileMacros(const CodeGenOptions , qiongsiwu wrote: Got it! Thanks for the clarification!

[clang-tools-extra] [clang] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu commented: @snehasish I appreciate your timely feedback! The latest commit aims at addressing all the comments. https://github.com/llvm/llvm-project/pull/76471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/76471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (PR #76548)

2023-12-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Craig Topper (topperc) Changes Instead of only handling vscale x 16 x i1 predicate vectors, handle any scalable i1 vector where the known minimum is divisible by 8. This will be used on RISC-V where we have multiple sizes of

[clang] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (PR #76548)

2023-12-28 Thread Craig Topper via cfe-commits
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/76548 Instead of only handling vscale x 16 x i1 predicate vectors, handle any scalable i1 vector where the known minimum is divisible by 8. This will be used on RISC-V where we have multiple sizes of predicate types.

[clang-tools-extra] [clang] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/76471 >From 6c9381ec324595947237bd25642b03ab40b6a4df Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 27 Dec 2023 13:05:01 -0500 Subject: [PATCH 1/8] Initial commit --- .../ExpandModularHeadersPPCallbacks.cpp

[clang] [Clang][AST] Fix crash in APValue::LValueBase::getType when we have invalid decl (PR #75130)

2023-12-28 Thread Shafik Yaghmour via cfe-commits
@@ -70,11 +70,13 @@ QualType APValue::LValueBase::getType() const { // constexpr int *p = [1]; // valid? // // For now, we take the most complete type we can find. -for (auto *Redecl = cast(D->getMostRecentDecl()); Redecl; +for (auto *Redecl =

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

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

[clang] [clang-tools-extra] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Snehasish Kumar via cfe-commits
@@ -1364,12 +1364,22 @@ static void InitializePredefinedMacros(const TargetInfo , TI.getTargetDefines(LangOpts, Builder); } +static void InitializePGOProfileMacros(const CodeGenOptions , + MacroBuilder ) { + if

[clang] [clang-tools-extra] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Snehasish Kumar via cfe-commits
@@ -12,6 +12,19 @@ #include "InstrProfilingPort.h" #include +// Make sure __LLVM_INSTR_PROFILE_GENERATE is always defined before +// including instr_prof_interface.h so the interface functions are +// declared correctly for the runtime. Additionally, make sure +// that

[clang-tools-extra] [clang] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Snehasish Kumar via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_pgogen -o %t %s +// RUN: not %t +// RUN: %clang -o %t %s +// RUN: %t + +__attribute__((weak)) void __llvm_profile_reset_counters(void); + +__attribute__((noinline)) int bar() { return 4; } +int foo() { + if (__llvm_profile_reset_counters) { +

[compiler-rt] [clang-tools-extra] [clang] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Snehasish Kumar via cfe-commits
https://github.com/snehasish commented: Thanks for your patience with my comments! https://github.com/llvm/llvm-project/pull/76471 ___ 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] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Snehasish Kumar via cfe-commits
https://github.com/snehasish edited https://github.com/llvm/llvm-project/pull/76471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [riscv] Fix for __riscv_v_fixed_vlen in vector mask types (PR #76510)

2023-12-28 Thread Craig Topper via cfe-commits
topperc wrote: I also have a patch for this that I started on 6 months ago. Let me dig it up and see how far along it was. I recall there being some tricky issues. https://github.com/llvm/llvm-project/pull/76510 ___ cfe-commits mailing list

[clang] [clang][Sema] deleted overriding function can have lax except spec (PR #76248)

2023-12-28 Thread Shafik Yaghmour via cfe-commits
@@ -979,6 +979,11 @@ bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, if (isa(New) && New->getParent()->isDependentType()) return false; + // CWG1351: if either of the old function or the new function is defined as + // deleted, we don't need

[clang] 6dc5ba4 - [RISCV] Remove XSfcie extension.

2023-12-28 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2023-12-28T13:54:15-08:00 New Revision: 6dc5ba4cca72a5c25597722b8a8c7dcff5fb67be URL: https://github.com/llvm/llvm-project/commit/6dc5ba4cca72a5c25597722b8a8c7dcff5fb67be DIFF: https://github.com/llvm/llvm-project/commit/6dc5ba4cca72a5c25597722b8a8c7dcff5fb67be.diff

[clang] [analyzer][solver] On SymSym RelOps, check EQClass members for contradictions (PR #71284)

2023-12-28 Thread via cfe-commits
DonatNagyE wrote: I'd like to abstain from deciding this question. Personally I don't like the idea that we add yet another hack that'll remain in the codebase forever and slows down all other development efforts in this area (as contributors who want to understand this logic will need to

[clang] [clang][ASTImporter] import InstantiatedFromMember of ClassTemplateSpecializationDecl (PR #76493)

2023-12-28 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/76493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] import InstantiatedFromMember of ClassTemplateSpecializationDecl (PR #76493)

2023-12-28 Thread Shafik Yaghmour via cfe-commits
@@ -9342,6 +9342,38 @@ TEST_P(ASTImporterOptionSpecificTestBase, ImportConflictTypeAliasTemplate) { EXPECT_FALSE(ImportedCallable); } +AST_MATCHER(ClassTemplateSpecializationDecl, hasInstantiatedFromMember) { + if (auto Instantiate = Node.getInstantiatedFrom()) { +if

[clang] [clang][ASTImporter] import InstantiatedFromMember of ClassTemplateSpecializationDecl (PR #76493)

2023-12-28 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: LGTM but I will let @balazske approve https://github.com/llvm/llvm-project/pull/76493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [compiler-rt] [clang] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2023-12-28 Thread Snehasish Kumar via cfe-commits
@@ -1364,12 +1364,22 @@ static void InitializePredefinedMacros(const TargetInfo , TI.getTargetDefines(LangOpts, Builder); } +static void InitializePGOProfileMacros(const CodeGenOptions , snehasish wrote: Yes, my previous comment about other frontends was

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

2023-12-28 Thread Christopher Di Bella via cfe-commits
@@ -0,0 +1,93 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

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

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

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

2023-12-28 Thread Christopher Di Bella via cfe-commits
@@ -0,0 +1,315 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

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

2023-12-28 Thread Christopher Di Bella via cfe-commits
@@ -0,0 +1,259 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

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

2023-12-28 Thread Christopher Di Bella via cfe-commits
@@ -0,0 +1,104 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

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

2023-12-28 Thread Christopher Di Bella via cfe-commits
@@ -0,0 +1,89 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

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

2023-12-28 Thread Christopher Di Bella via cfe-commits
@@ -0,0 +1,89 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

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

2023-12-28 Thread Christopher Di Bella via cfe-commits
@@ -0,0 +1,104 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

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

2023-12-28 Thread Christopher Di Bella via cfe-commits
@@ -0,0 +1,104 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

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

2023-12-28 Thread Christopher Di Bella via cfe-commits
cjdb wrote: > > I see @var-const has "requested changes" set, but I feel we've addressed > > the one unresolved comment of his. > > @EricWF In fact, this patch changed quite significantly since I last looked > at it (based on your feedback, I believe), so I would have appreciated being >

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

2023-12-28 Thread via cfe-commits
ChipsSpectre wrote: @tahonermann @AaronBallman @nicolasvasilache @dcaballe Could you please approve this issue? The bug is fixed and already approved twice, but the pull request can not be landed without your approval. https://github.com/llvm/llvm-project/pull/74926

[clang] [analyzer] Add documentation for std::variant checker (PR #76501)

2023-12-28 Thread Gábor Spaits via cfe-commits
https://github.com/spaits closed https://github.com/llvm/llvm-project/pull/76501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1d2fab7 - [analyzer] Add documentation for std::variant checker (#76501)

2023-12-28 Thread via cfe-commits
Author: Gábor Spaits Date: 2023-12-28T22:19:51+01:00 New Revision: 1d2fab74af73a279a21641b6649dca59f70e6519 URL: https://github.com/llvm/llvm-project/commit/1d2fab74af73a279a21641b6649dca59f70e6519 DIFF: https://github.com/llvm/llvm-project/commit/1d2fab74af73a279a21641b6649dca59f70e6519.diff

[clang] [clang-format] Fix bad indentation with attribute and templated type (PR #76336)

2023-12-28 Thread via cfe-commits
XDeme wrote: Hi, Thanks for reviewing, could you merge this for me? I don't have write access https://github.com/llvm/llvm-project/pull/76336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

2023-12-28 Thread Steve Scalpone via cfe-commits
sscalpone wrote: Still gathering feedback https://discourse.llvm.org/t/proposal-rename-flang-new-to-flang/69462/54 https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Add documentation for std::variant checker (PR #76501)

2023-12-28 Thread Gábor Spaits via cfe-commits
spaits wrote: I will merge the PR when the CI builds have finished. Thank you for reviewing. https://github.com/llvm/llvm-project/pull/76501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Add documentation for std::variant checker (PR #76501)

2023-12-28 Thread Balazs Benics via cfe-commits
=?utf-8?q?G=C3=A1bor?= Spaits,=?utf-8?q?G=C3=A1bor?= Spaits, =?utf-8?q?G=C3=A1bor?= Spaits,Balazs Benics Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. LGTM now. Thanks. https://github.com/llvm/llvm-project/pull/76501

[clang] [analyzer] Add documentation for std::variant checker (PR #76501)

2023-12-28 Thread Balazs Benics via cfe-commits
=?utf-8?q?Gábor?= Spaits,=?utf-8?q?Gábor?= Spaits, =?utf-8?q?Gábor?= Spaits,Balazs Benics Message-ID: In-Reply-To: https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/76501 >From b271420a6e4ed23abf2749d767f986aa16d9fe9d Mon Sep 17 00:00:00 2001 From: Gabor Spaits

[clang-tools-extra] [compiler-rt] [mlir] [libcxx] [lldb] [flang] [llvm] [clang] [lld] [libc] [mlir][linalg] Implement common interface for depthwise convolution ops (PR #75017)

2023-12-28 Thread via cfe-commits
srcarroll wrote: I'm starting to think that maybe grouped convs should have received this treatment first since depthwise is a subset of grouped, so a lot of this should be abstracted to a grouped conv interface. Looking forward to hearing thoughts

[clang] 6cd41dd - [RISCV] Remove isRVVType from Type.h. NFC

2023-12-28 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2023-12-28T11:54:50-08:00 New Revision: 6cd41dde88c6b70b1326ac77255f0f0af96c97d8 URL: https://github.com/llvm/llvm-project/commit/6cd41dde88c6b70b1326ac77255f0f0af96c97d8 DIFF: https://github.com/llvm/llvm-project/commit/6cd41dde88c6b70b1326ac77255f0f0af96c97d8.diff

[clang] 8076ee9 - [RISCV] Use getBuiltinVectorTypeInfo instead of isRVVType.

2023-12-28 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2023-12-28T11:15:14-08:00 New Revision: 8076ee9667198c28cfd1ef6dc8f01c3e539549a2 URL: https://github.com/llvm/llvm-project/commit/8076ee9667198c28cfd1ef6dc8f01c3e539549a2 DIFF: https://github.com/llvm/llvm-project/commit/8076ee9667198c28cfd1ef6dc8f01c3e539549a2.diff

[clang] [llvm] [RISCV] Add MC layer support for Zicfiss. (PR #66043)

2023-12-28 Thread Craig Topper via cfe-commits
@@ -1024,6 +1024,7 @@ static const char *ImpliedExtsZfinx[] = {"zicsr"}; static const char *ImpliedExtsZhinx[] = {"zhinxmin"}; static const char *ImpliedExtsZhinxmin[] = {"zfinx"}; static const char *ImpliedExtsZicntr[] = {"zicsr"}; +static const char *ImpliedExtsZicfiss[] =

[clang] [Analyzer][NFC] Remove redundant function call (PR #75076)

2023-12-28 Thread Gábor Spaits via cfe-commits
https://github.com/spaits closed https://github.com/llvm/llvm-project/pull/75076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix ICE where C++ Template Instantiation failed to handle attributed lambdas (PR #76523)

2023-12-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yuxuan Chen (yuxuanchen1997) Changes This PR is proposing a fix for https://github.com/llvm/llvm-project/issues/76521. Clang used to assume that during template instantiation, Lambda expressions can only have `FunctionProtoTypeLoc`s.

[clang] [Clang] Fix ICE where C++ Template Instantiation failed to handle attributed lambdas (PR #76523)

2023-12-28 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 created https://github.com/llvm/llvm-project/pull/76523 This PR is proposing a fix for https://github.com/llvm/llvm-project/issues/76521. Clang used to assume that during template instantiation, Lambda expressions can only have `FunctionProtoTypeLoc`s.

[clang] [analyzer] Add documentation for std::variant checker (PR #76501)

2023-12-28 Thread Balazs Benics via cfe-commits
=?utf-8?q?G=C3=A1bor?= Spaits,=?utf-8?q?G=C3=A1bor?= Spaits, =?utf-8?q?G=C3=A1bor?= Spaits Message-ID: In-Reply-To: steakhal wrote: let me check it again https://github.com/llvm/llvm-project/pull/76501 ___ cfe-commits mailing list

[clang] 5c37e71 - [Frontend] Use StringRef::drop_while (NFC)

2023-12-28 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-12-28T10:06:20-08:00 New Revision: 5c37e711df6b81c2b669fb8a0d8b15f7a79e6e4a URL: https://github.com/llvm/llvm-project/commit/5c37e711df6b81c2b669fb8a0d8b15f7a79e6e4a DIFF: https://github.com/llvm/llvm-project/commit/5c37e711df6b81c2b669fb8a0d8b15f7a79e6e4a.diff

[clang] [riscv] Fix for __riscv_v_fixed_vlen in vector mask types (PR #76510)

2023-12-28 Thread Craig Topper via cfe-commits
topperc wrote: Missing CodeGen tests https://github.com/llvm/llvm-project/pull/76510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   >