[clang] [llvm] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-02 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: * Rebased. * Extended coverage to include all typical scalar types. * Updated the LangRef to document the new constraints. * Added an entry to the release note. https://github.com/llvm/llvm-project/pull/70970 ___ cfe-commits

[clang] [llvm] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-02 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/70970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paul Walker (paulwalker-arm) Changes [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. The patch adds the follow ASM constraints: Uci = w8-w11 Ucj = w12-w15 These constraints are required for SME load/store

[llvm] [clang] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-llvm-ir Author: Paul Walker (paulwalker-arm) Changes [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. The patch adds the follow ASM constraints: Uci = w8-w11 Ucj = w12-w15 These

[clang] [llvm] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-02 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/70970 >From 500e5007a33d4ee3d594ef5ce58f8894c231f3dc Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 1 Nov 2023 16:27:29 + Subject: [PATCH 1/2] [NFC][LLVM][SVE] Refactor predicate register ASM

[libc] [clang] [lld] [clang-tools-extra] [flang] [libcxx] [llvm] [lldb] [compiler-rt] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
@@ -49,7 +49,7 @@ struct ExprDependenceScope { using ExprDependence = ExprDependenceScope::ExprDependence; struct TypeDependenceScope { - enum TypeDependence : uint8_t { + enum TypeDependence : unsigned { Endilll wrote: I reverted changes to underlying

[clang] [analyzer] Improve diagnostics from ArrayBoundCheckerV2 (PR #70056)

2023-11-02 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -22,23 +22,25 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/DynamicExtent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h" #include "llvm/ADT/SmallString.h" +#include

[libc] [clang] [lld] [clang-tools-extra] [flang] [libcxx] [llvm] [lldb] [compiler-rt] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/70349 >From 7329f68092d5f8f5a5978e5a6cbad6ada87d4fe8 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 26 Oct 2023 16:09:25 +0300 Subject: [PATCH 1/6] [clang][NFC] Annotate `Type` bit-fields with

[clang] [analyzer] Improve diagnostics from ArrayBoundCheckerV2 (PR #70056)

2023-11-02 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -174,9 +176,116 @@ compareValueToThreshold(ProgramStateRef State, NonLoc Value, NonLoc Threshold, return {nullptr, nullptr}; } -void ArrayBoundCheckerV2::checkLocation(SVal location, bool

[clang] [clang-tools-extra] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/71049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
@@ -560,7 +562,7 @@ bool CXIndexDataConsumer::handleDecl(const NamedDecl *D, if (shouldSuppressRefs()) markEntityOccurrenceInFile(D, Loc); - + Endilll wrote: I guess that's clang-format at work. I'll revert this.

[clang-tools-extra] [clang] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
@@ -1921,7 +1920,20 @@ bool NamedDecl::declarationReplaces(NamedDecl *OldD, bool IsKnownNewer) const { } bool NamedDecl::hasLinkage() const { - return getFormalLinkage() != NoLinkage; + switch (getFormalLinkage()) { + case Linkage::Invalid: +llvm_unreachable("Linkage

[clang] Revert "Revert "[APINotes] Upstream APINotesOptions"" (PR #70975)

2023-11-02 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan closed https://github.com/llvm/llvm-project/pull/70975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f1c9a1c - Revert "Revert "[APINotes] Upstream APINotesOptions""

2023-11-02 Thread via cfe-commits
Author: Egor Zhdan Date: 2023-11-02T12:39:55Z New Revision: f1c9a1c3a590970ba88e28a58d0f3622e8c2c415 URL: https://github.com/llvm/llvm-project/commit/f1c9a1c3a590970ba88e28a58d0f3622e8c2c415 DIFF: https://github.com/llvm/llvm-project/commit/f1c9a1c3a590970ba88e28a58d0f3622e8c2c415.diff LOG:

[clang] [clang][Interp] Handle std::move etc. builtins (PR #70772)

2023-11-02 Thread Henrik G. Olsson via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: hnrklssn wrote: Nice. I realise you're following the convention already established in the test file, but have you considered compiling with `-verify=new,both` and `-verify=ref,both`, respectively, and combining the shared diagnostics into

[clang-tools-extra] [clang] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -560,7 +562,7 @@ bool CXIndexDataConsumer::handleDecl(const NamedDecl *D, if (shouldSuppressRefs()) markEntityOccurrenceInFile(D, Loc); - + AaronBallman wrote: Every other change in this file is unrelated to the linkage enum and should be backed

[clang] [clang-tools-extra] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -2214,7 +2214,7 @@ void ASTWriter::WriteDeclAbbrevs() { Abv->Add(BitCodeAbbrevOp(0)); // TSCSpec Abv->Add(BitCodeAbbrevOp(0)); // InitStyle Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong -

[clang] [clang-tools-extra] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -1921,7 +1920,20 @@ bool NamedDecl::declarationReplaces(NamedDecl *OldD, bool IsKnownNewer) const { } bool NamedDecl::hasLinkage() const { - return getFormalLinkage() != NoLinkage; + switch (getFormalLinkage()) { + case Linkage::Invalid: +llvm_unreachable("Linkage

[clang] [clang-tools-extra] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -84,22 +88,33 @@ inline bool isUniqueGVALinkage(GVALinkage L) { } inline bool isExternallyVisible(Linkage L) { - return L >= VisibleNoLinkage; + switch (L) { + case Linkage::Invalid: +llvm_unreachable("Linkage hasn't been computed!"); AaronBallman

[clang] [llvm] [clang-tools-extra] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/70349 >From 7329f68092d5f8f5a5978e5a6cbad6ada87d4fe8 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 26 Oct 2023 16:09:25 +0300 Subject: [PATCH 1/6] [clang][NFC] Annotate `Type` bit-fields with

[clang] [clang][analyzer] scan-build: Ensure path prefixes exist (PR #71053)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (amcn) Changes scan-build's `UpdatePrefix` calculates the shared prefix of a set of files. Its use of strings and regular expressions to do so means that it can sometimes end up calculating a prefix which does not

[clang] [clang][analyzer] scan-build: Ensure path prefixes exist (PR #71053)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (amcn) Changes scan-build's `UpdatePrefix` calculates the shared prefix of a set of files. Its use of strings and regular expressions to do so means that it can sometimes end up calculating a prefix which does not correspond to a

[clang] [clang][analyzer] scan-build: Ensure path prefixes exist (PR #71053)

2023-11-02 Thread via cfe-commits
https://github.com/amcn created https://github.com/llvm/llvm-project/pull/71053 scan-build's `UpdatePrefix` calculates the shared prefix of a set of files. Its use of strings and regular expressions to do so means that it can sometimes end up calculating a prefix which does not correspond to a

[clang] [clang] Remove diagnostic that came with `[[clang::preferred_type]]` (PR #70632)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/70632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 98da183 - [clang] Remove diagnostic that came with `[[clang::preferred_type]]` (#70632)

2023-11-02 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-02T16:17:17+04:00 New Revision: 98da18344eed96cabfd2214131185686b1983412 URL: https://github.com/llvm/llvm-project/commit/98da18344eed96cabfd2214131185686b1983412 DIFF:

[llvm] [clang] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-02 Thread Timm Baeder via cfe-commits
@@ -777,6 +777,12 @@ void CodeGenFunction::EmitCoroutineBody(const CoroutineBodyStmt ) { // LLVM require the frontend to mark the coroutine. CurFn->setPresplitCoroutine(); + + { +CXXRecordDecl *RD = FnRetTy->getAsCXXRecordDecl(); +if (RD && RD->hasAttr()) +

[clang] [analyzer][NFC] Rework SVal kind representation (PR #71039)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/71039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Rework SVal kind representation (PR #71039)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I've considered this but I found the number of alternatives too large to make > it feasible. Consider that we have 11 possible SValKinds, which would require > 4 bits to encode. Requiring all Data pointers to be aligned as such seems > rough - although not impossible. Sorry,

[clang] [clang-tools-extra] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
@@ -2214,7 +2214,7 @@ void ASTWriter::WriteDeclAbbrevs() { Abv->Add(BitCodeAbbrevOp(0)); // TSCSpec Abv->Add(BitCodeAbbrevOp(0)); // InitStyle Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong -

[clang] [clang-tools-extra] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
@@ -84,22 +88,33 @@ inline bool isUniqueGVALinkage(GVALinkage L) { } inline bool isExternallyVisible(Linkage L) { - return L >= VisibleNoLinkage; + switch (L) { + case Linkage::Invalid: +llvm_unreachable("Linkage hasn't been computed!"); Endilll wrote:

[clang] [clang-tools-extra] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Vlad Serebrennikov (Endilll) Changes This patch introduces a new enumerator `Invalid = 0`, shifting other enumerators by +1. Contrary to how it might sound, this actually affirms status quo of how this enum is stored in

[clang] [clang-tools-extra] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Vlad Serebrennikov (Endilll) Changes This patch introduces a new enumerator `Invalid = 0`, shifting other enumerators by +1. Contrary to how it might sound, this actually affirms status quo of how this enum is stored in

[clang] [clang-tools-extra] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/71049 This patch introduces a new enumerator `Invalid = 0`, shifting other enumerators by +1. Contrary to how it might sound, this actually affirms status quo of how this enum is stored in `clang::Decl`: ``` /// If

[clang-tools-extra] [NFC][clang-tidy]refactor isAssignmentToMemberOf in PreferMemberInitializerCheck (PR #71006)

2023-11-02 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/71006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 43e13fd - [NFC][clang-tidy]refactor isAssignmentToMemberOf in PreferMemberInitializerCheck (#71006)

2023-11-02 Thread via cfe-commits
Author: Congcong Cai Date: 2023-11-02T19:30:06+08:00 New Revision: 43e13fdc9e8edd425f640c424071377879c07822 URL: https://github.com/llvm/llvm-project/commit/43e13fdc9e8edd425f640c424071377879c07822 DIFF: https://github.com/llvm/llvm-project/commit/43e13fdc9e8edd425f640c424071377879c07822.diff

[PATCH] D159497: [RFC][clangd] Check if SelectionTree is complete

2023-11-02 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. > One such heuristic is to check the nodes in the selection tree for the exact > line match It looks like this heuristic doesn't work well in multiline cases. E.g. int f^unc() { return 0; } will give empty result with this patch applied. Repository: rG

[clang] [analyzer][NFC] Rework SVal kind representation (PR #71039)

2023-11-02 Thread Balazs Benics via cfe-commits
steakhal wrote: > But I have to point out that this patch doesn't address the fact that `const > void* Data` is not friendly to debuggers, especially with type information > encoded in another member. So even with this patch applied, someone would > still have to write (and maintain) a custom

[clang] [analyzer][NFC] Rework SVal kind representation (PR #71039)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
@@ -105,38 +86,25 @@ class SVal { return llvm::dyn_cast(*this); } - unsigned getRawKind() const { return Kind; } - BaseKind getBaseKind() const { return (BaseKind) (Kind & BaseMask); } - unsigned getSubKind() const { return Kind >> BaseBits; } + SValKind getKind()

[clang] [analyzer][NFC] Rework SVal kind representation (PR #71039)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Converting packed `unsigned Kind` into non-packed `SValKind Kind` is definitely going to help debuggers to display the value correctly. But I have to point out that this patch doesn't address the fact that `const void* Data` is not friendly to debuggers,

[flang] [clang] [mlir] [Flang][OpenMP][MLIR] Add support for -nogpulib option (PR #71045)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Dominik Adamski (DominikAdamski) Changes If -nogpulib option is passed by the user, then the OpenMP device runtime is not used and we should not emit globals to configure debugging at compile-time for the device runtime. Link to

[clang] [analyzer][NFC] Rework SVal kind representation (PR #71039)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/71039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [mlir] [clang] [Flang][OpenMP][MLIR] Add support for -nogpulib option (PR #71045)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir-llvm Author: Dominik Adamski (DominikAdamski) Changes If -nogpulib option is passed by the user, then the OpenMP device runtime is not used and we should not emit globals to configure debugging at compile-time for the device runtime. Link to

[flang] [mlir] [clang] [Flang][OpenMP][MLIR] Add support for -nogpulib option (PR #71045)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-mlir Author: Dominik Adamski (DominikAdamski) Changes If -nogpulib option is passed by the user, then the OpenMP device runtime is not used and we should not emit globals to configure debugging at compile-time for the

[flang] [mlir] [clang] [Flang][OpenMP][MLIR] Add support for -nogpulib option (PR #71045)

2023-11-02 Thread Dominik Adamski via cfe-commits
https://github.com/DominikAdamski created https://github.com/llvm/llvm-project/pull/71045 If -nogpulib option is passed by the user, then the OpenMP device runtime is not used and we should not emit globals to configure debugging at compile-time for the device runtime. Link to -nogpulib flag

[llvm] [clang] [AMDGPU] Add code model (#70760) test for amdgpu target. (PR #71019)

2023-11-02 Thread Pravin Jagtap via cfe-commits
@@ -13,6 +13,11 @@ // RUN: not %clang -### -c --target=aarch64 -mcmodel=medium %s 2>&1 | FileCheck --check-prefix=ERR-MEDIUM %s // RUN: not %clang -### -c --target=aarch64 -mcmodel=kernel %s 2>&1 | FileCheck --check-prefix=ERR-KERNEL %s // RUN: not %clang

[llvm] [clang] [AMDGPU] Add code model (#70760) test for amdgpu target. (PR #71019)

2023-11-02 Thread Pravin Jagtap via cfe-commits
https://github.com/pravinjagtap updated https://github.com/llvm/llvm-project/pull/71019 >From ef0118818249da417706db7f8e7086d051d17d50 Mon Sep 17 00:00:00 2001 From: Pravin Jagtap Date: Thu, 2 Nov 2023 01:05:35 -0400 Subject: [PATCH 1/3] [AMDGPU] Add code model (#70760) test for amdgpu target.

[flang] [mlir] [clang] [libcxx] [llvm] [lldb] [Flang][OpenMP] Port openmp threadprivate-use-association.f90 test to HLFIR flow (PR #71043)

2023-11-02 Thread chandan singh via cfe-commits
https://github.com/chandankds created https://github.com/llvm/llvm-project/pull/71043 None >From 029b1687e5217e73655442b319a482865587277b Mon Sep 17 00:00:00 2001 From: chandan singh <36783761+chandan...@users.noreply.github.com> Date: Thu, 2 Nov 2023 11:53:03 +0530 Subject: [PATCH 1/2]

[clang-tools-extra] [NFC][clang-tidy]refactor isAssignmentToMemberOf in PreferMemberInitializerCheck (PR #71006)

2023-11-02 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/71006 >From 69b7688f56f7fe96031201eef1c3804f391c5abe Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 Nov 2023 08:49:22 +0800 Subject: [PATCH 1/2] [NFC][clang-tidy]refactor isAssignmentToMemberOf in

[llvm] [clang] [clang-tools-extra] [AMDGPU] New ttracedata intrinsics (PR #70235)

2023-11-02 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/70235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] WIP: [flang] Enable fir alias tags pass by default when optimizing for speed (PR #68597)

2023-11-02 Thread Tom Eccles via cfe-commits
tblah wrote: Hi @vzakhari, currently there is a serious performance regression in spec2017 exchange2. With the TBAA tags we produce slightly better code (less repeated loads, hoisting some code out of loops, etc). Unfortunately, this change to the generated code causes LLVM's function

[PATCH] D154396: [clang] Add support for SerenityOS

2023-11-02 Thread Brad Smith via Phabricator via cfe-commits
brad added a comment. But the rest LGTM as a start. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154396/new/ https://reviews.llvm.org/D154396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D154396: [clang] Add support for SerenityOS

2023-11-02 Thread Brad Smith via Phabricator via cfe-commits
brad added inline comments. Comment at: clang/lib/Driver/ToolChains/Serenity.cpp:202 + addSystemInclude(DriverArgs, CC1Args, + concat(D.SysRoot, "/usr/local/include")); + addSystemInclude(DriverArgs, CC1Args, concat(D.SysRoot, "/usr/include"));

[clang] [llvm] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-02 Thread Paulo Matos via cfe-commits
pmatos wrote: > I still think all the defaulted address space parameters should be purged and > it only invites bugs. It's a regression to introduce a new defaulted argument. Understandable, although always writing `PointerType::get(Ctx, 0);` really looks weird given most of the time the

[llvm] [clang-tools-extra] [clang] [AMDGPU] New ttracedata intrinsics (PR #70235)

2023-11-02 Thread Jay Foad via cfe-commits
https://github.com/jayfoad updated https://github.com/llvm/llvm-project/pull/70235 >From e02640686a8cf0a42cec01da4f32b6888f5de11f Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Wed, 25 Oct 2023 17:14:40 +0100 Subject: [PATCH 1/2] [AMDGPU] New ttracedata intrinsics Add llvm.amdgcn.s.ttracedata

[clang] [llvm] [AMDGPU] Add code model (#70760) test for amdgpu target. (PR #71019)

2023-11-02 Thread Matt Arsenault via cfe-commits
@@ -13,6 +13,11 @@ // RUN: not %clang -### -c --target=aarch64 -mcmodel=medium %s 2>&1 | FileCheck --check-prefix=ERR-MEDIUM %s // RUN: not %clang -### -c --target=aarch64 -mcmodel=kernel %s 2>&1 | FileCheck --check-prefix=ERR-KERNEL %s // RUN: not %clang

[clang] [llvm] [AMDGPU] Add code model (#70760) test for amdgpu target. (PR #71019)

2023-11-02 Thread Pravin Jagtap via cfe-commits
https://github.com/pravinjagtap updated https://github.com/llvm/llvm-project/pull/71019 >From ef0118818249da417706db7f8e7086d051d17d50 Mon Sep 17 00:00:00 2001 From: Pravin Jagtap Date: Thu, 2 Nov 2023 01:05:35 -0400 Subject: [PATCH 1/2] [AMDGPU] Add code model (#70760) test for amdgpu target.

[clang-tools-extra] [NFC][clang-tidy]refactor isAssignmentToMemberOf in PreferMemberInitializerCheck (PR #71006)

2023-11-02 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. +1, as it's better than was before. https://github.com/llvm/llvm-project/pull/71006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [NFC][clang-tidy]refactor isAssignmentToMemberOf in PreferMemberInitializerCheck (PR #71006)

2023-11-02 Thread Piotr Zegar via cfe-commits
@@ -118,45 +118,45 @@ static void updateAssignmentLevel( } } -static std::pair +static std::optional> PiotrZSL wrote: Consider changing this std::pair into normal struct, in such way there will be no need to make aliases to fields later in check method

[clang-tools-extra] [NFC][clang-tidy]refactor isAssignmentToMemberOf in PreferMemberInitializerCheck (PR #71006)

2023-11-02 Thread Piotr Zegar via cfe-commits
@@ -216,11 +216,12 @@ void PreferMemberInitializerCheck::check( return; } -const FieldDecl *Field = nullptr; -const Expr *InitValue = nullptr; -std::tie(Field, InitValue) = isAssignmentToMemberOf(Class, S, Ctor); -if (!Field) +std::optional> +

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

2023-11-02 Thread Jay Foad via cfe-commits
https://github.com/jayfoad converted_to_draft 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

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

2023-11-02 Thread Jay Foad via cfe-commits
@@ -290,37 +291,40 @@ bool SIFoldOperands::updateOperand(FoldCandidate ) const { if (Fold.Commuted) TII->commuteInstruction(*Inst32, false); -return true; - } - assert(!Fold.needsShrink() && "not handled"); +Fold.UseMI = Inst32; +Fold.UseOpNo =

[clang] [llvm] Remove experimental from Vector Crypto extensions (PR #69000)

2023-11-02 Thread Brandon Wu via cfe-commits
4vtomat wrote: Since it's possible that **ISA spec** and **intrinsics spec** are not synchronized, so the updates add an dummy extension called **zexperimental**, once `-menable-experimental-extensions` is specified, the feature `zexperimental` is automatically added. If specifying `let

[clang] [analyzer][NFC] Rework SVal kind representation (PR #71039)

2023-11-02 Thread Balazs Benics via cfe-commits
steakhal wrote: This PR relates to #69835 ([comment](https://github.com/llvm/llvm-project/issues/69835#issuecomment-1775533393)). https://github.com/llvm/llvm-project/pull/71039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer][NFC] Rework SVal kind representation (PR #71039)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes The goal of this patch is to refine how the `SVal` base and sub-kinds are represented by forming one unified enum describing the possible SVals. This means that the `unsigned SVal::Kind`

[clang] [analyzer][NFC] Rework SVal kind representation (PR #71039)

2023-11-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/71039 The goal of this patch is to refine how the `SVal` base and sub-kinds are represented by forming one unified enum describing the possible SVals. This means that the `unsigned SVal::Kind` and the attached

[clang] [clang] Change representation of CurLexerKind (PR #70381)

2023-11-02 Thread via cfe-commits
serge-sans-paille wrote: As expected, the formatter iw now red, otherwise looks good (to me at least), waiting for official approval :-) https://github.com/llvm/llvm-project/pull/70381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-11-02 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69597 >From 26780a13123c14763467c1b9de6b0cef3d92ff1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 18 Oct 2023 15:36:13 +0200 Subject:

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-11-02 Thread Timm Baeder via cfe-commits
tbaederr wrote: > FWIW, when the description for the PR says it can't be merged for some > reason, it usually goes on the bottom of my review queue until those issues > are addressed. It's difficult to accept known-broken code. :-( Sorry, I forgot to re-enable the tests here. Now that

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-11-02 Thread Timm Baeder via cfe-commits
@@ -167,17 +169,13 @@ template class IntegralAP final { } static bool increment(IntegralAP A, IntegralAP *R) { -// FIXME: Implement. -assert(false); -*R = IntegralAP(A.V - 1); -return false; +IntegralAP One(1, A.bitWidth()); +return add(A, One,

[clang] [clang-tools-extra] [compiler-rt] [flang] [llvm] [Legalizer] Expand fmaximum and fminimum (PR #67301)

2023-11-02 Thread Matt Arsenault via cfe-commits
@@ -8201,6 +8201,66 @@ SDValue TargetLowering::expandFMINNUM_FMAXNUM(SDNode *Node, return SDValue(); } +SDValue TargetLowering::expandFMINIMUM_FMAXIMUM(SDNode *N, +SelectionDAG ) const { + SDLoc DL(N); + SDValue LHS =

[flang] [compiler-rt] [llvm] [clang-tools-extra] [clang] [Legalizer] Expand fmaximum and fminimum (PR #67301)

2023-11-02 Thread Matt Arsenault via cfe-commits
@@ -8201,6 +8201,66 @@ SDValue TargetLowering::expandFMINNUM_FMAXNUM(SDNode *Node, return SDValue(); } +SDValue TargetLowering::expandFMINIMUM_FMAXIMUM(SDNode *N, +SelectionDAG ) const { + SDLoc DL(N); + SDValue LHS =

[flang] [clang] [clang-tools-extra] [llvm] [compiler-rt] [Legalizer] Expand fmaximum and fminimum (PR #67301)

2023-11-02 Thread Matt Arsenault via cfe-commits
@@ -8201,6 +8201,66 @@ SDValue TargetLowering::expandFMINNUM_FMAXNUM(SDNode *Node, return SDValue(); } +SDValue TargetLowering::expandFMINIMUM_FMAXIMUM(SDNode *N, +SelectionDAG ) const { + SDLoc DL(N); + SDValue LHS =

[clang] [llvm] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-02 Thread Peter Waller via cfe-commits
peterwaller-arm wrote: Worth a simultaneous update to the langref? https://github.com/llvm/llvm-project/blob/e2564b27472638d2e2019e6cd2fc6d6d608f8b8c/llvm/docs/LangRef.rst#L5080-L5106 https://github.com/llvm/llvm-project/pull/70970 ___ cfe-commits

[clang] [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to POSIX versions in StreamChecker (PR #70540)

2023-11-02 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/70540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 32521bb - [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to POSIX versions in StreamChecker (#70540)

2023-11-02 Thread via cfe-commits
Author: Ben Shi Date: 2023-11-02T17:10:56+08:00 New Revision: 32521bb37caad512fd539d95bda26170a91e8a4b URL: https://github.com/llvm/llvm-project/commit/32521bb37caad512fd539d95bda26170a91e8a4b DIFF: https://github.com/llvm/llvm-project/commit/32521bb37caad512fd539d95bda26170a91e8a4b.diff LOG:

[openmp] [clang] [OpenMP] Add support for Solaris/x86_64 (PR #70593)

2023-11-02 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/70593 >From 261f571d28b8398be221f3928f93bcee211e26ae Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 29 Oct 2023 09:02:12 -0400 Subject: [PATCH] [OpenMP] Add support for Solaris/x86_64 Tested on

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-11-02 Thread Timm Baeder via cfe-commits
@@ -167,17 +169,13 @@ template class IntegralAP final { } static bool increment(IntegralAP A, IntegralAP *R) { -// FIXME: Implement. -assert(false); -*R = IntegralAP(A.V - 1); -return false; +IntegralAP One(1, A.bitWidth()); tbaederr

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

2023-11-02 Thread Liviu Ionescu via cfe-commits
ilg-ul wrote: Then can this bug fix be accepted? Are there any other solutions? https://github.com/llvm/llvm-project/pull/70817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-02 Thread Matt Arsenault via cfe-commits
arsenm wrote: I still think all the defaulted address space parameters should be purged and it only invites bugs. It's a regression to introduce a new defaulted argument. https://github.com/llvm/llvm-project/pull/71029 ___ cfe-commits mailing list

[llvm] [clang] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-02 Thread Nikita Popov via cfe-commits
nikic wrote: > Also adds AS = 0 as an optional argument to get() methods. I believe that was intentionally omitted to make sure address spaces aren't forgotten (getUnqual is used for the case where they aren't relevant). cc @arsenm Not sure whether this consideration is still relevant with

[clang] b73d739 - Revert "[clang-repl] [test] Make an XFAIL more precise (#70991)"

2023-11-02 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2023-11-02T10:49:55+02:00 New Revision: b73d7390732b48014983aa9569e68c139f61bfcb URL: https://github.com/llvm/llvm-project/commit/b73d7390732b48014983aa9569e68c139f61bfcb DIFF:

[clang] [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to POSIX versions in StreamChecker (PR #70540)

2023-11-02 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/70540 >From bbdb534d7c1300c4b18128fc0ccdd3476c3f6d7f Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Tue, 31 Oct 2023 13:05:19 +0800 Subject: [PATCH] [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to POSIX

[clang] [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to POSIX versions in StreamChecker (PR #70540)

2023-11-02 Thread Ben Shi via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_analyze_cc1 -fno-builtin -analyzer-checker=core,alpha.unix.Stream -verify %s +// expected-no-diagnostics + +typedef struct _FILE FILE; + +// These functions are not standard C library functions. +FILE *tmpfile(const char *restrict path); // Real

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-11-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/69555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0d21436 - [C++20] [Modules] Warn if we found #include in module purview (#69555)

2023-11-02 Thread via cfe-commits
Author: Chuanqi Xu Date: 2023-11-02T16:40:20+08:00 New Revision: 0d2143611425081bb9db5bb6ee57aaddfd1eda53 URL: https://github.com/llvm/llvm-project/commit/0d2143611425081bb9db5bb6ee57aaddfd1eda53 DIFF: https://github.com/llvm/llvm-project/commit/0d2143611425081bb9db5bb6ee57aaddfd1eda53.diff

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-11-02 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Got it. Thanks. Then I feel this is ready to land. https://github.com/llvm/llvm-project/pull/69555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to POSIX versions in StreamChecker (PR #70540)

2023-11-02 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_analyze_cc1 -fno-builtin -analyzer-checker=core,alpha.unix.Stream -verify %s +// expected-no-diagnostics + +typedef struct _FILE FILE; + +// These functions are not standard C library functions. +FILE *tmpfile(const char *restrict path); // Real

[clang] [clang-repl] [test] Make an XFAIL more precise (PR #70991)

2023-11-02 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: This broke on PS5 bots, like https://lab.llvm.org/buildbot/#/builders/216/builds/29677; those are configured with a triple like `x86_64-sie-ps5`, which seems to use an MSVC like C++ ABI behaviour, so I pushed a revert. Not sure whom to CC to pull in Sony people to discuss

[clang] [clang][Interp] Handle std::move etc. builtins (PR #70772)

2023-11-02 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70772 >From b670986c19e412b3c140b610f2c26d957544b23a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 31 Oct 2023 07:17:16 +0100 Subject:

[clang] [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to POSIX versions in StreamChecker (PR #70540)

2023-11-02 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/70540 >From bf36469281f52fe34866e6df5eeafdc51d28819c Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Tue, 31 Oct 2023 13:05:19 +0800 Subject: [PATCH] [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to POSIX

[clang] [llvm] [SVE2.1][Clang][LLVM]Int/FP reduce builtin in Clang and LLVM intrinsic (PR #69926)

2023-11-02 Thread Sander de Smalen via cfe-commits
@@ -0,0 +1,285 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s +// RUN:

[clang] [llvm] [SVE2.1][Clang][LLVM]Int/FP reduce builtin in Clang and LLVM intrinsic (PR #69926)

2023-11-02 Thread Sander de Smalen via cfe-commits
@@ -1224,7 +1233,27 @@ void SVEEmitter::createHeader(raw_ostream ) { OS << "typedef __SVBFloat16_t svbfloat16_t;\n"; - OS << "#include \n"; + OS << "#include \n\n"; + + OS << "typedef __attribute__((vector_size (16))) int8_t __sve_int8x16_t;\n";

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-11-02 Thread Michael Spencer via cfe-commits
Bigcheese wrote: This is fine, it's definitely wrong to include framework headers like this too. https://github.com/llvm/llvm-project/pull/69555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to POSIX versions in StreamChecker (PR #70540)

2023-11-02 Thread Ben Shi via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_analyze_cc1 -fno-builtin -analyzer-checker=core,alpha.unix.Stream -verify %s +// expected-no-diagnostics + +typedef struct _FILE FILE; + +// These functions are not standard C library functions. +FILE *tmpfile(const char *restrict path); // Real

[clang] [C++20] [Modules] Don't import function bodies from other module units even with optimizations (PR #71031)

2023-11-02 Thread Chuanqi Xu via cfe-commits
@@ -3856,10 +3856,19 @@ CodeGenModule::isTriviallyRecursive(const FunctionDecl *FD) { bool CodeGenModule::shouldEmitFunction(GlobalDecl GD) { if (getFunctionLinkage(GD) != llvm::Function::AvailableExternallyLinkage) return true; + const auto *F = cast(GD.getDecl());

[clang] [C++20] [Modules] Don't import function bodies from other module units even with optimizations (PR #71031)

2023-11-02 Thread Timm Baeder via cfe-commits
@@ -3856,10 +3856,19 @@ CodeGenModule::isTriviallyRecursive(const FunctionDecl *FD) { bool CodeGenModule::shouldEmitFunction(GlobalDecl GD) { if (getFunctionLinkage(GD) != llvm::Function::AvailableExternallyLinkage) return true; + const auto *F = cast(GD.getDecl());

[clang] [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to POSIX versions in StreamChecker (PR #70540)

2023-11-02 Thread Balázs Kéri via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_analyze_cc1 -fno-builtin -analyzer-checker=core,alpha.unix.Stream -verify %s +// expected-no-diagnostics + +typedef struct _FILE FILE; + +// These functions are not standard C library functions. +FILE *tmpfile(const char *restrict path); // Real

[clang] [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to POSIX versions in StreamChecker (PR #70540)

2023-11-02 Thread Balázs Kéri via cfe-commits
https://github.com/balazske approved this pull request. https://github.com/llvm/llvm-project/pull/70540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to POSIX versions in StreamChecker (PR #70540)

2023-11-02 Thread Balázs Kéri via cfe-commits
https://github.com/balazske edited https://github.com/llvm/llvm-project/pull/70540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [flang] [clang] [libc] [llvm] [clang-tools-extra] [libcxx] [lldb] [PowerPC] Support mcmodel=large for AIX (PR #70652)

2023-11-02 Thread Fangrui Song via cfe-commits
@@ -5723,16 +5723,14 @@ void Clang::ConstructJob(Compilation , const JobAction , if (Arg *A = Args.getLastArg(options::OPT_mcmodel_EQ)) { StringRef CM = A->getValue(); bool Ok = false; -if (Triple.isOSAIX() && CM == "medium") { +if (Triple.isOSAIX() && CM ==

<    1   2   3   4   5   >