[clang] Extend life of variables in `DiagComparison` in `ExprConstant` (PR #79522)

2024-01-26 Thread via cfe-commits
https://github.com/cor3ntin requested changes to this pull request. We need to understand what's going on here. I suspect something gets tripped by the ternary. A temporary fix might be to assign ```cpp std::string first = Reversed ? RHS : LHS; std::string second = Reversed ? LHS : RHS; ```

[clang] [clang][analyzer] Simplify code of StreamChecker (NFC). (PR #79312)

2024-01-26 Thread Balázs Kéri via cfe-commits
balazske wrote: For clarification, the `evalRWCommon` new function is not planned to be used in the same way as other `eval*` calls, the name may be misleading. This function contains a "generic algorithm" that is called from the other `eval*` calls, but not used directly in `CallDescriptionMa

[clang] [clang-tools-extra] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-26 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,189 @@ +//===--- UseStdMinMaxCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-01-26 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Sorry, I'm still struggling with Github reviews compared to Phabricator... how do I get to an interdiff showing the latest version of the patch compared to the version I reviewed? https://github.com/llvm/llvm-project/pull/67749

[clang] [llvm] [clang-tools-extra] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-26 Thread Shourya Goel via cfe-commits
@@ -1098,7 +1098,13 @@ void VerifyDiagnosticConsumer::CheckDiagnostics() { // Produce an error if no expected-* directives could be found in the // source file(s) processed. if (Status == HasNoDirectives) { - Diags.Report(diag::err_verify_no_directives).setForc

[clang-tools-extra] [clang] [llvm] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-26 Thread Shourya Goel via cfe-commits
@@ -1098,7 +1098,16 @@ void VerifyDiagnosticConsumer::CheckDiagnostics() { // Produce an error if no expected-* directives could be found in the // source file(s) processed. if (Status == HasNoDirectives) { - Diags.Report(diag::err_verify_no_directives).setForc

[clang-tools-extra] [clang] [llvm] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-26 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 updated https://github.com/llvm/llvm-project/pull/78338 >From b98f02d4c155b5be9bd4f5b2e4bf73720a81f39a Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Wed, 17 Jan 2024 01:24:17 +0530 Subject: [PATCH 01/11] Fix : more detailed no expected directive message --- cla

[clang-tools-extra] [clang] [llvm] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-26 Thread Shourya Goel via cfe-commits
Sh0g0-1758 wrote: @asl @tbaederr @AaronBallman, can you please review this PR and merge it if everything seems fine. https://github.com/llvm/llvm-project/pull/78338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[lld] [clang] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-26 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 edited https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-26 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 approved this pull request. Just nits/minor questions from me, code otherwise LGTM. Sorry for the delay in review. I didn't realize you explicitly wanted me to review portions of the code. https://github.com/llvm/llvm-project/pull/74128 ___

[llvm] [lld] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-26 Thread Aiden Grossman via cfe-commits
@@ -1693,24 +1750,21 @@ disassembleObject(ObjectFile &Obj, const ObjectFile &DbgObj, LLVM_DEBUG(LVP.dump()); - std::unordered_map AddrToBBAddrMap; - std::unordered_map AddrToPGOAnalysisMap; + BBAddrMapInfo FullAddrMap; auto ReadBBAddrMap = [&](std::optional SectionIn

[clang] [llvm] [lld] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-26 Thread Aiden Grossman via cfe-commits
@@ -172,6 +172,105 @@ class OtoolOptTable : public CommonOptTable { "Mach-O object file displaying tool") {} }; +struct BBAddrMapLabel { + std::string BlockLabel; + std::string PGOAnalysis; +}; + +// This class represents the BBAddrMap and PGOMap assoc

[llvm] [lld] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-26 Thread Aiden Grossman via cfe-commits
@@ -172,6 +172,105 @@ class OtoolOptTable : public CommonOptTable { "Mach-O object file displaying tool") {} }; +struct BBAddrMapLabel { + std::string BlockLabel; + std::string PGOAnalysis; +}; + +// This class represents the BBAddrMap and PGOMap assoc

[lld] [clang] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-26 Thread Aiden Grossman via cfe-commits
@@ -73,68 +83,89 @@ FileHeader: Sections: - Name:.text.foo Type:SHT_PROGBITS -Address: [[FOO_ADDR]] +Address: 0x4000 Flags: [SHF_ALLOC, SHF_EXECINSTR] -Content: '503b050520907d02ebf5c3' +Content: '503b050530907d08ebf50f8dee1fc3'

[clang-tools-extra] [llvm] [clang] [SeperateConstOffsetFromGEP] Handle `or disjoint` flags (PR #76997)

2024-01-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/76997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [SeperateConstOffsetFromGEP] Handle `or disjoint` flags (PR #76997)

2024-01-26 Thread Matt Arsenault via cfe-commits
arsenm wrote: Not sure if we need additional negative tests for missing disjoints https://github.com/llvm/llvm-project/pull/76997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f6290e0 - [NFC][FMV] Add tests to demonstrate feature priorities. (#79455)

2024-01-26 Thread via cfe-commits
Author: Alexandros Lamprineas Date: 2024-01-26T09:27:28Z New Revision: f6290e0daf5aff7132cab097fb13aad8a20ad070 URL: https://github.com/llvm/llvm-project/commit/f6290e0daf5aff7132cab097fb13aad8a20ad070 DIFF: https://github.com/llvm/llvm-project/commit/f6290e0daf5aff7132cab097fb13aad8a20ad070.di

[clang] [NFC][FMV] Add tests to demonstrate feature priorities. (PR #79455)

2024-01-26 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/79455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread Gábor Spaits via cfe-commits
spaits wrote: It looks like libc++ test suites are failing. Looking at the logs from the CI I can not really figure out what is the exact reason. I could only deduce that the failing test case is `libcxx/gdb/gdb_pretty_printer_test.sh.cpp`. This case seems to be related to `libcxx/selftest/con

[clang-tools-extra] [llvm] ValueTracking: Merge fcmpImpliesClass and fcmpToClassTest (PR #66522)

2024-01-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/66522 >From 076ab2374d84c4112e0bf3fb11ecda2f5774785e Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 11 Sep 2023 10:56:40 +0300 Subject: [PATCH 1/2] ValueTracking: Merge fcmpImpliesClass and fcmpToClassTest --

[clang] [WIP] Try to fix GH73418 (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/79568 For the purpose of poking the libc++ CI. >From 212a4efbc65c437f652dc08c75ed4a836167fe70 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 26 Jan 2024 18:03:37 +0800 Subject: [PATCH] [clang][Sema] fixup ---

[clang-tools-extra] [flang] [llvm] [libcxx] [clang] [libcxxabi] [compiler-rt] [libc] [lldb] [lld] [libclc] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-26 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78113 >From 36b085f21b76d7bf7c9965a86a09d1cef4fe9329 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 14 Jan 2024 14:13:08 + Subject: [PATCH 1/9] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation.

[clang-tools-extra] [flang] [llvm] [libcxx] [clang] [libcxxabi] [compiler-rt] [libc] [lldb] [lld] [libclc] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-26 Thread Florian Hahn via cfe-commits
@@ -491,17 +491,38 @@ void VPlanTransforms::removeDeadRecipes(VPlan &Plan) { static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, ScalarEvolution &SE, Instruction *TruncI, -Type

[flang] [compiler-rt] [lld] [llvm] [libc] [libclc] [libcxx] [clang] [libcxxabi] [lldb] [clang-tools-extra] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-26 Thread via cfe-commits
https://github.com/ayalz approved this pull request. Looks good to me, thanks! Adding a last minor nit. https://github.com/llvm/llvm-project/pull/78113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[libc] [libclc] [flang] [lldb] [libcxx] [compiler-rt] [libcxxabi] [clang] [lld] [clang-tools-extra] [llvm] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-26 Thread via cfe-commits
@@ -491,17 +491,39 @@ void VPlanTransforms::removeDeadRecipes(VPlan &Plan) { static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, ScalarEvolution &SE, Instruction *TruncI, -Type

[libclc] [clang] [compiler-rt] [llvm] [flang] [libcxx] [lld] [clang-tools-extra] [lldb] [libcxxabi] [libc] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-26 Thread via cfe-commits
https://github.com/ayalz edited https://github.com/llvm/llvm-project/pull/78113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] ValueTracking: Merge fcmpImpliesClass and fcmpToClassTest (PR #66522)

2024-01-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/66522 >From 076ab2374d84c4112e0bf3fb11ecda2f5774785e Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 11 Sep 2023 10:56:40 +0300 Subject: [PATCH 1/6] ValueTracking: Merge fcmpImpliesClass and fcmpToClassTest --

[clang] [clang-format] Add ShortReturnTypeColumn option. (PR #78011)

2024-01-26 Thread via cfe-commits
https://github.com/rmarker updated https://github.com/llvm/llvm-project/pull/78011 >From a1312a0a463bb946f336977b5b01ef7afbede678 Mon Sep 17 00:00:00 2001 From: rmarker Date: Thu, 11 Jan 2024 15:01:18 +1030 Subject: [PATCH 1/3] [clang-format] Add ShortReturnTypeColumn option. --- clang/docs/C

[clang] [clang-format] Add ShortReturnTypeColumn option. (PR #78011)

2024-01-26 Thread via cfe-commits
rmarker wrote: Reworked this PR with a new approach, as discussed in #78010. `ShortReturnTypeColumn` has been replaced with a new enum option `RTBS_AllowShortType` for `AlwaysBreakAfterReturnType `. Also, the short return type behaviour has been updated to ignore the leading indentation on the

[compiler-rt] [flang] [lld] [mlir] [libc] [libcxxabi] [libcxx] [lldb] [clang] [openmp] [llvm] [libclc] [clang-tools-extra] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-26 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78113 >From 36b085f21b76d7bf7c9965a86a09d1cef4fe9329 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 14 Jan 2024 14:13:08 + Subject: [PATCH 1/9] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation.

[clang] [clang-format] Add AllowShortType option for AlwaysBreakAfterReturnType. (PR #78011)

2024-01-26 Thread via cfe-commits
https://github.com/rmarker edited https://github.com/llvm/llvm-project/pull/78011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] reject to capture variable in `RequiresExprBodyDecl` (PR #78598)

2024-01-26 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/78598 >From 8fa3dc43e770025308da47f6aff309fa58c47fc3 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 18 Jan 2024 23:12:23 +0800 Subject: [PATCH 1/3] [clang] reject to capture variable in `RequiresExprBodyDe

[compiler-rt] [flang] [lld] [mlir] [libc] [libcxxabi] [libcxx] [lldb] [clang] [openmp] [llvm] [libclc] [clang-tools-extra] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-26 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78113 >From 36b085f21b76d7bf7c9965a86a09d1cef4fe9329 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 14 Jan 2024 14:13:08 + Subject: [PATCH 01/10] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation.

[clang] [clang-format] Add AllowShortType option for AlwaysBreakAfterReturnType. (PR #78011)

2024-01-26 Thread via cfe-commits
https://github.com/rmarker edited https://github.com/llvm/llvm-project/pull/78011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [flang] [lld] [libc] [libcxx] [lldb] [clang] [llvm] [clang-tools-extra] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-26 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/73158 >From 13a26e8e7440c3b501730b22588af393a3e543cd Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 6 Jul 2023 08:07:45 +0100 Subject: [PATCH 1/3] [VPlan] Implement cloning of VPlans. This patch implements clonin

[openmp] [libclc] [clang] [compiler-rt] [llvm] [flang] [libcxx] [lld] [clang-tools-extra] [mlir] [lldb] [libcxxabi] [libc] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-26 Thread Florian Hahn via cfe-commits
@@ -491,17 +491,39 @@ void VPlanTransforms::removeDeadRecipes(VPlan &Plan) { static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, ScalarEvolution &SE, Instruction *TruncI, -Type

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-26 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/79502 >From 1ca9d2d7697528b1a126cc95a2fb7a9e5bb8669a Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Jan 2024 22:12:55 +0100 Subject: [PATCH] [clang] Only set the trailing bytes to zero when fi

[clang] [lldb] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread Balazs Benics via cfe-commits
steakhal wrote: FYI this caused a crash in the Static Analyzer, tracked here: #79575 We will (well, probably I will) look into this to see what could be done about it to workaround/fix the crash for clang-18. https://github.com/llvm/llvm-project/pull/78041 __

[libcxx] [clang] [mlir] [llvm] [clang-tools-extra] [openmp] [flang] [libclc] [lld] [lldb] [libcxxabi] [compiler-rt] [libc] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-26 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/78113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [clang] [llvm] [clang-tools-extra] [flang] [lld] [lldb] [compiler-rt] [libc] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-26 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/73158 >From 13a26e8e7440c3b501730b22588af393a3e543cd Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 6 Jul 2023 08:07:45 +0100 Subject: [PATCH 1/4] [VPlan] Implement cloning of VPlans. This patch implements clonin

[libc] [lld] [llvm] [lldb] [clang-tools-extra] [clang] [flang] [compiler-rt] [libcxx] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-26 Thread Florian Hahn via cfe-commits
@@ -982,6 +1037,92 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapOperands(VPBlockBase *Entry, VPBlockBase *NewEntry, + DenseMap &Old2Ne

[clang] [lld] [libc] [flang] [lldb] [libcxx] [clang-tools-extra] [llvm] [compiler-rt] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-26 Thread Florian Hahn via cfe-commits
@@ -982,6 +1037,92 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapOperands(VPBlockBase *Entry, VPBlockBase *NewEntry, + DenseMap &Old2Ne

[clang-tools-extra] [libcxx] [flang] [lld] [lldb] [libc] [llvm] [compiler-rt] [clang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-26 Thread Florian Hahn via cfe-commits
@@ -982,6 +1037,92 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapOperands(VPBlockBase *Entry, VPBlockBase *NewEntry, fhahn wrote: I left it as

[libc] [clang] [flang] [clang-tools-extra] [compiler-rt] [llvm] [libcxx] [lld] [lldb] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-26 Thread Florian Hahn via cfe-commits
@@ -982,6 +1037,92 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapOperands(VPBlockBase *Entry, VPBlockBase *NewEntry, + DenseMap &Old2Ne

[llvm] [clang] [flang] [compiler-rt] [clang-tools-extra] [libcxx] [lldb] [libc] [lld] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-26 Thread Florian Hahn via cfe-commits
@@ -982,6 +1037,92 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapOperands(VPBlockBase *Entry, VPBlockBase *NewEntry, + DenseMap &Old2Ne

[libcxx] [lldb] [clang] [compiler-rt] [libc] [lld] [llvm] [flang] [clang-tools-extra] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-26 Thread Florian Hahn via cfe-commits
@@ -614,6 +614,61 @@ void VPBasicBlock::print(raw_ostream &O, const Twine &Indent, printSuccessors(O, Indent); } #endif +static void cloneCFG(VPBlockBase *Entry, + DenseMap &Old2NewVPBlocks); + +static VPBlockBase *cloneVPB(VPBlockBase *BB) {

[clang-tools-extra] [flang] [llvm] [clang] [compiler-rt] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-26 Thread via cfe-commits
@@ -8378,9 +8357,8 @@ void VPRecipeBuilder::fixHeaderPhis() { } } -VPRecipeOrVPValueTy VPRecipeBuilder::handleReplication(Instruction *I, - VFRange &Range, - VPlan &Pl

[clang] [flang] [clang-tools-extra] [compiler-rt] [llvm] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-26 Thread via cfe-commits
@@ -8999,6 +8963,18 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( LinkVPBB->insert(FMulRecipe, CurrentLink->getIterator()); VecOp = FMulRecipe; } else { +auto *Blend = dyn_cast(CurrentLink); +if (PhiR->isInLoop() && Blend)

[compiler-rt] [clang-tools-extra] [flang] [clang] [llvm] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-26 Thread via cfe-commits
@@ -8999,6 +8963,18 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( LinkVPBB->insert(FMulRecipe, CurrentLink->getIterator()); VecOp = FMulRecipe; } else { +auto *Blend = dyn_cast(CurrentLink); ayalz wrote: Add foldi

[flang] [llvm] [clang] [clang-tools-extra] [compiler-rt] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-26 Thread via cfe-commits
@@ -116,12 +111,11 @@ class VPRecipeBuilder { /// Check if an existing VPValue can be used for \p Instr or a recipe can be /// create for \p I withing the given VF \p Range. If an existing VPValue can ayalz wrote: Comment needs updating. (Plus fixing "wit

[clang] [clang-tools-extra] [compiler-rt] [llvm] [flang] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-26 Thread via cfe-commits
@@ -806,6 +806,19 @@ static unsigned getOpcodeForRecipe(VPRecipeBase &R) { /// Try to simplify recipe \p R. static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) { + // Try to remove redundant blend recipes. + if (auto *Blend = dyn_cast(&R)) { +bool AllEq

[llvm] [clang] [clang-tools-extra] [compiler-rt] [flang] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-26 Thread via cfe-commits
@@ -88,8 +86,8 @@ class VPRecipeBuilder { /// or a new VPBlendRecipe otherwise. Currently all such phi nodes are turned ayalz wrote: Comment needs updating. https://github.com/llvm/llvm-project/pull/76090 ___ cfe-co

[compiler-rt] [flang] [clang] [clang-tools-extra] [llvm] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-26 Thread via cfe-commits
@@ -8999,6 +8963,18 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( LinkVPBB->insert(FMulRecipe, CurrentLink->getIterator()); VecOp = FMulRecipe; } else { +auto *Blend = dyn_cast(CurrentLink); +if (PhiR->isInLoop() && Blend)

[clang] [flang] [clang-tools-extra] [compiler-rt] [llvm] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-26 Thread via cfe-commits
@@ -8292,13 +8271,13 @@ VPRecipeOrVPValueTy VPRecipeBuilder::tryToBlend(PHINode *Phi, for (unsigned In = 0; In < NumIncoming; In++) { VPValue *EdgeMask = createEdgeMask(Phi->getIncomingBlock(In), Phi->getParent(), *Plan); -assert((EdgeMask || NumIncoming == 1

[clang] [clang-repl] Typo within InterpreterTest.cpp (PR #79119)

2024-01-26 Thread Nashe Mncube via cfe-commits
https://github.com/nasherm closed https://github.com/llvm/llvm-project/pull/79119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Typo within InterpreterTest.cpp (PR #79119)

2024-01-26 Thread Nashe Mncube via cfe-commits
nasherm wrote: Need to follow proper contribution process. So closing for now https://github.com/llvm/llvm-project/pull/79119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [flang] [libcxx] [clang-tools-extra] [lld] [compiler-rt] [llvm] [lldb] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-26 Thread via cfe-commits
https://github.com/ayalz approved this pull request. Looks good to me, ship it! https://github.com/llvm/llvm-project/pull/73158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Changed the __ARM_ARCH macro to match the definition in the ACLE. (PR #79583)

2024-01-26 Thread James Westwood via cfe-commits
https://github.com/jwestwood921 created https://github.com/llvm/llvm-project/pull/79583 Added functionality to the ARMTargetParser to obtain the minor version of each architecture, and amended ARM.cpp and AArch64.cpp to define __ARM_ARCH correctly. In ACLE 5.4.1, __ARM_ARCH is defined as equa

[clang] [llvm] Changed the __ARM_ARCH macro to match the definition in the ACLE. (PR #79583)

2024-01-26 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it i

[clang] [llvm] Changed the __ARM_ARCH macro to match the definition in the ACLE. (PR #79583)

2024-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-arm @llvm/pr-subscribers-backend-aarch64 Author: James Westwood (jwestwood921) Changes Added functionality to the ARMTargetParser to obtain the minor version of each architecture, and amended ARM.cpp and AArch64.cpp to define __ARM_ARCH correct

[clang] [Clang][RISCV] Forward --no-relax option to linker for RISC-V (PR #76432)

2024-01-26 Thread Andreu Carminati via cfe-commits
andcarminati wrote: > Do you need someone to commit this? Hi @topperc, if you can commit for me I would appreciate it. https://github.com/llvm/llvm-project/pull/76432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [Sema] Fix c23 not checking CheckBoolLikeConversion (PR #79588)

2024-01-26 Thread Pil Eghoff via cfe-commits
https://github.com/pileghoff created https://github.com/llvm/llvm-project/pull/79588 Fixes #79435 Im not sure if this is the best solution, but it seems to work well. Should i be adding tests for this? If i should, i would need some help on how. I was able to run the test suite, but i have no

[clang] [Sema] Fix c23 not checking CheckBoolLikeConversion (PR #79588)

2024-01-26 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it i

[clang] [Sema] Fix c23 not checking CheckBoolLikeConversion (PR #79588)

2024-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Pil Eghoff (pileghoff) Changes Fixes #79435 Im not sure if this is the best solution, but it seems to work well. Should i be adding tests for this? If i should, i would need some help on how. I was able to run the test suite, but i have

[clang] [Sema] Fix c23 not checking CheckBoolLikeConversion (PR #79588)

2024-01-26 Thread Pil Eghoff via cfe-commits
pileghoff wrote: @AaronBallman If you have time for review, the PR is ready 👍🏽 https://github.com/llvm/llvm-project/pull/79588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Extend life of variables in `DiagComparison` in `ExprConstant` (PR #79522)

2024-01-26 Thread via cfe-commits
AdvenamTacet wrote: @cor3ntin Thx for your comment! I looked at ternary operator at the very beginning, but discarded this direction as I was unable to create a small example reproducing the error. After your comment I started looking at it again. Your temporary fix also resolves the problem o

[clang] [clang] Add GCC-compatible code model names for sparc64 (PR #79485)

2024-01-26 Thread Rainer Orth via cfe-commits
rorth wrote: GCC also supports `-mcmodel=embmedany`. Maybe it would be good to reject that with a clear message? As for the generated code (not this PR, I'd say), it would certainly be good to test that on some larger code base (like LLVM itself) and, preferably, also test actual interoperab

[clang] [llvm] [FMV] Add alias for FEAT_RDM and change priorities according to ACLE. (PR #79316)

2024-01-26 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/79316 >From 3e0a3fe637ad6e815d0ca62f38d39c2a27f8b5d5 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Wed, 24 Jan 2024 15:26:01 + Subject: [PATCH] [FMV] Change feature priorities according to ACLE. This

[llvm] [clang] [FMV] Change feature priorities according to ACLE. (PR #79316)

2024-01-26 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/79316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [FMV] Change feature priorities according to ACLE. (PR #79316)

2024-01-26 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/79316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [FMV] Change feature priorities according to ACLE. (PR #79316)

2024-01-26 Thread Alexandros Lamprineas via cfe-commits
@@ -114,6 +121,10 @@ const AArch64::ArchInfo *AArch64::parseArch(StringRef Arch) { } std::optional AArch64::parseArchExtension(StringRef ArchExt) { + // Resolve aliases first. + ArchExt = resolveExtAlias(ArchExt); labrinea wrote: I will separate this chan

[llvm] [libcxxabi] [mlir] [openmp] [libcxx] [clang] [flang] [compiler-rt] [libc] [clang-tools-extra] [AArch64] Add custom lowering for load <3 x i8>. (PR #78632)

2024-01-26 Thread Florian Hahn via cfe-commits
@@ -21248,6 +21297,51 @@ static SDValue foldTruncStoreOfExt(SelectionDAG &DAG, SDNode *N) { return SDValue(); } +// A custom combine to lower load <3 x i8> as the more efficient sequence +// below: +//ldrb wX, [x0, #2] +//ldrh wY, [x0] +//orr wX, wY, wX, lsl #16

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/79371 From 3e0c3db0d8500e5f2111e3603da3d8f2b1cd261d Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Wed, 24 Jan 2024 21:21:26 +0100 Subject: [PATCH 01/13] [Sema]Substitue template parameter packs when deduced from fu

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-26 Thread via cfe-commits
serge-sans-paille wrote: > (Extra tests needed) test added, ready for review https://github.com/llvm/llvm-project/pull/79502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX][TLS] Disallow the use of -maix-small-local-exec-tls and -fno-data-sections (PR #79252)

2024-01-26 Thread via cfe-commits
@@ -12,6 +15,10 @@ entry: ; Check that the aix-small-local-exec-tls attribute is not supported on Linux and AIX (32-bit). ; CHECK-NOT-SUPPORTED: The aix-small-local-exec-tls attribute is only supported on AIX in 64-bit mode. +; Check that the aix-small-local-exec-tls attribu

[clang] [llvm] [AIX][TLS] Disallow the use of -maix-small-local-exec-tls and -fno-data-sections (PR #79252)

2024-01-26 Thread via cfe-commits
@@ -124,10 +124,23 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef TuneCPU, // Determine endianness. IsLittleEndian = TM.isLittleEndian(); - if (HasAIXSmallLocalExecTLS && (!TargetTriple.isOSAIX() || !IsPPC64)) -report_fatal_error( - "The ai

[clang] [clang] Add GCC-compatible code model names for sparc64 (PR #79485)

2024-01-26 Thread via cfe-commits
koachan wrote: `embmedany` is already rejected by the driver at the moment: ``` error: unsupported argument 'embmedany' to option '-mcmodel=' for target 'sparc64' ``` On the testing issue, however, would compiling LLVM with each of the code models + running codegen tests be enough to at least

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-26 Thread via cfe-commits
cor3ntin wrote: @yronglin Do you know when you will be able to get to this? thanks! https://github.com/llvm/llvm-project/pull/76361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread Erich Keane via cfe-commits
erichkeane wrote: @bolshakov-a : The original bug has a good amount of analysis to it, so if you could see if there is a fix for it, else we probably do have to revert for that one and miss 18 with this patch. https://github.com/llvm/llvm-project/pull/78041

[clang] [clang][analyzer] Fix argument invalidations in StreamChecker. (PR #79470)

2024-01-26 Thread Balázs Kéri via cfe-commits
@@ -0,0 +1,133 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -analyzer-checker=core \ +// RUN: -analyzer-checker=alpha.unix.Stream \ +// RUN: -analyzer-checker=debug.StreamTester \ +// RUN: -analyzer-checker=debug.ExprInspection + +#include "Inputs/system-header-simulator.h

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread via cfe-commits
@@ -431,6 +442,17 @@ namespace deduction_after_explicit_pack { i(0, 1, 2, 3, 4, 5); // expected-error {{no match}} } + template + void bar(args_tag, type_identity_t..., int mid, type_identity_t...) {} cor3ntin wrote: I'd like to see a test for ```cp

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/79371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread Gábor Spaits via cfe-commits
spaits wrote: I did some more digging. I saw that the test in the CI fails with permission errors. ``` | No symbol table is loaded. Use the "file" command. | warning: opening /proc/PID/mem file for lwp 4103309.4103309 failed: Permission denied (13) | Traceback (most recent call last): | Fil

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread via cfe-commits
@@ -4371,6 +4394,34 @@ Sema::TemplateDeductionResult Sema::DeduceTemplateArguments( // corresponding argument is a list? PackScope.nextPackElement(); } + } else if (!IsTrailingPack && !PackScope.isPartiallyExpanded() && + PackSc

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/79371 From 3e0c3db0d8500e5f2111e3603da3d8f2b1cd261d Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Wed, 24 Jan 2024 21:21:26 +0100 Subject: [PATCH 01/14] [Sema]Substitue template parameter packs when deduced from fu

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread Erich Keane via cfe-commits
=?utf-8?q?Gábor?= Spaits Message-ID: In-Reply-To: erichkeane wrote: > I did some more digging. I saw that the test in the CI fails with permission > errors. > > ``` > | No symbol table is loaded. Use the "file" command. > | warning: opening /proc/PID/mem file for lwp 4103309.4103309 failed:

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread via cfe-commits
=?utf-8?q?G=C3=A1bor?= Spaits Message-ID: In-Reply-To: @@ -858,6 +859,27 @@ class PackDeductionScope { Info.PendingDeducedPacks[Pack.Index] = Pack.Outer; } + // Return the size of the saved packs if all of them has the same size. + std::optional getSavedPackSizeIfA

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-26 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/76361 >From 89eeeaea909ba8297236889e50936f8948dd82a4 Mon Sep 17 00:00:00 2001 From: yronglin Date: Thu, 11 Jan 2024 23:28:32 +0800 Subject: [PATCH 1/2] [Clang] Implement P2718R0 "Lifetime extension in range-based for

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread via cfe-commits
=?utf-8?q?G=C3=A1bor?= Spaits Message-ID: In-Reply-To: @@ -858,6 +859,27 @@ class PackDeductionScope { Info.PendingDeducedPacks[Pack.Index] = Pack.Outer; } + // Return the size of the saved packs if all of them has the same size. + std::optional getSavedPackSizeIfA

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-26 Thread via cfe-commits
yronglin wrote: > @yronglin Do you know when you will be able to get to this? thanks! Sorry for the lack of new actions for a long time. I have recently fixed some problems in the dependent context. I will try to complete the DefaultInit related functions and tests this weekend. https://githu

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/79371 From 3e0c3db0d8500e5f2111e3603da3d8f2b1cd261d Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Wed, 24 Jan 2024 21:21:26 +0100 Subject: [PATCH 01/15] [Sema]Substitue template parameter packs when deduced from fu

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread Gábor Spaits via cfe-commits
@@ -431,6 +442,17 @@ namespace deduction_after_explicit_pack { i(0, 1, 2, 3, 4, 5); // expected-error {{no match}} } + template + void bar(args_tag, type_identity_t..., int mid, type_identity_t...) {} spaits wrote: Added the test. It also works. ht

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-26 Thread via cfe-commits
@@ -1361,6 +1367,20 @@ class Sema final { // VLAs). bool InConditionallyConstantEvaluateContext = false; +/// Whether we are currently in a context in which all temporaries must be +/// lifetime-extended, even if they're not bound to a reference (for example,

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-26 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/76361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-01-26 Thread kleines Filmröllchen via cfe-commits
kleinesfilmroellchen wrote: > Sorry, I'm still struggling with Github reviews compared to Phabricator... > how do I get to an interdiff showing the latest version of the patch compared > to the version I reviewed? I'm fairly sure that GitHub has no built-in feature for this; I've never used i

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-26 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: The newest version of this patch still doesn't work correctly. Switching the new `LoadExternalSpecializationsLazily` to disabled by default (somehow the argument didn't work on its own) instead crashes, most of the cases involving `MultiOnDiskHashTable`. I suspect some kind of me

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread Gábor Spaits via cfe-commits
@@ -858,6 +859,27 @@ class PackDeductionScope { Info.PendingDeducedPacks[Pack.Index] = Pack.Outer; } + // Return the size of the saved packs if all of them has the same size. + std::optional getSavedPackSizeIfAllEqual() const { +if (Packs.size() == 0 || +

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread Gábor Spaits via cfe-commits
https://github.com/spaits edited https://github.com/llvm/llvm-project/pull/79371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [flang] [clang-tools-extra] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-26 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74309 >From 14f8c3e38791cc6b06455b8beffe37a6f7105e03 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 4 Dec 2023 10:32:03 + Subject: [PATCH 01/18] Add SYSTEM runtime and lowering intrinsic support Calls std::syst

[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)

2024-01-26 Thread via cfe-commits
=?utf-8?q?Gábor?= Spaits,Gabor Spaits Message-ID: In-Reply-To: @@ -858,6 +859,27 @@ class PackDeductionScope { Info.PendingDeducedPacks[Pack.Index] = Pack.Outer; } + // Return the size of the saved packs if all of them has the same size. + std::optional getSavedPa

  1   2   3   4   >