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

2024-01-29 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 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 som

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

2024-01-29 Thread Pil Eghoff via cfe-commits
https://github.com/pileghoff updated https://github.com/llvm/llvm-project/pull/79588 >From 38d96aba5818091d48c40a46738f5adbf881b2a8 Mon Sep 17 00:00:00 2001 From: Pil Eghoff Date: Fri, 26 Jan 2024 13:30:17 +0100 Subject: [PATCH] [Sema] Fix c23 not checking CheckBoolLikeConversion --- clang/do

[clang] [clang] WIP: Implement CTAD for type alias template. (PR #77890)

2024-01-29 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/77890 >From 8f7d83aed173688ff1413b7c4445d4576efee872 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 24 Jan 2024 14:55:03 +0100 Subject: [PATCH] [clang] Implement Class Template Argument Deduction (CTAD) for type

[clang] [clang-tools-extra] [clangd] Prevent printing huge initializer lists in hover definitions (PR #79746)

2024-01-29 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/79746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clangd] Prevent printing huge initializer lists in hover definitions (PR #79746)

2024-01-29 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. https://github.com/llvm/llvm-project/pull/79746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd] Prevent printing huge initializer lists in hover definitions (PR #79746)

2024-01-29 Thread kadir çetinkaya via cfe-commits
@@ -138,15 +138,9 @@ std::string getNamespaceScope(const Decl *D) { std::string printDefinition(const Decl *D, PrintingPolicy PP, const syntax::TokenBuffer &TB) { - if (auto *VD = llvm::dyn_cast(D)) { -if (auto *IE = VD->getInit()) { - //

[clang-tools-extra] [clang] [clangd] Prevent printing huge initializer lists in hover definitions (PR #79746)

2024-01-29 Thread kadir çetinkaya via cfe-commits
@@ -1720,6 +1720,12 @@ void StmtPrinter::VisitInitListExpr(InitListExpr* Node) { OS << "{"; for (unsigned i = 0, e = Node->getNumInits(); i != e; ++i) { if (i) OS << ", "; +// TODO: There is duplicated functionality in APValue::printPretty. +// Would be good to

[clang] [clang] WIP: Implement CTAD for type alias template. (PR #77890)

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

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

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

[clang-tools-extra] [compiler-rt] [libc] [flang] [mlir] [libcxx] [lldb] [llvm] [clang] [AArch64] add intrinsic to generate a bfi instruction (PR #79672)

2024-01-29 Thread David Green via cfe-commits
davemgreen wrote: OK. We would not usually add intrinsics like this without a strong motivating case, that could not be optimized in some other way. It is better to use target independent options when available, and inline assembly is available as a fallback if it is really needed. But I would

[clang-tools-extra] [clangd] forward clang-tidy's readability-identifier-naming fix to textDocument/rename (PR #78454)

2024-01-29 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Linking to the issue this is seeking to address for reference: https://github.com/clangd/clangd/issues/1589 https://github.com/llvm/llvm-project/pull/78454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [clang-format] Simplify the AfterPlacementOperator option (PR #79796)

2024-01-29 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/79796 Change AfterPlacementOperator to a boolean. Also add SBPO_None for never inserting a space before a left parenthesis and deprecate SBPO_Never, which meant never inserting a space except when after new/delete. Fi

[clang] [clang-format] Simplify the AfterPlacementOperator option (PR #79796)

2024-01-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Change AfterPlacementOperator to a boolean. Also add SBPO_None for never inserting a space before a left parenthesis and deprecate SBPO_Never, which meant never inserting a space except when after new/dele

[llvm] [clang-tools-extra] [clang] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-01-29 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/74056 >From 9be777d5b39852cf3c0b2538fd5f712922672caa Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 1 Dec 2023 18:00:13 +0900 Subject: [PATCH 1/2] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass""

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-01-29 Thread Matt Arsenault via cfe-commits
@@ -2561,6 +2567,70 @@ bool SIMemoryLegalizer::expandAtomicCmpxchgOrRmw(const SIMemOpInfo &MOI, return Changed; } +bool SIMemoryLegalizer::GFX9InsertWaitcntForPreciseMem(MachineFunction &MF) { arsenm wrote: can you just make this happen as a consequence of

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-01-29 Thread Matt Arsenault via cfe-commits
@@ -2561,6 +2567,70 @@ bool SIMemoryLegalizer::expandAtomicCmpxchgOrRmw(const SIMemOpInfo &MOI, return Changed; } +bool SIMemoryLegalizer::GFX9InsertWaitcntForPreciseMem(MachineFunction &MF) { + const GCNSubtarget &ST = MF.getSubtarget(); + const SIInstrInfo *TII = ST.get

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-01-29 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/77890 >From becb1bdebc8d10296a5c9f1af64ebae5ca9b68b7 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 24 Jan 2024 14:55:03 +0100 Subject: [PATCH] [clang] Implement Class Template Argument Deduction (CTAD) for type

[clang] [Clang][Sema] Fix crash when type used in return statement contains errors (PR #79788)

2024-01-29 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Missing changelog, otherwise LGTM https://github.com/llvm/llvm-project/pull/79788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang-tools-extra] [clangd] forward clang-tidy's readability-identifier-naming fix to textDocument/rename (PR #78454)

2024-01-29 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 commented: Thanks, the approach in this patch looks pretty good to me. My only feedback is to encapsulate the "hard coding" into a function like: ``` Option TryConvertToRename(const Diag *D, const Fix *F) ``` because I can imagine in the future coming across o

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-01-29 Thread Haojian Wu via cfe-commits
https://github.com/hokein ready_for_review https://github.com/llvm/llvm-project/pull/77890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-01-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes Fixes #54051 This patch implements the C++20 feature -- CTAD for alias templates. It is an initial patch, which covers most of pieces, the major missing piece is to implement the associated constraints (over.ma

[clang] [clang][ASTImporter] Improve import of variable template specializations. (PR #78284)

2024-01-29 Thread Balázs Kéri via cfe-commits
https://github.com/balazske closed https://github.com/llvm/llvm-project/pull/78284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9f80ecb - [clang][ASTImporter] Improve import of variable template specializations. (#78284)

2024-01-29 Thread via cfe-commits
Author: Balázs Kéri Date: 2024-01-29T10:04:17+01:00 New Revision: 9f80ecb308c989523cc32d4256f7ab61c5b788d7 URL: https://github.com/llvm/llvm-project/commit/9f80ecb308c989523cc32d4256f7ab61c5b788d7 DIFF: https://github.com/llvm/llvm-project/commit/9f80ecb308c989523cc32d4256f7ab61c5b788d7.diff L

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-01-29 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: @sam-mccall review ping :) I would particularly appreciate feedback on whether I should plan to set aside some time to implement the "deep lookup optimization" (from [this comment](https://reviews.llvm.org/D93829#4258101)), or whether the 2.5% increase in index memory us

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

2024-01-29 Thread Vassil Vassilev via cfe-commits
vgvassilev 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 sus

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

2024-01-29 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: As far as I can tell from https://github.com/llvm/llvm-project/pull/76774#issuecomment-1914177330 above, the last push only changed the default value of `LoadExternalSpecializationsLazily`. In that case, my test results from https://github.com/llvm/llvm-project/pull/76774#issuec

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

2024-01-29 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Ok, so it sounds it fails earlier than I expected. We might be missing something in the implementation of the on-disk hashtable. Have you had a chance to run valgrind? https://github.com/llvm/llvm-project/pull/76774 ___ cfe-commits

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

2024-01-29 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > As far as I can tell from [#76774 > (comment)](https://github.com/llvm/llvm-project/pull/76774#issuecomment-1914177330) > above, the last push only changed the default value of > `LoadExternalSpecializationsLazily`. In that case, my test results from > [#76774 > (comment)

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

2024-01-29 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/76090 >From 7c31c8bc2acf60bd50cb6d63944ee8d4946b9638 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 May 2023 21:33:24 +0100 Subject: [PATCH 1/4] [VPlan] Replace VPRecieOrVPValue with VP2VP recipe simplification

[clang] [llvm] [clang-tools-extra] [PowerPC] Check value uses in ValueBit tracking (PR #66040)

2024-01-29 Thread Kai Luo via cfe-commits
bzEq wrote: Though I do see some codegen improvement, I don't think we should check uses inside `getValueBits`, since `getValueBits` is for analysis and is gathering as much information as it can. Can you post your motivation code? https://github.com/llvm/llvm-project/pull/66040 __

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

2024-01-29 Thread Shourya Goel via cfe-commits
Sh0g0-1758 wrote: gentle ping @reviewers https://github.com/llvm/llvm-project/pull/78338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [libcxxabi] [libcxx] [clang-tools-extra] [libunwind] [compiler-rt] [lld] [libc] [clang] [flang] [lldb] [PowerPC] Combine sub within setcc back to sext (PR #66978)

2024-01-29 Thread Kai Luo via cfe-commits
bzEq wrote: Please provide more description in PR summary. https://github.com/llvm/llvm-project/pull/66978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libcxx] [clang] [llvm] [lld] [lldb] [libc] intrinsic to generate a bfi instruction (PR #79655)

2024-01-29 Thread David Spickett via cfe-commits
DavidSpickett wrote: If you're referring to the CI that runs here, we've been having capacity issues lately. Another way to "resubmit" is to rebase the PR. https://github.com/llvm/llvm-project/pull/79655 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-01-29 Thread via cfe-commits
cor3ntin wrote: @hokein @sam-mccall to repeat what was said in the language group last week. We do not think a feature flag is a good fit. - Until clang 19 ships (in 6 months) we do not need to stabilize the feature (but ofc we should avoid regressions, which we would not find if hidden behi

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

2024-01-29 Thread Florian Hahn via cfe-commits
@@ -9027,7 +8994,8 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( // the phi until LoopExitValue. We keep track of the previous item // (PreviousLink) to tell which of the two operands of a Link will remain // scalar and which will be reduced. For min

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

2024-01-29 Thread Florian Hahn via cfe-commits
@@ -9058,6 +9026,20 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( LinkVPBB->insert(FMulRecipe, CurrentLink->getIterator()); VecOp = FMulRecipe; } else { +auto *Blend = dyn_cast(CurrentLink); +if (PhiR->isInLoop() && Blend)

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

2024-01-29 Thread Florian Hahn via cfe-commits
@@ -827,6 +827,16 @@ 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)) { ---

[clang-tools-extra] [libunwind] [libcxx] [compiler-rt] [clang] [llvm] [lld] [libcxxabi] [lldb] [libc] [flang] [PowerPC] Combine sub within setcc back to sext (PR #66978)

2024-01-29 Thread Kai Luo via cfe-commits
@@ -14428,15 +14431,52 @@ SDValue PPCTargetLowering::combineSetCC(SDNode *N, // x != 0-y --> x+y != 0 if (RHS.getOpcode() == ISD::SUB && isNullConstant(RHS.getOperand(0)) && RHS.hasOneUse()) { - SDLoc DL(N); - SelectionDAG &DAG = DCI.DAG; - EVT VT

[libcxx] [lldb] [compiler-rt] [clang-tools-extra] [flang] [clang] [libcxxabi] [libc] [libunwind] [lld] [llvm] [PowerPC] Combine sub within setcc back to sext (PR #66978)

2024-01-29 Thread Kai Luo via cfe-commits
@@ -14428,15 +14431,52 @@ SDValue PPCTargetLowering::combineSetCC(SDNode *N, // x != 0-y --> x+y != 0 if (RHS.getOpcode() == ISD::SUB && isNullConstant(RHS.getOperand(0)) && RHS.hasOneUse()) { - SDLoc DL(N); - SelectionDAG &DAG = DCI.DAG; - EVT VT

[libunwind] [clang-tools-extra] [lld] [flang] [libc] [compiler-rt] [libcxx] [clang] [libcxxabi] [lldb] [llvm] [PowerPC] Combine sub within setcc back to sext (PR #66978)

2024-01-29 Thread Kai Luo via cfe-commits
@@ -14428,15 +14431,52 @@ SDValue PPCTargetLowering::combineSetCC(SDNode *N, // x != 0-y --> x+y != 0 if (RHS.getOpcode() == ISD::SUB && isNullConstant(RHS.getOperand(0)) && RHS.hasOneUse()) { - SDLoc DL(N); - SelectionDAG &DAG = DCI.DAG; - EVT VT

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

2024-01-29 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/76090 >From 7c31c8bc2acf60bd50cb6d63944ee8d4946b9638 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 May 2023 21:33:24 +0100 Subject: [PATCH 1/5] [VPlan] Replace VPRecieOrVPValue with VP2VP recipe simplification

[clang] [llvm] [AArch64][TargetParser] Add mcpu alias for Microsoft Azure Cobalt 100. (PR #79614)

2024-01-29 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett approved this pull request. ``` /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-r6v66-1/llvm-project/github-pull-requests/llvm/unittests/TargetParser/TargetParserTest.cpp:1662: Failure Expected equality of these values: List.size() Which is: 68 NumAArc

[clang-tools-extra] [llvm] [clang] [PowerPC] Check value uses in ValueBit tracking (PR #66040)

2024-01-29 Thread Qiu Chaofan via cfe-commits
ecnelises wrote: The motivating case: ```llvm define i64 @splatByte(i64 %a) { entry: %x0 = shl i64 %a, 8 %x1 = and i64 %a, 255 %x2 = or i64 %x0, %x1 %x3 = shl i64 %x2, 16 %x4 = and i64 %x2, 65535 %x5 = or i64 %x3, %x4 %x6 = shl i64 %x5, 32 %x7 = and i64 %x5, 4294967295 %x8 = or

[clang] [clang][Interp] Add inline descriptor to global variables (PR #72892)

2024-01-29 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/72892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[libcxx] [clang-tools-extra] [flang] [mlir] [clang] [llvm] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-01-29 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78304 >From 9846f970b6b394ccc3af25b92f238377a8ae7807 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 14 Jan 2024 18:06:36 + Subject: [PATCH] [LV] Improve AnyOf reduction codegen. Update AnyOf reduction code ge

[llvm] [clang] [coroutine] Implement llvm.coro.await.suspend intrinsic (PR #79712)

2024-01-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Thanks for looking into this. I haven't looked it in details. Given this is complex, it should take a relative longer time. Here is some quick feedbacks: - Every time we change the non-static data members of AST nodes, we need to update the serializatio

[clang] [Clang][Sema] Fix crash when type used in return statement contains errors (PR #79788)

2024-01-29 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: NIT: `eligable ` -> `eligible` in the description. https://github.com/llvm/llvm-project/pull/79788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Relax march string order constraint (PR #78120)

2024-01-29 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/78120 >From 8f7b429d2f7fe791a2a469e3d232d33abba1bef8 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Sun, 14 Jan 2024 19:41:59 -0800 Subject: [PATCH 1/9] [RISCV] Relax march string order constraint --- clang/test/Driver/

[clang] [llvm] [AArch64][SME] Implement inline-asm clobbers for za/zt0 (PR #79276)

2024-01-29 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/79276 >From e98987ebb48839ea652d63dfaa62ed841b426e46 Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Thu, 18 Jan 2024 15:41:25 + Subject: [PATCH 1/2] [AArch64][SME] Implement inline-asm clobbers for za/zt0 Th

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

2024-01-29 Thread via cfe-commits
zmodem wrote: We're hitting a "dyn_cast on a non-existent value" assert in Chromium after this change. I've attached a reproducer here: https://bugs.chromium.org/p/chromium/issues/detail?id=1522775#c2 Based on the stack, this doesn't look the same as the analyzer issue (#79575) but there are

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread via cfe-commits
zmodem wrote: I think a similar fix may be needed in `clang::IgnoreParensSingleStep`, see my comment here: https://github.com/llvm/llvm-project/pull/78041#issuecomment-1914407300 https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing

[clang-tools-extra] [clang] [clangd] Prevent printing huge initializer lists in hover definitions (PR #79746)

2024-01-29 Thread Raoul Wols via cfe-commits
@@ -1720,6 +1720,12 @@ void StmtPrinter::VisitInitListExpr(InitListExpr* Node) { OS << "{"; for (unsigned i = 0, e = Node->getNumInits(); i != e; ++i) { if (i) OS << ", "; +// TODO: There is duplicated functionality in APValue::printPretty. +// Would be good to

[clang] [Coverage] Map regions from system headers (PR #76950)

2024-01-29 Thread via cfe-commits
mhaehnel wrote: Your revert just masks the underlying issue. What you do now is that you *can* specify `-system-headers-coverage` but the compiler will not actually provide coverage data for system headers because the flag is ignored. So specifying the switch becomes meaningless. https://gi

[clang] [clang-format] Explicitly open DOC_FILE with utf-8 in dump_format_style.py (PR #79805)

2024-01-29 Thread via cfe-commits
https://github.com/rmarker created https://github.com/llvm/llvm-project/pull/79805 The dump_format_style.py script generates the clang-format style options documentation. There was an issue where the script could include spurious characters in the output when run in windows. It appears that it

[clang] [clang-format] Explicitly open DOC_FILE with utf-8 in dump_format_style.py (PR #79805)

2024-01-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (rmarker) Changes The dump_format_style.py script generates the clang-format style options documentation. There was an issue where the script could include spurious characters in the output when run in windows. It appears that it was

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

2024-01-29 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/9] [clang-format] Add ShortReturnTypeColumn option. --- clang/docs/C

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

2024-01-29 Thread via cfe-commits
@@ -474,7 +474,7 @@ class State: opts = sorted(opts, key=lambda x: x.name) options_text = "\n\n".join(map(str, opts)) -with open(DOC_FILE) as f: +with open(DOC_FILE, encoding="utf-8") as f: rmarker wrote: Moved change to its own PR. #79805 https://github.com

[clang] [clang-format] Explicitly open DOC_FILE with utf-8 in dump_format_style.py (PR #79805)

2024-01-29 Thread via cfe-commits
rmarker wrote: @HazardyKnusperkeks, @owenca, extracted this change from #78011. https://github.com/llvm/llvm-project/pull/79805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-29 Thread Yi Wu via cfe-commits
@@ -5934,6 +5938,40 @@ IntrinsicLibrary::genSum(mlir::Type resultType, resultType, args); } +// SYSTEM +void IntrinsicLibrary::genSystem(llvm::ArrayRef args) { + assert(args.size() == 2); + mlir::Value command = fir::getBase(args[0]); + const fir::Exte

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

2024-01-29 Thread Yi Wu via cfe-commits
@@ -5934,6 +5938,40 @@ IntrinsicLibrary::genSum(mlir::Type resultType, resultType, args); } +// SYSTEM +void IntrinsicLibrary::genSystem(llvm::ArrayRef args) { + assert(args.size() == 2); + mlir::Value command = fir::getBase(args[0]); + const fir::Exte

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

2024-01-29 Thread Yi Wu via cfe-commits
@@ -5934,6 +5938,40 @@ IntrinsicLibrary::genSum(mlir::Type resultType, resultType, args); } +// SYSTEM +void IntrinsicLibrary::genSystem(llvm::ArrayRef args) { + assert(args.size() == 2); + mlir::Value command = fir::getBase(args[0]); + const fir::Exte

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

2024-01-29 Thread Yi Wu via cfe-commits
@@ -1393,6 +1393,11 @@ static const IntrinsicInterface intrinsicSubroutine[]{ {"get", DefaultInt, Rank::vector, Optionality::optional, common::Intent::Out}}, {}, Rank::elemental, IntrinsicClass::impureSubroutine}, +{"system", +{{"

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread Balazs Benics via cfe-commits
@@ -40,8 +40,12 @@ static const Expr *ignoreTransparentExprs(const Expr *E) { switch (E->getStmtClass()) { case Stmt::OpaqueValueExprClass: -E = cast(E)->getSourceExpr(); -break; +if (const clang::Expr *SE = cast(E)->getSourceExpr()) { + E = SE; + bre

[clang] Fix analyzer crash on 'StructuralValue' (PR #79764)

2024-01-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Approved with nits. This works around the crash. https://github.com/llvm/llvm-project/pull/79764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[compiler-rt] [llvm] [flang] [clang] [clang-tools-extra] [AArch64][compiler-rt] Avoid use of libc header in sme-libc-routines (PR #79454)

2024-01-29 Thread Peter Waller via cfe-commits
https://github.com/peterwaller-arm updated https://github.com/llvm/llvm-project/pull/79454 >From 18fbfe3d757372fc904146a9156e8af466c9f013 Mon Sep 17 00:00:00 2001 From: Peter Waller Date: Thu, 25 Jan 2024 14:29:45 + Subject: [PATCH] [AArch64][compiler-rt] Avoid use of libc header in sme-li

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

2024-01-29 Thread Yi Wu via cfe-commits
@@ -5934,6 +5938,40 @@ IntrinsicLibrary::genSum(mlir::Type resultType, resultType, args); } +// SYSTEM +void IntrinsicLibrary::genSystem(llvm::ArrayRef args) { + assert(args.size() == 2); + mlir::Value command = fir::getBase(args[0]); + const fir::Exte

[libc] [lld] [llvm] [clang-tools-extra] [libcxx] [lldb] [clang] intrinsic to generate a bfi instruction (PR #79655)

2024-01-29 Thread Rama Malladi via cfe-commits
RamaMalladiAWS wrote: Thank you @DavidSpickett https://github.com/llvm/llvm-project/pull/79655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-29 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/19] Add SYSTEM runtime and lowering intrinsic support Calls std::syst

[compiler-rt] [llvm] [libc] [flang] [clang] [clang-tools-extra] [lldb] [libcxx] [mlir] [AArch64] add intrinsic to generate a bfi instruction (PR #79672)

2024-01-29 Thread Rama Malladi via cfe-commits
RamaMalladiAWS wrote: > OK. We would not usually add intrinsics like this without a strong motivating > case, that could not be optimized in some other way. It is better to use > target independent options when available, and inline assembly is available > as a fallback if it is really needed.

[compiler-rt] [llvm] [libc] [flang] [clang] [clang-tools-extra] Apply kind code check on exitstat and cmdstat (PR #78286)

2024-01-29 Thread Yi Wu via cfe-commits
yi-wu-arm wrote: build and pass all test on Windows on Arm MSVC native. https://github.com/llvm/llvm-project/pull/78286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-29 Thread Tom Eccles via cfe-commits
@@ -5934,6 +5938,40 @@ IntrinsicLibrary::genSum(mlir::Type resultType, resultType, args); } +// SYSTEM +void IntrinsicLibrary::genSystem(llvm::ArrayRef args) { + assert(args.size() == 2); + mlir::Value command = fir::getBase(args[0]); + const fir::Exte

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

2024-01-29 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > As far as I can tell from [#76774 > > (comment)](https://github.com/llvm/llvm-project/pull/76774#issuecomment-1914177330) > > above, the last push only changed the default value of > > `LoadExternalSpecializationsLazily`. In that case, my test results from > > [#76774 >

[clang] [llvm] [clang-tools-extra] [compiler-rt] [flang] [AArch64][compiler-rt] Avoid use of libc header in sme-libc-routines (PR #79454)

2024-01-29 Thread Peter Waller via cfe-commits
https://github.com/peterwaller-arm closed https://github.com/llvm/llvm-project/pull/79454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [Clang][AST] Fix a crash on attaching doc comments (PR #78716)

2024-01-29 Thread via cfe-commits
https://github.com/chenshanzhi updated https://github.com/llvm/llvm-project/pull/78716 >From dcdf4a5825a402ab1392f61354c604a9cf965bdd Mon Sep 17 00:00:00 2001 From: Shanzhi Chen Date: Thu, 18 Jan 2024 11:40:09 + Subject: [PATCH] [Clang][AST] Fix a crash on attaching doc comments This crash

[clang] [lldb] [libc] [llvm] [libcxx] [lld] [compiler-rt] [flang] [hwasan] Use ErrorAction::Recover in interceptors (PR #74000)

2024-01-29 Thread Tamar Christina via cfe-commits
TamarChristinaArm wrote: @vitalybuka I'm trying to backport the fixes to the GCC branches. Do I just need to backport these 4 commits? https://github.com/llvm/llvm-project/pull/74000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[libcxx] [llvm] [libc] [compiler-rt] [lldb] [clang-tools-extra] [mlir] [clang] [flang] [AArch64] add intrinsic to generate a bfi instruction (PR #79672)

2024-01-29 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @RamaMalladiAWS Do you have examples of the IR that fails to lower to BFI? These things often turn out to be either a missing middle-end canonicalization or maybe a case that could be added to existing pattern matching in the back-end. https://github.com/llvm/llvm-project/pull/

[clang-tools-extra] [flang] [llvm] [clang] [compiler-rt] [libc] Apply kind code check on exitstat and cmdstat (PR #78286)

2024-01-29 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm closed https://github.com/llvm/llvm-project/pull/78286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang, SystemZ] Split test into Driver and CodeGen parts (NFC) (PR #79808)

2024-01-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/79808 The test added in #73511 currently fails in CLANG_DEFAULT_PIE_ON_LINUX=OFF configuration, because it uses the clang driver in a codegen test. Split the test into two, a driver test that checks that the appropriate

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

2024-01-29 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > As far as I can tell from [#76774 > > > (comment)](https://github.com/llvm/llvm-project/pull/76774#issuecomment-1914177330) > > > above, the last push only changed the default value of > > > `LoadExternalSpecializationsLazily`. In that case, my test results from > > >

[clang] [Clang, SystemZ] Split test into Driver and CodeGen parts (NFC) (PR #79808)

2024-01-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikita Popov (nikic) Changes The test added in #73511 currently fails in CLANG_DEFAULT_PIE_ON_LINUX=OFF configuration, because it uses the clang driver in a codegen test. Split the test into two, a driver test that checks that the appropr

[clang] [Clang, SystemZ] Split test into Driver and CodeGen parts (NFC) (PR #79808)

2024-01-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Nikita Popov (nikic) Changes The test added in #73511 currently fails in CLANG_DEFAULT_PIE_ON_LINUX=OFF configuration, because it uses the clang driver in a codegen test. Split the test into two, a driver test that checks that the

[clang] 5f4ee5a - [Clang][AST] Fix a crash on attaching doc comments (#78716)

2024-01-29 Thread via cfe-commits
Author: Shanzhi Date: 2024-01-29T19:17:13+08:00 New Revision: 5f4ee5a2dfa97fe32ee62d1d67aa1413d5a059e6 URL: https://github.com/llvm/llvm-project/commit/5f4ee5a2dfa97fe32ee62d1d67aa1413d5a059e6 DIFF: https://github.com/llvm/llvm-project/commit/5f4ee5a2dfa97fe32ee62d1d67aa1413d5a059e6.diff LOG:

[llvm] [clang-tools-extra] [clang] [Clang][AST] Fix a crash on attaching doc comments (PR #78716)

2024-01-29 Thread via cfe-commits
https://github.com/vfdff closed https://github.com/llvm/llvm-project/pull/78716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [flang] [llvm] [clang] [compiler-rt] [AMDGPU] Fold operand after shrinking instruction in SIFoldOperands (PR #68426)

2024-01-29 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/68426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [AMDGPU] Update SITargetLowering::getAddrModeArguments (PR #78740)

2024-01-29 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/78740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-01-29 Thread Haojian Wu via cfe-commits
hokein wrote: Thanks for the summary. > We do not think a feature flag is a good fit. > > * Until clang 19 ships (in 6 months) we do not need to stabilize the feature > (but ofc we should avoid regressions, which we would not find if hidden > behind a flag), and the flag does not guarantee ex

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

2024-01-29 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 01/10] [clang-format] Add ShortReturnTypeColumn option. --- clang/docs

[clang] [clang] Use getDefaultArgRange instead of getDefaultArg to retrieve the (PR #79296)

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

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

2024-01-29 Thread via cfe-commits
@@ -922,8 +922,23 @@ struct FormatStyle { /// }; /// int f(); /// int f() { return 1; } +/// int f:: +/// bar(); /// \endcode RTBS_None, +/// Break after return t

[llvm] [flang] [clang-tools-extra] [mlir] [libcxx] [clang] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-01-29 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78304 >From 9846f970b6b394ccc3af25b92f238377a8ae7807 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 14 Jan 2024 18:06:36 + Subject: [PATCH 1/2] [LV] Improve AnyOf reduction codegen. Update AnyOf reduction cod

[lldb] [flang] [llvm] [compiler-rt] [clang-tools-extra] [mlir] [libcxx] [clang] [libc] [AArch64] add intrinsic to generate a bfi instruction (PR #79672)

2024-01-29 Thread Rama Malladi via cfe-commits
RamaMalladiAWS wrote: > @RamaMalladiAWS Do you have examples of the IR that fails to lower to BFI? > These things often turn out to be either a missing middle-end > canonicalization or maybe a case that could be added to existing pattern > matching in the back-end. Yes, @RKSimon, I will try t

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

2024-01-29 Thread via cfe-commits
@@ -922,8 +922,23 @@ struct FormatStyle { /// }; /// int f(); /// int f() { return 1; } +/// int f:: rmarker wrote: Ah, that is nice. The long names required to get the behaviour naturally

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

2024-01-29 Thread via cfe-commits
@@ -922,8 +922,23 @@ struct FormatStyle { /// }; /// int f(); /// int f() { return 1; } +/// int f:: +/// bar(); /// \endcode RTBS_None, +/// Break after return t

[clang] [clang] Improved isSimpleTypeSpecifier (PR #79037)

2024-01-29 Thread Carl Peto via cfe-commits
https://github.com/carlos4242 updated https://github.com/llvm/llvm-project/pull/79037 >From a78545315baf3d920f7101f44c6dba05238dbcf7 Mon Sep 17 00:00:00 2001 From: Carl Peto Date: Fri, 26 Jan 2024 14:20:48 + Subject: [PATCH] [clang] - Sema::isSimpleTypeSpecifier return true for _Bo

[clang] [llvm] [RISCV] Graduate Zicond to non-experimental (PR #79811)

2024-01-29 Thread Alex Bradbury via cfe-commits
https://github.com/asb created https://github.com/llvm/llvm-project/pull/79811 The Zicond extension was ratified in the last few months, with no changes that affect the LLVM implementation. Although there's surely more tuning that could be done about when to select Zicond or not, there are no k

[clang] [llvm] [RISCV] Graduate Zicond to non-experimental (PR #79811)

2024-01-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support @llvm/pr-subscribers-clang Author: Alex Bradbury (asb) Changes The Zicond extension was ratified in the last few months, with no changes that affect the LLVM implementation. Although there's surely more tuning that could be done about when

[clang] [llvm] [RISCV] Graduate Zicond to non-experimental (PR #79811)

2024-01-29 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 23b233c8adad5b81e185e50d04356fab64c2f870 cf5c3432f66b36db0b8283a967b24686433cdf63 --

[clang] [llvm] [RISCV] Graduate Zicond to non-experimental (PR #79811)

2024-01-29 Thread Alex Bradbury via cfe-commits
https://github.com/asb updated https://github.com/llvm/llvm-project/pull/79811 >From cf5c3432f66b36db0b8283a967b24686433cdf63 Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Sun, 28 Jan 2024 08:50:35 + Subject: [PATCH 1/2] [RISCV] Graduate Zicond to non-experimental The Zicond extension

  1   2   3   4   5   6   >