[clang] a1ad988 - [clang] Make header self-contained. NFC.

2024-06-27 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2024-06-27T09:21:37+02:00 New Revision: a1ad98813006cefcdf88336db3f81a15b6bf36fb URL: https://github.com/llvm/llvm-project/commit/a1ad98813006cefcdf88336db3f81a15b6bf36fb DIFF: https://github.com/llvm/llvm-project/commit/a1ad98813006cefcdf88336db3f81a15b6bf36fb.dif

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-06-27 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough edited https://github.com/llvm/llvm-project/pull/93365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-27 Thread via cfe-commits
https://github.com/h-vetinari updated https://github.com/llvm/llvm-project/pull/93429 >From 8c1b899aa174b107fece1edbf99eaf261bdea516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 25 Apr 2022 09:45:22 +0300 Subject: [PATCH 01/11] [runtimes] [CMake] Use CMAKE_REQUIRE

[clang] [analyzer][NFC] Use ArrayRef for input parameters (PR #93203)

2024-06-27 Thread Balazs Benics via cfe-commits
@@ -672,7 +672,7 @@ class StdLibraryFunctionsChecker StringRef getNote() const { return Note; } }; - using ArgTypes = std::vector>; + using ArgTypes = ArrayRef>; steakhal wrote: One can argue the same the other way around, just like for pointers. htt

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-27 Thread via cfe-commits
h-vetinari wrote: So I've been trying to follow down the rabbit hole of the failing flag checks, and it seems the combination of `CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG` plus https://gitlab.kitware.com/cmake/cmake/-/issues/23454 has a wider blast radius than anticipated. I'm not claiming that ad

