[clang] [Clang]Emit type metadata when -fprofile-generate is on (PR #70841)

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

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-10-31 Thread Fangrui Song via cfe-commits
MaskRay wrote: I am unfamiliar with Darwin and @jansvoboda11 @ldionne can give a more authoritative answer, but I can share some feelings. * Gnu.cpp uses `Generic_GCC::addLibCxxIncludePaths` so other versions (e.g. `usr/include/c++/v2`) are supported. * Only one of `Dir`/`InstalledDir` should

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Aaron Ballman via cfe-commits
@@ -279,12 +279,13 @@ class DefaultIntArgument : IntArgument { // This argument is more complex, it includes the enumerator type name, // a list of strings to accept, and a list of enumerators to map them to. -class EnumArgument values, +class EnumArgument values, ---

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -1010,14 +1022,17 @@ namespace { // trivial because some enumeration values have multiple named // enumerators, such as type_visibility(internal) and // type_visibility(hidden) both mapping to TypeVisibilityAttr::Hidden. - OS << "const char *" << getAt

[clang] [llvm] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-10-31 Thread Léonard Oest O'Leary via cfe-commits
https://github.com/leo-ard created https://github.com/llvm/llvm-project/pull/70845 This PR fixes https://github.com/llvm/llvm-project/issues/55013 : the max intrinsics is not generated for this simple loop case : https://godbolt.org/z/hxz1xhMPh. This is caused by a ICMP not being folded into

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-10-31 Thread Balazs Benics via cfe-commits
@@ -1222,6 +1222,15 @@ void ExprEngine::ProcessInitializer(const CFGInitializer CFGInit, PostInitializer PP(BMI, FieldLoc.getAsRegion(), stackFrame); evalBind(Tmp, Init, Pred, FieldLoc, InitVal, /*isInit=*/true, &PP); } + } else if (BMI->isBaseInitializer() &&

[clang] [llvm] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Léonard Oest O'Leary (leo-ard) Changes This PR fixes https://github.com/llvm/llvm-project/issues/55013 : the max intrinsics is not generated for this simple loop case : https://godbolt.org/z/hxz1xhMPh. This is caused by a ICMP not b

[clang] [Clang]Emit type metadata when -fprofile-generate is on (PR #70841)

2023-10-31 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 a9b3f200159595ed8f13cc891ae34291020ba111 99abebc88c09346bd4a70bbf39df13b249116c09 --

[clang] [llvm] [SCCP] [Transform] Adding ICMP folding for zext and sext in SCCPSolver (PR #67594)

2023-10-31 Thread Léonard Oest O'Leary via cfe-commits
https://github.com/leo-ard closed https://github.com/llvm/llvm-project/pull/67594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [SCCP] [Transform] Adding ICMP folding for zext and sext in SCCPSolver (PR #67594)

2023-10-31 Thread Léonard Oest O'Leary via cfe-commits
leo-ard wrote: I'm closing this PR in favour of #70845 https://github.com/llvm/llvm-project/pull/67594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [openmp] [clang] [OpenMP] Introduce the KernelLaunchEnvironment as implicit argument (PR #70401)

2023-10-31 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Small change that affects a lot of tests. LG once these are fixed: ``` MLIR :: Target/LLVMIR/omptarget-region-device-llvm.mlir MLIR :: Target/LLVMIR/omptarget-byref-bycopy-generation-device.mlir MLIR :: Target/LLVMIR/omptarget-declare-target-llvm-device.mlir ``` https://github.com

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -279,12 +279,13 @@ class DefaultIntArgument : IntArgument { // This argument is more complex, it includes the enumerator type name, // a list of strings to accept, and a list of enumerators to map them to. -class EnumArgument values, +class EnumArgument values, ---

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-10-31 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Looks great! FYI when submitting patches to GH try not to force-push to help the UI for following lines having comments. Otherwise, they will be marked as "outdated" and become hard to dig up and relate to new line locations. This was eas

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -279,12 +279,13 @@ class DefaultIntArgument : IntArgument { // This argument is more complex, it includes the enumerator type name, // a list of strings to accept, and a list of enumerators to map them to. -class EnumArgument values, +class EnumArgument values, ---

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -898,23 +898,29 @@ namespace { } class EnumArgument : public Argument { -std::string type; +std::string fullType; +StringRef shortType; std::vector values, enums, uniques; +bool isExternal; public: EnumArgument(const Record &Arg, StringRef

[clang] [Clang] Add __datasizeof (PR #67805)

2023-10-31 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -triple x86_64 -emit-llvm %s -o - | FileCheck %s + +// CHECK: define dso_local noundef i32 @_Z4testi(i32 noundef %i) #0 { +// CHECK-NEXT: entry: +// CHECK-NEXT: %i.addr = alloca i32, align 4 +// CHECK-NEXT: store i32 %i, ptr %i.addr, a

[clang] [CUDA][HIP] Fix std::is_invocable (PR #70369)

2023-10-31 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/70369 >From 5097f2075bc41a490a307c55b22dc2764c5b43f2 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Fri, 27 Oct 2023 23:34:51 -0400 Subject: [PATCH] [CUDA][HIP] Make template implicitly host device Added opti

[clang] [CUDA][HIP] Make template implicitly host device (PR #70369)

2023-10-31 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/70369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Make template implicitly host device (PR #70369)

2023-10-31 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/70369 >From f68b605114ab6b7183b4516df3f1227ef5d6f9d8 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Fri, 27 Oct 2023 23:34:51 -0400 Subject: [PATCH] [CUDA][HIP] Make template implicitly host device Added opti

[clang] [CUDA][HIP] Make template implicitly host device (PR #70369)

2023-10-31 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/70369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Its a bit of a shame that the `VariadicEnumArgument` isn't being included here/updated here, I typically appreciate the variadic versions being kept in sync. But since we don't have a use for it at the moment, I think a 'fixme' (or a future patch!) wou

[clang] [analyzer] Fix assertion failure in CXXInstanceCall::getCXXThisVal (PR #70837)

2023-10-31 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/70837 >From a7f64815f4986fad597b9cb2d1acce2de9ac20bf Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Mon, 23 Oct 2023 18:10:29 +0200 Subject: [PATCH 1/2] [analyzer] Fix assertion failure in CXXInstanceCall::getCXX

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -1010,14 +1022,17 @@ namespace { // trivial because some enumeration values have multiple named // enumerators, such as type_visibility(internal) and // type_visibility(hidden) both mapping to TypeVisibilityAttr::Hidden. - OS << "const char *" << getAt

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/70835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -930,77 +936,83 @@ namespace { OS << getLowerName() << "(" << getUpperName() << ")"; } void writeCtorDefaultInitializers(raw_ostream &OS) const override { - OS << getLowerName() << "(" << type << "(0))"; + OS << getLowerName() << "(" << fullType << "(

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -1015,7 +1018,8 @@ def ExternalSourceSymbol : InheritableAttr { def Blocks : InheritableAttr { let Spellings = [Clang<"blocks">]; - let Args = [EnumArgument<"Type", "BlockType", ["byref"], ["ByRef"]>]; + let Args = [EnumArgument<"Type", "BlockType", eri

[clang] [analyzer] Fix assertion failure in CXXInstanceCall::getCXXThisVal (PR #70837)

2023-10-31 Thread Balazs Benics via cfe-commits
steakhal wrote: > Hmm, I wonder if we should leave a FIXME comment, but it looks good to me. I was thinking where to put the FIXME, and as I explored that should be within the CastVisitor. After that, I argued, that then I should still have the (ineffective) `SVB.evalCast()` to actually exerci

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

2023-10-31 Thread Eli Friedman via cfe-commits
@@ -265,6 +269,63 @@ bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable( return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true); } +void AIXTargetCodeGenInfo::setTargetAttributes( +const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const

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

2023-10-31 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/67999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-10-31 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: What are the ABI implications here? Do all translation units have to agree on whether a variable is "tocdata"? The manual change hints there's some sort of linker fixup, but it's not clear to me how that works. Specifying the names of global variab

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

2023-10-31 Thread Eli Friedman via cfe-commits
@@ -622,6 +622,28 @@ static bool checkAliasedGlobal( return true; } +// Emit a warning if toc-data attribute is requested for global variables that +// have aliases and remove the toc-data attribute. +static void checkAliasForTocData(llvm::GlobalVariable *GVar, +

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-10-31 Thread Liviu Ionescu via cfe-commits
ilg-ul wrote: > Only one of `Dir`/`InstalledDir` should be used The current behaviour is: - if `InstalledDir/../include/c++/v1` exists, it is used - otherwise the `MacOSX.sdk/usr/include/c++/v1` is used. In most cases, when invoked via a link, there is no `include` in that folder (see the exa

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

2023-10-31 Thread David Li via cfe-commits
https://github.com/david-xl approved this pull request. 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

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

2023-10-31 Thread David Li via cfe-commits
https://github.com/david-xl edited 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

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

2023-10-31 Thread David Li via cfe-commits
@@ -314,7 +314,22 @@ static void loadInput(const WeightedFile &Input, SymbolRemapper *Remapper, } auto FS = vfs::getRealFileSystem(); - auto ReaderOrErr = InstrProfReader::create(Input.Filename, *FS, Correlator); + // TODO: This only saves the first non-fatal error from

[clang] [analyzer] Fix assertion failure in CXXInstanceCall::getCXXThisVal (PR #70837)

2023-10-31 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/70837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix assertion failure in `CXXInstanceCall::getCXXThisVal` (PR #70837)

2023-10-31 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/70837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -1010,14 +1022,17 @@ namespace { // trivial because some enumeration values have multiple named // enumerators, such as type_visibility(internal) and // type_visibility(hidden) both mapping to TypeVisibilityAttr::Hidden. - OS << "const char *" << getAt

[clang] [analyzer] Fix assertion failure in `CXXInstanceCall::getCXXThisVal` (PR #70837)

2023-10-31 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: > WDYT? I like this! I hope we do not add too much redundant work, but at least we make it clear what is the plan to fix this in the future. https://github.com/llvm/llvm-project/pull/70837 ___ cfe-commits mailing list cfe-commits@lis

[clang] [clang][DebugInfo][NFC] Add createConstantValueExpression helper (PR #70674)

2023-10-31 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. Looks great - thanks! https://github.com/llvm/llvm-project/pull/70674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -930,77 +936,83 @@ namespace { OS << getLowerName() << "(" << getUpperName() << ")"; } void writeCtorDefaultInitializers(raw_ostream &OS) const override { - OS << getLowerName() << "(" << type << "(0))"; + OS << getLowerName() << "(" << fullType << "(

[clang] ae7b20b - [clang][NFC] Refactor `VectorType::VectorKind`

2023-10-31 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-10-31T21:50:18+03:00 New Revision: ae7b20b583fab1325d8b51fe5f2eaf612de8b95e URL: https://github.com/llvm/llvm-project/commit/ae7b20b583fab1325d8b51fe5f2eaf612de8b95e DIFF: https://github.com/llvm/llvm-project/commit/ae7b20b583fab1325d8b51fe5f2eaf612de8b95e.

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

2023-10-31 Thread David Blaikie via cfe-commits
@@ -67,15 +67,15 @@ int C::a = 4; // CHECK-NOT:size: // CHECK-NOT:align: // CHECK-NOT:offset: -// CHECK-SAME: flags: DIFlagStaticMember, -// CHECK-SAME: extraData: i1 true) +// CHECK-SAME: flags: DIFlagStaticMemb

[llvm] [clang] [PassBuilder] Add a mechanism for adding passbuilder callbacks for static builds (PR #70171)

2023-10-31 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The new option in CodeGenOptions.h seems fine. If your goal is to statically inject passes into the clang executable, I don't understand why the existing LLVM plugin infrastructure isn't sufficient for your needs. You mention "modifying Extension.def", but that file is ge

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

2023-10-31 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: The clang-format failure is not related to the changes in this PR. https://github.com/llvm/llvm-project/pull/70827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-10-31 Thread David Blaikie via cfe-commits
@@ -5883,6 +5907,18 @@ void CGDebugInfo::finalize() { DBuilder.replaceTemporary(std::move(FwdDecl), cast(Repl)); } + for (auto const *VD : StaticDataMemberDefinitionsToEmit) { +assert(VD->isStaticDataMember()); + +if (auto It = DeclCache.find(VD); It != DeclCach

[clang] [clang] Fix false positive -Wmissing-field-initializer for anonymous unions (PR #70829)

2023-10-31 Thread Richard Smith via cfe-commits
zygoloid wrote: Thanks for looking into this! I wonder if it would make sense to move the checking for this warning here, to the `else` case in line 725: https://github.com/llvm/llvm-project/blob/ac30780250875802d13450d17e6959f9e2ad3a70/clang/lib/Sema/SemaInit.cpp#L717-L734 That should remove

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -279,12 +279,13 @@ class DefaultIntArgument : IntArgument { // This argument is more complex, it includes the enumerator type name, // a list of strings to accept, and a list of enumerators to map them to. -class EnumArgument values, +class EnumArgument values, ---

[clang] [analyzer] Fix assertion failure in `CXXInstanceCall::getCXXThisVal` (PR #70837)

2023-10-31 Thread Balazs Benics via cfe-commits
steakhal wrote: > > WDYT? > > I like this! I hope we do not add too much redundant work, but at least we > make it clear what is the plan to fix this in the future. Please approve the PR again, so that I could merge this after I give some time for others to look at this. https://github.com/l

[clang] [llvm] [clang][dataflow] Simplify flow conditions displayed in HTMLLogger. (PR #70848)

2023-10-31 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/70848 This can make the flow condition significantly easier to interpret; see below for an example. I had hoped that adding the simplification as a preprocessing step before the SAT solver (in `DataflowAnalysisCon

[clang] [llvm] [clang][dataflow] Simplify flow conditions displayed in HTMLLogger. (PR #70848)

2023-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes This can make the flow condition significantly easier to interpret; see below for an example. I had hoped that adding the simplification as a preprocessing step before the SAT solver (in `DataflowAnalysisContext

[clang] [clang-tools-extra] [libc] [llvm] [libc] Adding a version of memset with software prefetching (PR #70493)

2023-10-31 Thread via cfe-commits
https://github.com/doshimili updated https://github.com/llvm/llvm-project/pull/70493 >From 6c313955185c0d59564f6535b6f1580dca168bea Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 24 Oct 2023 21:15:23 + Subject: [PATCH 1/9] Add software prefetching to memset --- libc/src/string/memory

[clang-tools-extra] [clang] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -898,23 +898,29 @@ namespace { } class EnumArgument : public Argument { -std::string type; +std::string fullType; +StringRef shortType; std::vector values, enums, uniques; +bool isExternal; public: EnumArgument(const Record &Arg, StringRef

[PATCH] D158259: [clang][RISCV] Support operators for RVV sizeless vector types

2023-10-31 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Need to update the table here https://clang.llvm.org/docs/LanguageExtensions.html#vector-operations to include RVV Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158259/new/ https://reviews.llvm.org/D158259 _

[clang-tools-extra] [clang] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -898,23 +898,29 @@ namespace { } class EnumArgument : public Argument { -std::string type; +std::string fullType; +StringRef shortType; std::vector values, enums, uniques; +bool isExternal; public: EnumArgument(const Record &Arg, StringRef

[clang] [clang][CodeGen] Emit annotations for function declarations. (PR #66716)

2023-10-31 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/66716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Emit annotations for function declarations. (PR #66716)

2023-10-31 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: (Not sure if you have commit access; let me know if you want me to merge for you.) https://github.com/llvm/llvm-project/pull/66716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

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

2023-10-31 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,816 @@ +// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only -fexperimental-new-constant-inter

[llvm] [clang-tools-extra] [clang] [libc] [libc] Adding a version of memset with software prefetching (PR #70493)

2023-10-31 Thread via cfe-commits
https://github.com/doshimili updated https://github.com/llvm/llvm-project/pull/70493 >From 6c313955185c0d59564f6535b6f1580dca168bea Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 24 Oct 2023 21:15:23 + Subject: [PATCH 01/10] Add software prefetching to memset --- libc/src/string/memo

[clang] [AMDGPU] - Add clang builtins for tied WMMA intrinsics (PR #70669)

2023-10-31 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec commented: Also needed negative tests that gfx11-insts feature is required (using gfx1030 target for example) and for the immediate arguments. See for example builtins-amdgcn-gfx11-err.cl and builtins-amdgcn-fp-atomics-gfx11-err.cl. https://github.com/llvm/llvm-proj

[clang] [clang] Ignore GCC 11 `[[malloc(x)]]` attribute (PR #68059)

2023-10-31 Thread Jens Gustedt via cfe-commits
gustedt wrote: Hi, yes the really bad choice here is by gcc to have the same name for basically two different attributes. For the value, they also missed the opportunity to do something sensible when moving to C++ attributes, what a pitty. For a concrete guideline in that jungle, when (= whi

[clang] [clang] Ignore GCC 11 `[[malloc(x)]]` attribute (PR #68059)

2023-10-31 Thread Erich Keane via cfe-commits
erichkeane wrote: > Hi, yes the really bad choice here is by gcc to have the same name for > basically two different attributes. For the value, they also missed the > opportunity to do something sensible when moving to C++ attributes, what a > pitty. For a concrete guideline in that jungle, wh

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

2023-10-31 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/70827 >From 552995265316fd04bd73148fce010aa3cd0368f5 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] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-10-31 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks commented: The code is okay, but I do not share the intention. https://github.com/llvm/llvm-project/pull/70768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-10-31 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited https://github.com/llvm/llvm-project/pull/70768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

2023-10-31 Thread Björn Schäpers via cfe-commits
@@ -3117,9 +3117,16 @@ void UnwrappedLineParser::parseForOrWhileLoop(bool HasParens) { FormatTok->setFinalizedType(TT_ConditionLParen); parseParens(); } - // Event control. - if (Style.isVerilog()) + + if (Style.isVerilog()) { +// Event control. parseVe

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Erich Keane via cfe-commits
@@ -898,23 +898,29 @@ namespace { } class EnumArgument : public Argument { -std::string type; +std::string fullType; +StringRef shortType; std::vector values, enums, uniques; +bool isExternal; public: EnumArgument(const Record &Arg, StringRef

[clang] [libc] [llvm] [clang-tools-extra] [libc] Adding a version of memset with software prefetching (PR #70493)

2023-10-31 Thread via cfe-commits
https://github.com/doshimili closed https://github.com/llvm/llvm-project/pull/70493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-31 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Do you need to check if the lambda is templated? For example, the following doesn't compile: ``` auto GetNonCapturingLambda() { return [](){ return 42; }; } auto f() { return GetNonCapturingLambda() == GetNonCapturingLambda(); } ``` https://github.com/llvm/llvm-project/pu

[clang] [analyzer] Fix assertion failure in `CXXInstanceCall::getCXXThisVal` (PR #70837)

2023-10-31 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/70837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Shafik Yaghmour via cfe-commits
@@ -3553,6 +3553,48 @@ static unsigned getPackIndexForParam(Sema &S, llvm_unreachable("parameter index would not be produced from template"); } +// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl`, +// we'll try to instantiate and update its explicit spec

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

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

[clang] [Clang] Defer the instantiation of explicit-specifier until constraint checking completes (PR #70548)

2023-10-31 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. I just want to make sure we have enough testing in place for this change but overall I think I am happy. https://github.com/llvm/llvm-project/pull/70548 ___ cfe-commits mailing list cfe-commits@lis

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

2023-10-31 Thread via cfe-commits
@@ -265,6 +269,63 @@ bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable( return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true); } +void AIXTargetCodeGenInfo::setTargetAttributes( +const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const

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

2023-10-31 Thread via cfe-commits
@@ -265,6 +269,63 @@ bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable( return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true); } +void AIXTargetCodeGenInfo::setTargetAttributes( +const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const

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

2023-10-31 Thread via cfe-commits
@@ -622,6 +622,28 @@ static bool checkAliasedGlobal( return true; } +// Emit a warning if toc-data attribute is requested for global variables that +// have aliases and remove the toc-data attribute. +static void checkAliasForTocData(llvm::GlobalVariable *GVar, +

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-10-31 Thread Bill Wendling via cfe-commits
@@ -859,53 +859,60 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, } if (IsDynamic) { -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = -getLangOpts().getStrictFlexArraysLevel(); -const Expr *Base = E->IgnoreParenImpCa

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-10-31 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/70606 >From 19dd7db8ab5f98a618c717944c96b34e604fbc30 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sun, 29 Oct 2023 14:58:04 -0700 Subject: [PATCH 1/7] [CodeGen] Revamp counted_by calculations Break down the co

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

2023-10-31 Thread via cfe-commits
@@ -265,6 +269,63 @@ bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable( return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true); } +void AIXTargetCodeGenInfo::setTargetAttributes( +const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const

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

2023-10-31 Thread via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/67999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-10-31 Thread Yeoul Na via cfe-commits
@@ -859,53 +859,60 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, } if (IsDynamic) { -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = -getLangOpts().getStrictFlexArraysLevel(); -const Expr *Base = E->IgnoreParenImpCa

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-10-31 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/70606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-10-31 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/70606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] 4fc7019 - [libc++][AIX] Add OS version to target triple

2023-10-31 Thread Jake Egan via cfe-commits
Author: Jake Egan Date: 2023-10-31T16:23:05-04:00 New Revision: 4fc70197919cded66502d1ad853f9e7f344b9a77 URL: https://github.com/llvm/llvm-project/commit/4fc70197919cded66502d1ad853f9e7f344b9a77 DIFF: https://github.com/llvm/llvm-project/commit/4fc70197919cded66502d1ad853f9e7f344b9a77.diff LOG

[clang] [Clang]Emit type metadata when -fprofile-generate is on (PR #70841)

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

[clang] [Clang]Emit type metadata when IRPGO is used (PR #70841)

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

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-10-31 Thread Bill Wendling via cfe-commits
@@ -859,53 +859,60 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, } if (IsDynamic) { -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = -getLangOpts().getStrictFlexArraysLevel(); -const Expr *Base = E->IgnoreParenImpCa

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-10-31 Thread Bill Wendling via cfe-commits
https://github.com/bwendling edited https://github.com/llvm/llvm-project/pull/70606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-10-31 Thread Bill Wendling via cfe-commits
https://github.com/bwendling edited https://github.com/llvm/llvm-project/pull/70606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [time-trace] Add a new time trace scope variable named "ParseDeclarationOrFunctionDefinition". (PR #65268)

2023-10-31 Thread via cfe-commits
https://github.com/MaggieYingYi updated https://github.com/llvm/llvm-project/pull/65268 >From 5b750383cace7db24144d16ce8a9ca0864c37613 Mon Sep 17 00:00:00 2001 From: Ying Yi Date: Fri, 1 Sep 2023 15:30:44 +0100 Subject: [PATCH 1/2] [Clang] Add two time-trace scope variables. A time trace scope

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-10-31 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/70856 Refactor some code from https://github.com/llvm/llvm-project/pull/69493. #70712 was reverted due to linking failures. So, I removed `-profile-correlate=` flag and kept `-debug-info-correlate` in this change.

[compiler-rt] [clang] [llvm] [Profile] Refactor profile correlation. (PR #70856)

2023-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-pgo Author: Zequan Wu (ZequanWu) Changes Refactor some code from https://github.com/llvm/llvm-project/pull/69493. #70712 was reverted due to linking failures. So, I removed `-profile-correlate=` flag and kept `-debug-info-correlate` in this change. -

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

2023-10-31 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/69513 >From 9a1af6e1d47ab622979796f2319edec8a9c77928 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Wed, 18 Oct 2023 16:28:30 -0400 Subject: [PATCH 1/7] [llvm-profdata] Emit error when counter value is greater than 2

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

2023-10-31 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu closed 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] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-10-31 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Sorry for so many noise regarding this change. https://github.com/llvm/llvm-project/pull/70856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [time-trace] Add a new time trace scope variable named "ParseDeclarationOrFunctionDefinition". (PR #65268)

2023-10-31 Thread via cfe-commits
MaggieYingYi wrote: Hi @AaronBallman, Thanks so much for the explanation using an example. I now understand. I have updated the patch in the commit https://github.com/llvm/llvm-project/pull/65268/commits/f66e7d2b720692e9bc4bbc915de286f6de87e291. Kind regards, Maggie https://github.com/llvm/l

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

2023-10-31 Thread Greg Clayton via cfe-commits
https://github.com/clayborg commented: One question I have here: where will the DW_TAG_variable get emitted for these `constexpr`? For actual static member variables we emit a single DW_TAG_variable in the file that declares the global variable, but for `constexpr` we won't be able to do this

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

2023-10-31 Thread Yeoul Na via cfe-commits
@@ -3618,6 +3618,30 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts, GenerateArg(Consumer, OPT_frandomize_layout_seed_EQ, Opts.RandstructSeed); } +static void CheckBoundsSafetyLang(InputKind IK, DiagnosticsEngine &Diags) { + // Currently, bounds

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
bogner wrote: > Its a bit of a shame that the `VariadicEnumArgument` isn't being included > here/updated here, I typically appreciate the variadic versions being kept in > sync. But since we don't have a use for it at the moment, I think a 'fixme' > (or a future patch!) would be acceptable. I

[clang] [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (PR #69975)

2023-10-31 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/69975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >