[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-11-27 Thread via cfe-commits
@@ -423,131 +434,143 @@ const std::array SVEEmitter::Reinterprets = // Type implementation //===--===// -std::string SVEType::builtin_str() const { - std::string S; - if (isVoid()) +std::string SVEType::bu

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-11-27 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/115487 >From 5e24d212f797b5fa1b6da1526c807046373d3c21 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 8 Nov 2024 16:13:17 +0200 Subject: [PATCH 1/6] [Clang] skip default argument instantiation for non-definin

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-11-27 Thread Reid Kleckner via cfe-commits
@@ -439,8 +439,16 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { dyn_cast(Node.getBase()->IgnoreParenImpCasts()); rnk wrote: There's a FIXME above about refactoring Sema::CheckArrayAccess to avoid duplication, and I'm trying to decide if that

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-11-27 Thread via cfe-commits
@@ -431,133 +434,130 @@ const std::array SVEEmitter::Reinterprets = // Type implementation //===--===// -std::string SVEType::builtin_str() const { - std::string OutStr; - - if (isScalarPredicate()) -r

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-11-27 Thread via cfe-commits
https://github.com/mxms0 edited https://github.com/llvm/llvm-project/pull/117370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Michael Maitland via cfe-commits
@@ -0,0 +1,371 @@ +//===- RISCVLoadStoreOptimizer.cpp ===// +// +// 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] [clang-tools-extra] [clang-tidy][use-internal-linkage]fix false positives for ExportDecl (PR #117901)

2024-11-27 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/117901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-27 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Hey Richard - We added idempotency to define_aggregate in response to concern > from Clang maintainers that it could interact poorly with clang-repl. The > argument was that idempotency would provide a better experience for a user > that wanted to re-evaluate an expressio

[clang] [llvm] [IR] Allow fast math flags on fptrunc and fpext (PR #115894)

2024-11-27 Thread John Brawn via cfe-commits
@@ -1875,13 +1873,17 @@ Instruction *InstCombinerImpl::visitFPTrunc(FPTruncInst &FPT) { // fptrunc (select Cond, (fpext X), Y --> select Cond, X, (fptrunc Y) Value *NarrowY = Builder.CreateFPTrunc(Y, Ty); Value *Sel = Builder.CreateSelect(Cond, X, NarrowY, "n

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-11-27 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/117370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-11-27 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: I think there's a policy question here of how much trust we want to put into the type system. Clearly, we've already put some trust into it to reduce false positives, but we could decide to trust any old constant array type bounds, and that would be a good cod

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Craig Topper via cfe-commits
@@ -298,6 +298,15 @@ class RISCVInstrInfo : public RISCVGenInstrInfo { unsigned getTailDuplicateSize(CodeGenOptLevel OptLevel) const override; + /// Return true if pairing the given load or store may be paired with another. + static bool isPairableLdStInstOpc(unsigned Op

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-11-27 Thread Reid Kleckner via cfe-commits
@@ -463,6 +471,13 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { return true; rnk wrote: I think getting the integer constant expr is more general, we can remove the IntegerLiteral test here, and if all tests pass, I would consider it functio

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-27 Thread Aaron Ballman via cfe-commits
@@ -163,6 +163,8 @@ FEATURE(c_atomic, LangOpts.C11) FEATURE(c_generic_selections, LangOpts.C11) FEATURE(c_static_assert, LangOpts.C11) FEATURE(c_thread_local, LangOpts.C11 &&PP.getTargetInfo().isTLSSupported()) +// C23 features +FEATURE(c_fixed_enum, true) Aar

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-27 Thread Aaron Ballman via cfe-commits
@@ -121,6 +121,16 @@ int NegativeShortTest[NegativeShort == -1 ? 1 : -1]; enum Color { Red, Green, Blue }; // expected-note{{previous use is here}} typedef struct Color NewColor; // expected-error {{use of 'Color' with tag type that does not match previous declaration}} +// E

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-27 Thread Aaron Ballman via cfe-commits
@@ -1998,6 +1998,9 @@ value, is ``unsigned char``. Use ``__has_feature(objc_fixed_enum)`` to determine whether support for fixed underlying types is available in Objective-C. +Use ``__has_extension(c_fixed_enum)`` to determine whether support for fixed +underlying types is ava

[clang-tools-extra] [clangd] Consolidate two functions converting index to LSP locations (PR #117885)

2024-11-27 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler created https://github.com/llvm/llvm-project/pull/117885 None >From 7aa28a386a84c4fa8e7e8aa13822fd3e058b076c Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 27 Nov 2024 14:55:18 +0100 Subject: [PATCH] [clangd] Consolidate two functions converting index

[clang-tools-extra] [clangd] Consolidate two functions converting index to LSP locations (PR #117885)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Christian Kandeler (ckandeler) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/117885.diff 1 Files Affected: - (modified) clang-tools-extra/clangd/XRefs.cpp (+4-18) ``diff diff --git a/clang-tools-extra/cla

[clang-tools-extra] [clangd] Consolidate two functions converting index to LSP locations (PR #117885)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Christian Kandeler (ckandeler) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/117885.diff 1 Files Affected: - (modified) clang-tools-extra/clangd/XRefs.cpp (+4-18) ``diff diff --git a/clang-tool

[clang] [Clang] replace 'bitfield' with 'bit-field' for consistency (PR #117881)

2024-11-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM assuming precommit CI comes back green. No need for a release note as this is just fixing a typo, really. https://github.com/llvm/llvm-project/pull/117881 ___ cfe-commits mailing list cf

[clang-tools-extra] 5eeb3fe - Rename CODE_OWNERS -> Maintainers (#114544)

2024-11-27 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-11-27T09:24:41-05:00 New Revision: 5eeb3fef61bf5542c3fdcb71622fc4e826527789 URL: https://github.com/llvm/llvm-project/commit/5eeb3fef61bf5542c3fdcb71622fc4e826527789 DIFF: https://github.com/llvm/llvm-project/commit/5eeb3fef61bf5542c3fdcb71622fc4e826527789.diff

[clang] [clang][dataflow] Add captured parameters to ReferencedDecls for lamb… (PR #117771)

2024-11-27 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/117771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Rename CODE_OWNERS -> Maintainers (PR #114544)

2024-11-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/114544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
@@ -24,21 +26,30 @@ using namespace clang; using namespace ento; -namespace { - // enum value that represent the jail state -enum Kind { NO_CHROOT, ROOT_CHANGED, JAIL_ENTERED }; +enum ChrootKind { NO_CHROOT, ROOT_CHANGED, ROOT_CHANGE_FAILED, JAIL_ENTERED }; -bool isRootChan

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
@@ -104,15 +146,35 @@ void ChrootChecker::evalChdir(const CallEvent &Call, CheckerContext &C) const { R = R->StripCasts(); if (const StringRegion* StrRegion= dyn_cast(R)) { const StringLiteral* Str = StrRegion->getStringLiteral(); - if (Str->getString() == "

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-11-27 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: > Well, we're currently approaching this from the angle of "expose everything > and then the user can do whatever they want", but perhaps the discussion we > should be having is "what use cases do we explicitly want to support?" and > then we write plugins to demonstrate that w

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/117791 >From ed174c8b52880d4f89415eb3a72da13f355438d7 Mon Sep 17 00:00:00 2001 From: einvbri Date: Mon, 25 Nov 2024 10:31:57 +0100 Subject: [PATCH 1/3] [analyzer] Modernize, improve and promote chroot checker This

[clang] [Clang] replace 'bitfield' with 'bit-field' for consistency (PR #117881)

2024-11-27 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk closed https://github.com/llvm/llvm-project/pull/117881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-27 Thread Alexandros Lamprineas via cfe-commits
@@ -2938,36 +2914,17 @@ void CodeGenFunction::EmitRISCVMultiVersionResolver( bool HasDefault = false; unsigned DefaultIndex = 0; - SmallVector CurrOptions( - Options); - - llvm::stable_sort( - CurrOptions, [](const CodeGenFunction::MultiVersionResolverOption &L

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-27 Thread Alexandros Lamprineas via cfe-commits
@@ -4303,21 +4288,15 @@ void CodeGenModule::emitMultiVersionFunctions() { continue; llvm::Function *Func = createFunction(CurFD, I); - StringRef Architecture; Feats.clear(); - if (getTarget().getTriple().is

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-11-27 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -std=c++2c -fsyntax-only -verify %s + +void a(...); + +void b(auto...); +void c(auto, ...); + +void d(auto..); // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}} \ +//

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/117791 >From ed174c8b52880d4f89415eb3a72da13f355438d7 Mon Sep 17 00:00:00 2001 From: einvbri Date: Mon, 25 Nov 2024 10:31:57 +0100 Subject: [PATCH 1/2] [analyzer] Modernize, improve and promote chroot checker This

[clang] [clang-repl]: Print stack-trace on crash (PR #117896)

2024-11-27 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis edited https://github.com/llvm/llvm-project/pull/117896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Cleanup BranchNodeBuilder (PR #117898)

2024-11-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/117898 Previously `BranchNodeBuilder` had a machinery to mark the two possible branches (true, false) as infeasible, but this was completely useless in practice, because the `BranchNodeBuilder` objects where short-l

[clang] [clang-repl]: Print stack-trace on crash (PR #117896)

2024-11-27 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! Do you have commit access or shall I land this change for you? https://github.com/llvm/llvm-project/pull/117896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [compiler-rt] [llvm] [XRay][RISCV] RISCV support for XRay (PR #117368)

2024-11-27 Thread Jessica Clarke via cfe-commits
@@ -57,6 +57,10 @@ static const int16_t cSledLength = 64; static const int16_t cSledLength = 8; #elif defined(__hexagon__) static const int16_t cSledLength = 20; +#elif SANITIZER_RISCV64 +static const int16_t cSledLength = 76; +#elif defined(__riscv) && (__riscv_xlen == 32) ---

[clang] [clang] Format bitfield width diagnostics with thousands-separators (PR #117763)

2024-11-27 Thread via cfe-commits
Sirraide wrote: > Should we come up with a new format specifier for the diagnostics engine so > that the author of the diagnostic can opt in to the additional formatting? My > concern with doing this in general is that some numbers really don't > need/want the separators so it seems like an op

[clang] [Clang] [NFC] Refactor more AST visitors (PR #116823)

2024-11-27 Thread via cfe-commits
@@ -266,7 +265,7 @@ class RenameLocFinder : public RecursiveASTVisitor { return true; } - bool VisitDeclRefExpr(const DeclRefExpr *Expr) { Sirraide wrote: So `RecursiveASTVisitor` passes everything around by non-`const` pointer, and `DynamicRecursive

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Min-Yih Hsu via cfe-commits
@@ -0,0 +1,279 @@ +//===-- RISCVSchedMIPSP8700.td - MIPS RISC-V Processor -*- tablegen -*-===// +// +// 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] Clang tooling generated visibility macros for Clang (PR #109702)

2024-11-27 Thread Reid Kleckner via cfe-commits
rnk wrote: I think it makes sense to focus on Saleem's use case, which, perhaps to translate it into Posix-ecosystem terms, is to create a single Clang DSO (similar to llvm-dylib or whatever we call it) that all the affiliated monorepo Clang tools use (clang-tidy, clang-rename, clang-format, c

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Min-Yih Hsu via cfe-commits
@@ -22,6 +22,7 @@ def WriteIMul32 : SchedWrite;// 32-bit multiply on RV64I def WriteJmp: SchedWrite;// Jump def WriteJal: SchedWrite;// Jump and link def WriteJalr : SchedWrite;// Jump and link register +def WriteJmpReg : SchedWrit

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-27 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > No, I think the standard should specify the exact semantics of its > metaprogramming primitives. And for metaprogramming actions that generate > code in particular, I think they should behave the same as the source code > they are intended to be equivalent to -- and thus

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64-aix` running on `aix-ppc64` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/1558 Here is the relevant piece

[clang] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)

2024-11-27 Thread via cfe-commits
StefanPaulet wrote: Thanks. Will give it a shot, though it really seems to be an issue above my level https://github.com/llvm/llvm-project/pull/117167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [Clang] skip consumed analysis for consteval conditions in control-flow terminators (PR #117403)

2024-11-27 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk closed https://github.com/llvm/llvm-project/pull/117403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 32ff209 - [Clang] skip consumed analysis for consteval conditions in control-flow terminators (#117403)

2024-11-27 Thread via cfe-commits
Author: Oleksandr T. Date: 2024-11-27T18:10:17+02:00 New Revision: 32ff209b87a84890a1487b4e0bbb4a7645d31645 URL: https://github.com/llvm/llvm-project/commit/32ff209b87a84890a1487b4e0bbb4a7645d31645 DIFF: https://github.com/llvm/llvm-project/commit/32ff209b87a84890a1487b4e0bbb4a7645d31645.diff

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Michael Maitland via cfe-commits
@@ -1447,6 +1447,23 @@ def TuneConditionalCompressedMoveFusion def HasConditionalMoveFusion : Predicate<"Subtarget->hasConditionalMoveFusion()">; def NoConditionalMoveFusion : Predicate<"!Subtarget->hasConditionalMoveFusion()">; +def TuneMIPSP8700 +: SubtargetFeature<"m

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Michael Maitland via cfe-commits
@@ -62,6 +62,20 @@ static cl::opt RISCVMinimumJumpTableEntries( "riscv-min-jump-table-entries", cl::Hidden, cl::desc("Set minimum number of entries to use a jump table on RISCV")); +static cl::opt michaelmaitland wrote: Is this a duplicate of `EnableM

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Michael Maitland via cfe-commits
@@ -0,0 +1,371 @@ +//===- RISCVLoadStoreOptimizer.cpp ===// +// +// 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] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Craig Topper via cfe-commits
@@ -2710,6 +2713,45 @@ MachineInstr *RISCVInstrInfo::emitLdStWithAddr(MachineInstr &MemI, .setMemRefs(MemI.memoperands()) .setMIFlags(MemI.getFlags()); } +bool RISCVInstrInfo::isPairableLdStInstOpc(unsigned Opc) { + switch (Opc) { + default: +return false; +

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Craig Topper via cfe-commits
@@ -426,6 +426,12 @@ The current vendor extensions supported are: ``Xwchc`` LLVM implements `the custom compressed opcodes present in some QingKe cores` by WCH / Nanjing Qinheng Microelectronics. The vendor refers to these opcodes by the name "XW". +``xmipscmove``

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Michael Maitland via cfe-commits
@@ -1447,6 +1447,23 @@ def TuneConditionalCompressedMoveFusion def HasConditionalMoveFusion : Predicate<"Subtarget->hasConditionalMoveFusion()">; def NoConditionalMoveFusion : Predicate<"!Subtarget->hasConditionalMoveFusion()">; +def TuneMIPSP8700 +: SubtargetFeature<"m

[clang] bbbaeb5 - [OpenACC] Enable 'attach' clause for combined constructs

2024-11-27 Thread via cfe-commits
Author: erichkeane Date: 2024-11-27T09:55:19-08:00 New Revision: bbbaeb5584b5f1ab38cc86a9e8ed64ec1dc926b6 URL: https://github.com/llvm/llvm-project/commit/bbbaeb5584b5f1ab38cc86a9e8ed64ec1dc926b6 DIFF: https://github.com/llvm/llvm-project/commit/bbbaeb5584b5f1ab38cc86a9e8ed64ec1dc926b6.diff LO

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Craig Topper via cfe-commits
@@ -427,7 +427,7 @@ def UNZIP_RV32 : Unary_r<0b1000, 0b101, "unzip">, // Pseudo Instructions //===--===// -let Predicates = [HasStdExtZba, IsRV64] in { +let Predicates = [HasStdExtZba, IsRV64], EmitPr

[clang] 35a5c71 - [OpenACC] Add tests forgotten in 969b7658fe

2024-11-27 Thread via cfe-commits
Author: erichkeane Date: 2024-11-27T09:55:19-08:00 New Revision: 35a5c7129a32f7eedf2d1913447c53cee96eab13 URL: https://github.com/llvm/llvm-project/commit/35a5c7129a32f7eedf2d1913447c53cee96eab13 DIFF: https://github.com/llvm/llvm-project/commit/35a5c7129a32f7eedf2d1913447c53cee96eab13.diff LO

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Craig Topper via cfe-commits
@@ -2017,6 +2169,74 @@ def : Pat<(binop_allwusers GPR:$rs1, (AddiPair:$rs2)), } //===--===// + +// MIPS extensions +//===--===// + +let Pre

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Craig Topper via cfe-commits
@@ -2017,6 +2169,74 @@ def : Pat<(binop_allwusers GPR:$rs1, (AddiPair:$rs2)), } //===--===// + topperc wrote: please add these to a new MIPS specific file like other vendor extensions. htt

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Michael Maitland via cfe-commits
@@ -367,6 +372,16 @@ class RISCVPassConfig : public TargetPassConfig { DAG->addMutation(createStoreClusterDAGMutation( DAG->TII, DAG->TRI, /*ReorderWhileClustering=*/true)); } + +const RISCVSubtarget &ST = C->MF->getSubtarget(); +if (!ST.getMacroFusi

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Craig Topper via cfe-commits
@@ -514,6 +514,78 @@ class RVInstJhttps://github.com/llvm/llvm-project/pull/117865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Craig Topper via cfe-commits
@@ -0,0 +1,371 @@ +//===- RISCVLoadStoreOptimizer.cpp ===// +// +// 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] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Craig Topper via cfe-commits
@@ -2017,6 +2169,74 @@ def : Pat<(binop_allwusers GPR:$rs1, (AddiPair:$rs2)), } //===--===// + +// MIPS extensions +//===--===// + +let Pre

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-11-27 Thread via cfe-commits
https://github.com/mxms0 edited https://github.com/llvm/llvm-project/pull/117370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy][use-internal-linkage]fix false positives for ExportDecl (PR #117901)

2024-11-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/117901 >From d1d0722e833a9b66206c008a4cd3f6c5b4548b5c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 27 Nov 2024 23:08:55 +0800 Subject: [PATCH 1/3] [ast-matcher] add `exportDecl` matcher --- clang/docs/R

[clang] [Clang] Fix name lookup for dependent bases (PR #114978)

2024-11-27 Thread Vladislav Belov via cfe-commits
vbe-sc wrote: ```c++ void CXXMethodDecl::addOverriddenMethod(const CXXMethodDecl *MD) { assert(MD->isCanonicalDecl() && "Method is not canonical!"); assert(!MD->getParent()->isDependentContext() && "Can't add an overridden method to a class template!"); ``` It seems to me that the s

[clang] [HLSL] Add ByteAddressBuffer definition to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/116699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add ByteAddressBuffer definition to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-27 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-DXIL +// RUN-DISABLED: %clang_cc1 -triple spirv-vulkan-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s

[clang] [HLSL] Add ByteAddressBuffer definition to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-27 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump -DEMPTY \ hekota wrote: Since the test now covers multiple buffers please rename it to ByteAddressBuffer**s**-AST.hlsl and update the PR title and description. https:

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > I'm a little bit worried about the behavior of the C++ Core Guideline check > in clang-tidy though as it's now wholly redundant I think the checker can be removed if clang has this kind of compilation time warning and can totally cover the checker. > IMO, this is useful as

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-11-27 Thread Scott Constable via cfe-commits
scottconstable wrote: > This is not a Rust concern, but re-reading the initial post, it _looks_ like > your own statistics suggest that consuming 3 bits for arity costs more than > it buys you. As stated, (didn't check your math, just going off what you > said) prior to your change, we expect

[clang] [ast-matcher][NFC] make dump_ast_matchers.py run in any path (PR #117942)

2024-11-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/117942 None >From 65d7cd18a67fba41fe8cfe191217765830829bc9 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 28 Nov 2024 07:42:37 +0800 Subject: [PATCH] [ast-matcher][NFC] make dump_ast_matchers.py run in any

[clang] [ast-matcher][NFC] make dump_ast_matchers.py run in any path (PR #117942)

2024-11-27 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 32ff209b87a84890a1487b4e0bbb4a7645d31645...65d7cd18a67fba41fe8cfe191217765830829bc9 clang

[clang] [ast-matcher][NFC] make dump_ast_matchers.py run in any path (PR #117942)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Congcong Cai (HerrCai0907) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/117942.diff 1 Files Affected: - (modified) clang/docs/tools/dump_ast_matchers.py (+5-2) ``diff diff --git a/clang/docs/tools/dump_as

[clang] [clang][www] Remove ClangDataFormat.py from docs (PR #117943)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Maksim Ivanov (emaxx-google) Changes The script was removed in https://github.com/llvm/llvm-project/pull/96385. Instead, mention the LLVM formatter as it's still very useful for Clang's code. --- Full diff: https://github.com/llvm/llvm-pr

[clang] [HLSL] Add ByteAddressBuffer, RWByteAddressBuffer and RasterizerOrderedByteAddressBuffer definitions to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-27 Thread via cfe-commits
https://github.com/joaosaffran edited https://github.com/llvm/llvm-project/pull/116699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add ByteAddressBuffer, RWByteAddressBuffer and RasterizerOrderedByteAddressBuffer definitions to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-27 Thread via cfe-commits
https://github.com/joaosaffran edited https://github.com/llvm/llvm-project/pull/116699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add ByteAddressBuffer, RWByteAddressBuffer and RasterizerOrderedByteAddressBuffer definitions to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-27 Thread via cfe-commits
https://github.com/joaosaffran edited https://github.com/llvm/llvm-project/pull/116699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add ByteAddressBuffer definition to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-27 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/116699 >From 7210fcc7de181be6cad451ce1e885498c90c55fe Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Sat, 9 Nov 2024 01:34:16 + Subject: [PATCH 01/16] adding definition --- clang/lib/Sema/HLSLExternalSemaS

[clang] [clang][www] Remove ClangDataFormat.py from docs (PR #117943)

2024-11-27 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google created https://github.com/llvm/llvm-project/pull/117943 The script was removed in https://github.com/llvm/llvm-project/pull/96385. Instead, mention the LLVM formatter as it's still very useful for Clang's code. >From 438047cf5d8eb582a9a2e989aa6137d8dbe57d9d Mon

[clang] [clang][www] Remove ClangDataFormat.py from docs (PR #117943)

2024-11-27 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

[clang] [Clang][AST] Fix MS Mangle concept uneval context template instantiation crash (PR #117845)

2024-11-27 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -std=c++20 -fms-compatibility -fms-compatibility-version=19.33 -emit-llvm %s -o - -triple=x86_64-windows-msvc | FileCheck %s + +template +concept C = requires +{ +{ T::test([](){}) }; +}; + +template +struct Widget {}; + +template +stru

[clang] [HLSL] Add ByteAddressBuffer, RWByteAddressBuffer and RasterizerOrderedByteAddressBuffer definitions to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-27 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/116699 >From 7210fcc7de181be6cad451ce1e885498c90c55fe Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Sat, 9 Nov 2024 01:34:16 + Subject: [PATCH 01/17] adding definition --- clang/lib/Sema/HLSLExternalSemaS

[clang] [clang-tools-extra] [clang-tidy][use-internal-linkage]fix false positives for global overloaded operator new and operator delete (PR #117945)

2024-11-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/117945 None >From 5654b7c96bf5f2e9ef739279f559b1d800afc5ec Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 28 Nov 2024 08:15:34 +0800 Subject: [PATCH] [clang-tidy][use-internal-linkage]fix false positives f

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Brad Smith via cfe-commits
@@ -3137,6 +3205,45 @@ bool Generic_GCC::IsIntegratedAssemblerDefault() const { case llvm::Triple::nvptx64: case llvm::Triple::xcore: return false; + case llvm::Triple::aarch64: + case llvm::Triple::aarch64_be: + case llvm::Triple::amdgcn: + case llvm::Triple::arm:

[clang] [Driver] Support fprofile-sample-use= for CL (PR #117282)

2024-11-27 Thread Haohai Wen via cfe-commits
https://github.com/HaohaiWen closed https://github.com/llvm/llvm-project/pull/117282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c8cd497 - [Driver] Support fprofile-sample-use= for CL (#117282)

2024-11-27 Thread via cfe-commits
Author: Haohai Wen Date: 2024-11-28T09:33:24+08:00 New Revision: c8cd497c9889b051671c7fe2eb6e4b3bbe6606f9 URL: https://github.com/llvm/llvm-project/commit/c8cd497c9889b051671c7fe2eb6e4b3bbe6606f9 DIFF: https://github.com/llvm/llvm-project/commit/c8cd497c9889b051671c7fe2eb6e4b3bbe6606f9.diff LO

[clang] 63c5a42 - [Clang] Fix constexpr-ness on implicitly deleted destructors (#116359)

2024-11-27 Thread via cfe-commits
Author: A. Jiang Date: 2024-11-28T09:19:02+08:00 New Revision: 63c5a422f07da9925a4700f54016ab8623567718 URL: https://github.com/llvm/llvm-project/commit/63c5a422f07da9925a4700f54016ab8623567718 DIFF: https://github.com/llvm/llvm-project/commit/63c5a422f07da9925a4700f54016ab8623567718.diff LOG:

[clang] [Clang][AST] Fix PackIndexingExpr AST printout (PR #117947)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (AlexErofeev) Changes Fixes #116486 Also added regression unit test --- Full diff: https://github.com/llvm/llvm-project/pull/117947.diff 2 Files Affected: - (modified) clang/lib/AST/StmtPrinter.cpp (+4-1) - (added) clang/test/AST

[clang] [llvm] [llvm][opt][Transforms][SPIR-V] Enable `InferAddressSpaces` for SPIR-V (PR #110897)

2024-11-27 Thread Alex Voicu via cfe-commits
@@ -91,6 +97,100 @@ SPIRVTargetMachine::SPIRVTargetMachine(const Target &T, const Triple &TT, setRequiresStructuredCFG(false); } +enum AddressSpace { + Function = storageClassToAddressSpace(SPIRV::StorageClass::Function), + CrossWorkgroup = + storageClassToAddressSpa

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-11-27 Thread via cfe-commits
https://github.com/charan-003 commented: [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 https://github.com/llvm/llvm-project/pull/117953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-11-27 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 1/4] Update SemaLam

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-11-27 Thread via cfe-commits
https://github.com/charan-003 commented: [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 https://github.com/llvm/llvm-project/pull/117953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-11-27 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 1/5] Update SemaLam

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-11-27 Thread via cfe-commits
https://github.com/charan-003 commented: mprove Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 https://github.com/llvm/llvm-project/pull/117953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-11-27 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 1/6] Update SemaLam

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-11-27 Thread via cfe-commits
https://github.com/charan-003 commented: [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 https://github.com/llvm/llvm-project/pull/117953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-27 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/116257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV] Support `norelax` attribute for RISCV (PR #115981)

2024-11-27 Thread Piyou Chen via cfe-commits
BeMg wrote: Seem we don't support this attribute. https://github.com/llvm/llvm-project/pull/115981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV] Support `norelax` attribute for RISCV (PR #115981)

2024-11-27 Thread Piyou Chen via cfe-commits
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/115981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-27 Thread Piyou Chen via cfe-commits
https://github.com/BeMg approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/116257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ast-matcher][NFC] make dump_ast_matchers.py run in any path (PR #117942)

2024-11-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/117942 >From 4f6e87664c01ff6277824a0c45089795a1ad30b6 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 28 Nov 2024 07:42:37 +0800 Subject: [PATCH] [ast-matcher][NFC] make dump_ast_matchers.py run in any path

<    1   2   3   4   5   >