[clang] [llvm] [OpenMP] Fix stack corruption due to argument mismatch (PR #96386)

2024-06-27 Thread Sushant Gokhale via cfe-commits
https://github.com/sushgokh updated https://github.com/llvm/llvm-project/pull/96386 >From af4dc96c25f32b477337cedaeb0a696f75840ac0 Mon Sep 17 00:00:00 2001 From: sgokhale Date: Sat, 22 Jun 2024 17:16:24 +0530 Subject: [PATCH] [OpenMP] Fix stack corruption due to argument mismatch While lowerin

[clang] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-06-27 Thread Pierre d'Herbemont via cfe-commits
pdherbemont wrote: I think this still needs review from @delcypher and @rapidsna https://github.com/llvm/llvm-project/pull/95455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Support using toolchain libc and libc++ for baremetal (PR #96736)

2024-06-27 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/96736 >From db5ae584cc00717d667d423a99d71a8d3ac46805 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Mon, 10 Jun 2024 20:27:52 + Subject: [PATCH 1/2] [Driver] Support using toolchain libc and libc++ for baremeta

[clang] [Driver] Support using toolchain libc and libc++ for baremetal (PR #96736)

2024-06-27 Thread Petr Hosek via cfe-commits
@@ -296,6 +300,47 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, return; const Driver &D = getDriver(); + std::string Target = getTripleString(); + + auto AddCXXIncludePath = [&](StringRef Path) { +std::string Version = detectLibcxxVers

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

2024-06-27 Thread via cfe-commits
@@ -1059,9 +1059,15 @@ CodeGenFunction::GenerateCXXGlobalInitFunc(llvm::Function *Fn, if (Guard.isValid()) { // If we have a guard variable, check whether we've already performed // these initializations. This happens for TLS initialization functions. - ll

[clang] [Driver] Support using toolchain libc and libc++ for baremetal (PR #96736)

2024-06-27 Thread Petr Hosek via cfe-commits
@@ -296,6 +300,47 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, return; const Driver &D = getDriver(); + std::string Target = getTripleString(); + + auto AddCXXIncludePath = [&](StringRef Path) { petrhosek wrote: No, we a

[clang] [Driver] Support using toolchain libc and libc++ for baremetal (PR #96736)

2024-06-27 Thread Petr Hosek via cfe-commits
@@ -296,6 +300,47 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, return; const Driver &D = getDriver(); + std::string Target = getTripleString(); + + auto AddCXXIncludePath = [&](StringRef Path) { +std::string Version = detectLibcxxVers

[clang] [Driver] Support using toolchain libc and libc++ for baremetal (PR #96736)

2024-06-27 Thread Petr Hosek via cfe-commits
@@ -296,6 +300,47 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, return; const Driver &D = getDriver(); + std::string Target = getTripleString(); + + auto AddCXXIncludePath = [&](StringRef Path) { +std::string Version = detectLibcxxVers

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

2024-06-27 Thread via cfe-commits
@@ -1070,13 +1076,26 @@ CodeGenFunction::GenerateCXXGlobalInitFunc(llvm::Function *Fn, // Mark as initialized before initializing anything else. If the // initializers use previously-initialized thread_local vars, that's // probably supposed to be OK, but the

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

2024-06-27 Thread via cfe-commits
@@ -1059,9 +1059,15 @@ CodeGenFunction::GenerateCXXGlobalInitFunc(llvm::Function *Fn, if (Guard.isValid()) { // If we have a guard variable, check whether we've already performed // these initializations. This happens for TLS initialization functions. - ll

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

2024-06-27 Thread Chuanqi Xu via cfe-commits
@@ -1059,9 +1059,15 @@ CodeGenFunction::GenerateCXXGlobalInitFunc(llvm::Function *Fn, if (Guard.isValid()) { // If we have a guard variable, check whether we've already performed // these initializations. This happens for TLS initialization functions. - ll

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

2024-06-27 Thread Chuanqi Xu via cfe-commits
@@ -1070,13 +1076,26 @@ CodeGenFunction::GenerateCXXGlobalInitFunc(llvm::Function *Fn, // Mark as initialized before initializing anything else. If the // initializers use previously-initialized thread_local vars, that's // probably supposed to be OK, but the

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-06-27 Thread via cfe-commits
https://github.com/T-Gruber edited https://github.com/llvm/llvm-project/pull/95409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-27 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > So I've been trying to follow down the rabbit hole of the failing flag > checks, and it seems the combination of `CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG` > plus https://gitlab.kitware.com/cmake/cmake/-/issues/23454 has a wider blast > radius than anticipated. > > I'm not claimi

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

2024-06-27 Thread via cfe-commits
@@ -1070,13 +1076,26 @@ CodeGenFunction::GenerateCXXGlobalInitFunc(llvm::Function *Fn, // Mark as initialized before initializing anything else. If the // initializers use previously-initialized thread_local vars, that's // probably supposed to be OK, but the

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-27 Thread via cfe-commits
h-vetinari wrote: > So that cmake issue seems to be really, really unfortunate here. :-( I wonder > if the cure is worse than the disease here [...] Yup, that's a distinct possibility IMO... > [...] and if it would be better to just keep what we have now - and simplify > it only if cmake adds

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-27 Thread David Spickett via cfe-commits
@@ -343,7 +350,9 @@ bool isX18ReservedByDefault(const Triple &TT); // themselves, they are sequential (0, 1, 2, 3, ...). uint64_t getCpuSupportsMask(ArrayRef FeatureStrs); -void PrintSupportedExtensions(StringMap DescMap); +void PrintSupportedExtensions(); + +void printEnabled

[clang] [Clang][AST] Let DeclPrinter print trailing requires expressions for template parameters (PR #96864)

2024-06-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/96864 As discussed in https://github.com/llvm/llvm-project/pull/96084#discussion_r1654629993, it would be nice to present these trailing constraints on template parameters when printing CTAD decls through a DeclPrint

[clang] [Clang][AST] Let DeclPrinter print trailing requires expressions for template parameters (PR #96864)

2024-06-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes As discussed in https://github.com/llvm/llvm-project/pull/96084#discussion_r1654629993, it would be nice to present these trailing constraints on template parameters when printing CTAD decls through a DeclP

[clang] [clang] CTAD alias: fix transformation for require-clause expr Part2. (PR #93533)

2024-06-27 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/93533 >From 14817083f75f9615e9df4c905e09bc4e9b199336 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 17 May 2024 15:28:48 +0200 Subject: [PATCH 1/2] [clang] CTAD alias: fix transformation for require-clause expr P

[clang] [clang] CTAD alias: fix transformation for require-clause expr Part2. (PR #93533)

2024-06-27 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/93533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] CTAD alias: fix transformation for require-clause expr Part2. (PR #93533)

2024-06-27 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: thanks for the review. https://github.com/llvm/llvm-project/pull/93533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] CTAD alias: fix transformation for require-clause expr Part2. (PR #93533)

2024-06-27 Thread Haojian Wu via cfe-commits
@@ -2840,8 +2841,22 @@ buildAssociatedConstraints(Sema &SemaRef, FunctionTemplateDecl *F, for (unsigned Index = 0; Index < DeduceResults.size(); ++Index) { const auto &D = DeduceResults[Index]; -if (D.isNull()) +if (D.isNull()) { // non-deduced template paramete

[clang] [clang] CTAD alias: fix transformation for require-clause expr Part2. (PR #93533)

2024-06-27 Thread Haojian Wu via cfe-commits
@@ -2882,7 +2899,8 @@ buildAssociatedConstraints(Sema &SemaRef, FunctionTemplateDecl *F, // We add the outer template arguments which is [int] to the multi-level arg // list to ensure that the occurrence U in `C` will be replaced with int // during the substitution. - i

[clang] [clang] CTAD alias: fix transformation for require-clause expr Part2. (PR #93533)

2024-06-27 Thread Haojian Wu via cfe-commits
@@ -2840,8 +2841,22 @@ buildAssociatedConstraints(Sema &SemaRef, FunctionTemplateDecl *F, for (unsigned Index = 0; Index < DeduceResults.size(); ++Index) { const auto &D = DeduceResults[Index]; -if (D.isNull()) +if (D.isNull()) { // non-deduced template paramete

[clang] [clang] CTAD alias: fix transformation for require-clause expr Part2. (PR #93533)

2024-06-27 Thread Haojian Wu via cfe-commits
@@ -3100,6 +3118,7 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef, Context.getInjectedTemplateArg(NewParam)); TransformedDeducedAliasArgs[AliasTemplateParamIdx] = NewTemplateArgument; } + unsigned UndeducedTemplateParameterStartIndex = FPrimeTemplateParams.size

[clang] [llvm] [Pipelines] Move IPSCCP after inliner pipeline (PR #96620)

2024-06-27 Thread via cfe-commits
https://github.com/sihuan updated https://github.com/llvm/llvm-project/pull/96620 >From abf211c35e39efc5d8f30019e10a14766985c185 Mon Sep 17 00:00:00 2001 From: SiHuaN Date: Tue, 25 Jun 2024 18:04:33 +0800 Subject: [PATCH 1/3] [Pipelines] Move IPSCCP after inliner pipeline Moving the Interproce

[clang] [llvm] [Pipelines] Move IPSCCP after inliner pipeline (PR #96620)

2024-06-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: SiHuaN (sihuan) Changes This patch significantly improves the performance of LLVM for the SPEC2017:548.exchange2_r benchmark, with a performance uplift of over 40% on the rv64gc. During our investigation into the significant performance

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-06-27 Thread James Henderson via cfe-commits
https://github.com/jh7370 commented: I'm not at all familiar with this PAuth stuff, but don't you need a test case for where the new value is set (currently they all seem to be unset, if I'm interpreting things correctly)? https://github.com/llvm/llvm-project/pull/96159 ___

[clang] [llvm] [Pipelines] Move IPSCCP after inliner pipeline (PR #96620)

2024-06-27 Thread via cfe-commits
https://github.com/sihuan updated https://github.com/llvm/llvm-project/pull/96620 >From abf211c35e39efc5d8f30019e10a14766985c185 Mon Sep 17 00:00:00 2001 From: SiHuaN Date: Tue, 25 Jun 2024 18:04:33 +0800 Subject: [PATCH 1/4] [Pipelines] Move IPSCCP after inliner pipeline Moving the Interproce

[clang] [Clang][AST] Let DeclPrinter print trailing requires expressions for template parameters (PR #96864)

2024-06-27 Thread Haojian Wu via cfe-commits
@@ -1189,6 +1189,16 @@ void DeclPrinter::printTemplateParameters(const TemplateParameterList *Params, Out << '>'; if (!OmitTemplateKW) Out << ' '; + + if (const Expr *RequiresClause = Params->getRequiresClause()) { hokein wrote: If I read the code co

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-27 Thread Tomas Matheson via cfe-commits
tmatheson-arm wrote: And please add a test to cover whatever broke. https://github.com/llvm/llvm-project/pull/96832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-06-27 Thread via cfe-commits
https://github.com/mahesh-attarde updated https://github.com/llvm/llvm-project/pull/95904 >From 6d6619f8f7a37906ac45791487a4d63b51a48ad1 Mon Sep 17 00:00:00 2001 From: mahesh-attarde Date: Wed, 12 Jun 2024 06:15:51 -0700 Subject: [PATCH 1/5] added regcall strct by reg support --- clang/lib/Co

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-27 Thread Lucas Duarte Prates via cfe-commits
@@ -343,7 +350,9 @@ bool isX18ReservedByDefault(const Triple &TT); // themselves, they are sequential (0, 1, 2, 3, ...). uint64_t getCpuSupportsMask(ArrayRef FeatureStrs); -void PrintSupportedExtensions(StringMap DescMap); +void PrintSupportedExtensions(); + +void printEnabled

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-06-27 Thread Sebastian Kreutzer via cfe-commits
sebastiankreutzer wrote: @androm3da @MaskRay I'm tagging you because I'm having trouble to get feedback to this PR, and you seem to be the most recent contributors to XRay. Would one of you be willing to review it? Any other pointers on who to get in touch with are also much appreciated. htt

[clang] [clang] Emitting a warning if optimizations are enabled with sanitizers (PR #95934)

2024-06-27 Thread Sandeep Kosuri via cfe-commits
@@ -1038,3 +1038,10 @@ // RUN: not %clang --target=aarch64-none-elf -fsanitize=dataflow %s -### 2>&1 | FileCheck %s -check-prefix=UNSUPPORTED-BAREMETAL // RUN: not %clang --target=arm-arm-none-eabi -fsanitize=shadow-call-stack %s -### 2>&1 | FileCheck %s -check-prefix=UNSUPPOR

[clang] [clang] Emitting a warning if optimizations are enabled with sanitizers (PR #95934)

2024-06-27 Thread Sandeep Kosuri via cfe-commits
@@ -477,6 +477,8 @@ def warn_drv_disabling_vptr_no_rtti_default : Warning< def warn_drv_object_size_disabled_O0 : Warning< "the object size sanitizer has no effect at -O0, but is explicitly enabled: %0">, InGroup, DefaultWarnNoWerror; +def warn_sanitizer_with_optimization

[clang] [clang][Interp] Merge ByteCodeExprGen and ByteCodeStmtGen (PR #83683)

2024-06-27 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/83683 >From 74550f244eed465d4f0db1787eecb73a09d5881a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 2 Mar 2024 17:00:26 +0100 Subject: [PATCH] [clang][Interp] Merge ByteCode{Stmt,Expr}Gen ---

[clang] clang/AMDGPU: Use atomicrmw for ds fmin/fmax builtins (PR #96738)

2024-06-27 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/96738 >From 5f614809ac4ffa5e29a01c7e9410d91eadcbe6f2 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Tue, 11 Jun 2024 10:40:27 +0200 Subject: [PATCH 1/2] clang/AMDGPU: Use atomicrmw for ds fmin/fmax builtins --- c

[clang] [Clang][AST] Let DeclPrinter print trailing requires expressions for template parameters (PR #96864)

2024-06-27 Thread Younan Zhang via cfe-commits
@@ -1189,6 +1189,16 @@ void DeclPrinter::printTemplateParameters(const TemplateParameterList *Params, Out << '>'; if (!OmitTemplateKW) Out << ' '; + + if (const Expr *RequiresClause = Params->getRequiresClause()) { zyn0217 wrote: Yeah, you're right,

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-27 Thread Lucas Duarte Prates via cfe-commits
@@ -21,7 +21,7 @@ // RUN: %clang --target=aarch64 -march=armv8a+fp16fml -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV8A-FP16FML %s pratlucas wrote: The check for target validity doesn't run when using `-###` in the command line. E.g.: ``` $ ../build/bin

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-27 Thread Lucas Duarte Prates via cfe-commits
@@ -315,37 +315,37 @@ // RUN: %clang -target aarch64 -mcpu=thunderx2t99 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-THUNDERX2T99 %s // RUN: %clang -target aarch64 -mcpu=a64fx -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-A64FX %s // RUN: %clang -target aarch64

[clang] 8a43dc3 - [clang][Sema] Move the initializer lifetime checking code from SemaInit.cpp to a new place, NFC (#96758)

2024-06-27 Thread via cfe-commits
Author: Haojian Wu Date: 2024-06-27T10:56:06+02:00 New Revision: 8a43dc3efdd9bfba0bea32061ef2f3397a968eb9 URL: https://github.com/llvm/llvm-project/commit/8a43dc3efdd9bfba0bea32061ef2f3397a968eb9 DIFF: https://github.com/llvm/llvm-project/commit/8a43dc3efdd9bfba0bea32061ef2f3397a968eb9.diff LO

[clang] [clang][Sema] Move the initializer lifetime checking code from SemaInit.cpp to a new place, NFC (PR #96758)

2024-06-27 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/96758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Improve PointerSubChecker (PR #96501)

2024-06-27 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > The warning message may be still misleading if the LHS or RHS "arrays" are > non-array variables. I think that the warning message is OK: "Subtraction of two pointers that do not point into the same array is undefined behavior." -- this also covers the case when one or both

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-06-27 Thread via cfe-commits
mahesh-attarde wrote: > @mahesh-attarde please can you rebase against trunk - I've cleaned up the > test checks to help with the codegen diff done. https://github.com/llvm/llvm-project/pull/95904 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-06-27 Thread via cfe-commits
mahesh-attarde wrote: ping @MaskRay @RKSimon https://github.com/llvm/llvm-project/pull/95904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Let DeclPrinter print trailing requires expressions for template parameters (PR #96864)

2024-06-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/96864 >From a5c33bd413d8150d1688240c6b5253b1760cafe1 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 27 Jun 2024 15:59:48 +0800 Subject: [PATCH 1/2] [Clang][AST] Let DeclPrinter print trailing requires expressi

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-06-27 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > I'm not at all familiar with this PAuth stuff, but don't you need a test case > for where the new value is set (currently they all seem to be unset, if I'm > interpreting things correctly)? I'm not sure if I understood your question correctly - particularly, I'm not sure wha

[clang] [llvm] [RISCV] Add support for getHostCPUFeatures using hwprobe (PR #94352)

2024-06-27 Thread Yingwei Zheng via cfe-commits
@@ -2002,6 +2003,76 @@ bool sys::getHostCPUFeatures(StringMap &Features) { return true; } +#elif defined(__linux__) && defined(__riscv) +// struct riscv_hwprobe +struct RISCVHwProbe { + int64_t Key; + uint64_t Value; +}; +bool sys::getHostCPUFeatures(StringMap &Features) {

[clang] [llvm] [RISCV] Add support for getHostCPUFeatures using hwprobe (PR #94352)

2024-06-27 Thread Yingwei Zheng via cfe-commits
@@ -83,8 +83,14 @@ void riscv::getRISCVTargetFeatures(const Driver &D, const llvm::Triple &Triple, // and other features (ex. mirco architecture feature) from mcpu if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) { StringRef CPU = A->getValue(); -if (CPU == "nat

[clang] 2033b1c - [CodeGen] Don't write coverage to source directory in test

2024-06-27 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2024-06-27T11:21:42+02:00 New Revision: 2033b1cf16f040e1369d8efba8439dcd3e36ed31 URL: https://github.com/llvm/llvm-project/commit/2033b1cf16f040e1369d8efba8439dcd3e36ed31 DIFF: https://github.com/llvm/llvm-project/commit/2033b1cf16f040e1369d8efba8439dcd3e36ed31.dif

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-06-27 Thread James Henderson via cfe-commits
jh7370 wrote: > > I'm not at all familiar with this PAuth stuff, but don't you need a test > > case for where the new value is set (currently they all seem to be unset, > > if I'm interpreting things correctly)? > > @jh7370 I'm not sure if I understood your question correctly - particularly,

[clang] [Clang][AST] Let DeclPrinter print trailing requires expressions for template parameters (PR #96864)

2024-06-27 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. thanks, looks good. https://github.com/llvm/llvm-project/pull/96864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-06-27 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > I was referring to this line from the description: > > > llvm-readobj: print `PointerAuthELFGOT` or `!PointerAuthELFGOT` in version > > description of llvm_linux platform depending on whether the flag is set. > > In my opinion, if you don't test the first of those two cases,

[clang] [flang] [Flang-new][OpenMP] Add offload related flags for AMDGPU (PR #96742)

2024-06-27 Thread Dominik Adamski via cfe-commits
@@ -333,6 +333,9 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args, StringRef Val = A->getValue(); CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val)); } + + const ToolChain &TC = getToolChain(); + TC.addClangTargetOptions(Args, CmdArgs, Actio

[clang] [flang] [Flang-new][OpenMP] Add offload related flags for AMDGPU (PR #96742)

2024-06-27 Thread Tom Eccles via cfe-commits
@@ -333,6 +333,9 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args, StringRef Val = A->getValue(); CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val)); } + + const ToolChain &TC = getToolChain(); + TC.addClangTargetOptions(Args, CmdArgs, Actio

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-06-27 Thread Julian Brown via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -ast-print %s | FileCheck %s +// expected-no-diagnostics + +extern int bar(int); + +int foo(int arg) +{ + #pragma omp assume no_openmp_routines + { +auto fn = [](int x) { return bar(x); }; +// CHECK: auto fn = [

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-06-27 Thread Brian Cain via cfe-commits
androm3da wrote: > @androm3da @MaskRay I'm tagging you because I'm having trouble to get > feedback to this PR, and you seem to be the most recent contributors to XRay. > Would one of you be willing to review it? Any other pointers on who to get in > touch with are also much appreciated. I'm

[clang] [clang][analyzer] Improve documentation of checker 'cplusplus.Move' (NFC) (PR #96295)

2024-06-27 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/96295 From 0c57ad1ca36a841dff700eb98f878475e0243b88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Fri, 21 Jun 2024 12:13:02 +0200 Subject: [PATCH 1/3] [clang][analyzer] Improve documentation

[clang] [llvm] [RISCV] Add support for getHostCPUFeatures using hwprobe (PR #94352)

2024-06-27 Thread Pengcheng Wang via cfe-commits
@@ -83,8 +83,14 @@ void riscv::getRISCVTargetFeatures(const Driver &D, const llvm::Triple &Triple, // and other features (ex. mirco architecture feature) from mcpu if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) { StringRef CPU = A->getValue(); -if (CPU == "nat

[clang] [flang] [Flang-new][OpenMP] Add offload related flags for AMDGPU (PR #96742)

2024-06-27 Thread Dominik Adamski via cfe-commits
DominikAdamski wrote: > > fcuda-is-device flag is not used by Flang currently. In the future it will > > be needed for Flang equivalent functions: > > AMDGPUTargetCodeGenInfo::getGlobalVarAddressSpace > > AMDGPUTargetInfo::getTargetDefines . > > I don't follow - why would anything related to

[clang] [llvm] [AArch64][NEON] Add intrinsics for LUTI (PR #96883)

2024-06-27 Thread via cfe-commits
https://github.com/Lukacma created https://github.com/llvm/llvm-project/pull/96883 This patch adds intrinsics for NEON LUTI2 and LUTI4 instructions as specified in the [ACLE proposal](https://github.com/ARM-software/acle/pull/324) >From cb2ebe232013576f57f8f26b9156fccd75d7d38f Mon Sep 17 00:00

[clang] [llvm] [AArch64][NEON] Add intrinsics for LUTI (PR #96883)

2024-06-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Lukacma) Changes This patch adds intrinsics for NEON LUTI2 and LUTI4 instructions as specified in the [ACLE proposal](https://github.com/ARM-software/acle/pull/324) --- Patch is 45.96 KiB, truncated to 20.00 KiB below, full version

[clang] [llvm] [AArch64][NEON] Add intrinsics for LUTI (PR #96883)

2024-06-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: None (Lukacma) Changes This patch adds intrinsics for NEON LUTI2 and LUTI4 instructions as specified in the [ACLE proposal](https://github.com/ARM-software/acle/pull/324) --- Patch is 45.96 KiB, truncated to 20.00 KiB below, fu

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-06-27 Thread Julian Brown via cfe-commits
jtb20 wrote: > > > don't you need more code in AST? > > > > > > Sorry, I don't quite understand the question! Could you elaborate a little > > please? > > I was thinking maybe you need changes in AST related files, like > `ASTWriter.cpp`, but that might be not needed as this is adding a new

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

2024-06-27 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/88499 >From a4d4a0ff71f5086c9fdf43e332b9752074eb42dc Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Thu, 11 Apr 2024 16:10:16 + Subject: [PATCH 1/3] [CLANG][LLVM][AArch64]Add SME2.1 intrinsics for

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

2024-06-27 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/88499 >From a4d4a0ff71f5086c9fdf43e332b9752074eb42dc Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Thu, 11 Apr 2024 16:10:16 + Subject: [PATCH 1/4] [CLANG][LLVM][AArch64]Add SME2.1 intrinsics for

[clang] [flang] [Flang-new][OpenMP] Add offload related flags for AMDGPU (PR #96742)

2024-06-27 Thread Dominik Adamski via cfe-commits
@@ -333,6 +333,9 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args, StringRef Val = A->getValue(); CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val)); } + + const ToolChain &TC = getToolChain(); + TC.addClangTargetOptions(Args, CmdArgs, Actio

[clang] [Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo in early out logic (PR #96888)

2024-06-27 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/96888 We should be checking for a failed dyn_cast on the ParentFD result - not the loop invariant FD root value. Seems to have been introduced in #65193 Noticed by static analyser (I have no specific test case). >Fr

[clang] [Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo in early out logic (PR #96888)

2024-06-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Simon Pilgrim (RKSimon) Changes We should be checking for a failed dyn_cast on the ParentFD result - not the loop invariant FD root value. Seems to have been introduced in #65193 Noticed by static analyser (I have no specific test case).

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-27 Thread Michael Buch via cfe-commits
Michael137 wrote: > Here's the smallest patch that would put explicit alignment on any packed > structure: > > ``` > diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp > b/clang/lib/CodeGen/CGDebugInfo.cpp > index a072475ba770..bbb13ddd593b 100644 > --- a/clang/lib/CodeGen/CGDebugInfo.cpp > +++ b/

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-27 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/96475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-06-27 Thread Simon Pilgrim via cfe-commits
@@ -9,95 +9,6 @@ @"\01LC" = internal constant [11 x i8] c"buf == %s\0A\00"; [#uses=1] define void @test(ptr %a) nounwind ssp { -; MSVC-X86-LABEL: test: RKSimon wrote: where did the test checks go? https://github.com/llvm/llvm-project/pull/95904

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-06-27 Thread Simon Pilgrim via cfe-commits
@@ -114,250 +25,93 @@ return:; preds = %entry declare void @escape(ptr) define void @test_vla(i32 %n) nounwind ssp { -; MSVC-X86-LABEL: test_vla: -; MSVC-X86: # %bb.0: -; MSVC-X86-NEXT:pushl %ebp -; MSVC-X86-NEXT:movl %esp, %ebp -; MSVC-X86-NEXT:pushl %ea

[clang] [llvm] [Pipelines] Move IPSCCP after inliner pipeline (PR #96620)

2024-06-27 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > This patch causes some significant performance regressions on llvm-test-suite > (rv64gc-O3-thinlto): > > Name Before After Ratio > SingleSource/Benchmarks/Shootout/Shootout-random 2.150161677 > 3.300161641 + 53.5% > SingleSource/Benchmarks/Polybench/linear-alg

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-06-27 Thread Simon Pilgrim via cfe-commits
@@ -82,6 +94,8 @@ define void @tailcall_unrelated_frame() sspreq { ; LINUX-NEXT: .LBB1_2: # %CallStackCheckFailBlk ; LINUX-NEXT:.cfi_def_cfa_offset 16 ; LINUX-NEXT:callq __stack_chk_fail@PLT + + RKSimon wrote: superfluous https://github.com/llvm/llvm

[clang] [llvm] [llvm][AArch64] Move Apple aliases into the CpuAlias map (PR #96249)

2024-06-27 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm approved this pull request. LGTM, I've added some thoughts but it's fine as it is. https://github.com/llvm/llvm-project/pull/96249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [llvm] [llvm][AArch64] Move Apple aliases into the CpuAlias map (PR #96249)

2024-06-27 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/96249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] Move Apple aliases into the CpuAlias map (PR #96249)

2024-06-27 Thread Tomas Matheson via cfe-commits
@@ -5,11 +5,11 @@ // RUN: not %clang_cc1 -triple arm64--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix AARCH64 // AARCH64: error: unknown target CPU 'not-a-cpu' -// AARCH64-NEXT: note: valid target CPU values are: generic, cortex-a35, cortex-a34,

[clang] [llvm] [llvm][AArch64] Move Apple aliases into the CpuAlias map (PR #96249)

2024-06-27 Thread Tomas Matheson via cfe-commits
@@ -304,8 +304,21 @@ struct Alias { StringRef Name; }; -inline constexpr Alias CpuAliases[] = {{"cobalt-100", "neoverse-n2"}, - {"grace", "neoverse-v2"}}; +inline constexpr Alias CpuAliases[] = { +{"cobalt-100", "neoverse-n2"}, +

[clang] [llvm] [llvm][AArch64] Move Apple aliases into the CpuAlias map (PR #96249)

2024-06-27 Thread Tomas Matheson via cfe-commits
@@ -88,10 +88,14 @@ StringRef AArch64::getArchExtFeature(StringRef ArchExt) { void AArch64::fillValidCPUArchList(SmallVectorImpl &Values) { for (const auto &C : CpuInfos) - Values.push_back(C.Name); +Values.push_back(C.Name); for (const auto &Alias : CpuAliases

[clang] [flang] [Flang-new][OpenMP] Add offload related flags for AMDGPU (PR #96742)

2024-06-27 Thread Andrzej Warzyński via cfe-commits
@@ -333,6 +333,9 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args, StringRef Val = A->getValue(); CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val)); } + + const ToolChain &TC = getToolChain(); + TC.addClangTargetOptions(Args, CmdArgs, Actio

[clang] [llvm] [llvm][AArch64] Move Apple aliases into the CpuAlias map (PR #96249)

2024-06-27 Thread Tomas Matheson via cfe-commits
@@ -304,8 +304,21 @@ struct Alias { StringRef Name; }; -inline constexpr Alias CpuAliases[] = {{"cobalt-100", "neoverse-n2"}, - {"grace", "neoverse-v2"}}; +inline constexpr Alias CpuAliases[] = { tmatheson-arm wrote: We

[clang] [clang][analyzer] Improve documentation of checker 'cplusplus.Move' (NFC) (PR #96295)

2024-06-27 Thread Balázs Kéri via cfe-commits
balazske wrote: I fixed a test that contained the entire option help description. I think this is not needed, removed it and only included the first line of the description. https://github.com/llvm/llvm-project/pull/96295 ___ cfe-commits mailing list

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-06-27 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96159 >From 4eeb1b4e82941681b6cafda8579d136e3e7cb09f Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 18 Jun 2024 15:37:18 +0300 Subject: [PATCH 1/2] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core i

[clang] [llvm] [Pipelines] Move IPSCCP after inliner pipeline (PR #96620)

2024-06-27 Thread via cfe-commits
goldsteinn wrote: > > This patch causes some significant performance regressions on > > llvm-test-suite (rv64gc-O3-thinlto): > > NameBefore After Ratio > > SingleSource/Benchmarks/Shootout/Shootout-random2.150161677 > > 3.300161641 + 53.5% > > SingleSource/Benchmarks/Poly

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-06-27 Thread Sebastian Kreutzer via cfe-commits
sebastiankreutzer wrote: > > @androm3da @MaskRay I'm tagging you because I'm having trouble to get > > feedback to this PR, and you seem to be the most recent contributors to > > XRay. Would one of you be willing to review it? Any other pointers on who > > to get in touch with are also much ap

[clang] [flang] [Flang-new][OpenMP] Add offload related flags for AMDGPU (PR #96742)

2024-06-27 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > Clang for AMDGPU supports OpenMP and > [HIP](https://clang.llvm.org/docs/HIPSupport.html) and it reuses the same > code. For example `-fcuda-is-device` flag needs to be checked for [legacy HIP > host > code](https://github.com/llvm/llvm-project/blob/2033b1cf16f040e1369d8

[clang] [clang][NFC] Use range-based for loops (PR #96831)

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

[clang] [clang][NFC] Use range-based for loops (PR #96831)

2024-06-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: This looks good overall, but I have minor suggestions. https://github.com/llvm/llvm-project/pull/96831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [clang][NFC] Use range-based for loops (PR #96831)

2024-06-27 Thread Vlad Serebrennikov via cfe-commits
@@ -2056,40 +2056,40 @@ void CXXRecordDecl::completeDefinition() { completeDefinition(nullptr); } +static bool hasPureVirtualFinalOverrider( +const CXXRecordDecl &RD, const CXXFinalOverriderMap *FinalOverriders) { + auto ExistsIn = [](const CXXFinalOverriderMap &FinalOv

[clang] [llvm] [Pipelines] Move IPSCCP after inliner pipeline (PR #96620)

2024-06-27 Thread Florian Hahn via cfe-commits
https://github.com/fhahn commented: Running IPSCCP twice seems like quite a heavy hammer, I'd expect a noticeable compile-time impact. I'd recommend to try to extract a reproducer from your motivating use case and check why IPSCCP cannot perform the desired optimization before inlining. Note

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-27 Thread Gábor Horváth via cfe-commits
@@ -964,11 +966,26 @@ static bool pathOnlyInitializesGslPointer(IndirectLocalPath &Path) { return false; } -void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity, +void checkExprLifetime(Sema &SemaRef, const CheckingEntity &CEntity, E

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-27 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/96475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >