[clang] [clang][dataflow] Discard unneeded `ExprToLoc` and `ExprToVal` entries. (PR #72850)

2023-11-22 Thread via cfe-commits
@@ -311,7 +318,10 @@ computeBlockInputState(const CFGBlock &Block, AnalysisContext &AC) { } } - JoinedStateBuilder Builder(AC); + // When performing the join, only retain state for those expressions that are + // consumed by this block. This avoids performing joins a

[clang] [clang][dataflow] Discard unneeded `ExprToLoc` and `ExprToVal` entries. (PR #72850)

2023-11-22 Thread via cfe-commits
https://github.com/martinboehme edited https://github.com/llvm/llvm-project/pull/72850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Discard unneeded `ExprToLoc` and `ExprToVal` entries. (PR #72850)

2023-11-22 Thread via cfe-commits
martinboehme wrote: > +1 for the simpler approach. I have a high-level question about the stability > of the locations, its effect on convergence. Answered in the inline comment. > But I am happy with the `ExprToVal` part of the simple patch. SG! Then let's continue the discussion on #72985?

[clang] [mlir] [llvm] [llvm][TypeSize] Fix addition/subtraction in TypeSize. (PR #72979)

2023-11-22 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm closed https://github.com/llvm/llvm-project/pull/72979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 81b7f11 - [llvm][TypeSize] Fix addition/subtraction in TypeSize. (#72979)

2023-11-22 Thread via cfe-commits
Author: Sander de Smalen Date: 2023-11-22T08:52:53Z New Revision: 81b7f115fb272ef6fd6967f4121b64814b4bcf10 URL: https://github.com/llvm/llvm-project/commit/81b7f115fb272ef6fd6967f4121b64814b4bcf10 DIFF: https://github.com/llvm/llvm-project/commit/81b7f115fb272ef6fd6967f4121b64814b4bcf10.diff L

[clang] [clang][AST][ASTMerge] prevent AST nodes from being deallocated early (PR #73096)

2023-11-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/73096 This patch aims to fix [error in ast-merge to new ast file](https://github.com/llvm/llvm-project/issues/72783). `ASTUnit` is put in `for` body and AST nodes would be deallocated by allocator. Using these nodes la

[clang] [clang][AST][ASTMerge] prevent AST nodes from being deallocated early (PR #73096)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qizhi Hu (jcsxky) Changes This patch aims to fix [error in ast-merge to new ast file](https://github.com/llvm/llvm-project/issues/72783). `ASTUnit` is put in `for` body and AST nodes would be deallocated by allocator. Using these nodes la

[clang] [clang][analyzer] Move `security.cert.env.InvalidPtr` out of `alpha` (PR #71912)

2023-11-22 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/71912 From 977e421008c1247d54f4cb67967ed2a353935c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 10 Nov 2023 10:08:58 +0100 Subject: [PATCH 1/2] [analyzer] Move security.cert.env.Inva

[llvm] [clang] [llvm][ARM] Emit MVE .arch_extension after .fpu directive if it does not include MVE features (PR #71545)

2023-11-22 Thread via cfe-commits
https://github.com/simpal01 closed https://github.com/llvm/llvm-project/pull/71545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move `security.cert.env.InvalidPtr` out of `alpha` (PR #71912)

2023-11-22 Thread Endre Fülöp via cfe-commits
@@ -1009,11 +1002,20 @@ let ParentPackage = ENV in { "standard), which can lead to false positives depending on " "implementation.", "false", - InAlpha>, + Released>, ]>, Documentation

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-22 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/73099 The implementation mostly reuses C++ code paths where possible, including narrowing check in order to provide diagnostic messages in case initializer for constexpr variable is not exactly representable in targ

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes The implementation mostly reuses C++ code paths where possible, including narrowing check in order to provide diagnostic messages in case initializer for constexpr variable is not exactly represen

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-22 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: cc @to268 , GitHub doesn't let me add you to the reviewers list. https://github.com/llvm/llvm-project/pull/73099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-22 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 74cdb8e6f8c88b97204f540601a553b412d1cd56 1d70b7726e7d1f11622a6d5c8246b0737e024c8d --

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-22 Thread Guillot Tony via cfe-commits
to268 wrote: That's probably because I have still not commit access, but I'll take a look. https://github.com/llvm/llvm-project/pull/73099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] 2e09ea6 - [clang] Ensure minimal alignment of global vars of incomplete type. (#72886)

2023-11-22 Thread via cfe-commits
Author: Jonas Paulsson Date: 2023-11-22T11:24:45+01:00 New Revision: 2e09ea65c4f9e458ffb31fe63d84a4991704f9e6 URL: https://github.com/llvm/llvm-project/commit/2e09ea65c4f9e458ffb31fe63d84a4991704f9e6 DIFF: https://github.com/llvm/llvm-project/commit/2e09ea65c4f9e458ffb31fe63d84a4991704f9e6.diff

[clang] [clang] Ensure minimal alignment of global vars of incomplete type. (PR #72886)

2023-11-22 Thread Jonas Paulsson via cfe-commits
https://github.com/JonPsson1 closed https://github.com/llvm/llvm-project/pull/72886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-22 Thread Timm Baeder via cfe-commits
@@ -4110,6 +4117,10 @@ static CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, } bool IsConstant = BaseType.isConstant(Info.Ctx); +bool ConstexprVar = false; +if (const auto *VD = dyn_cast_or_null( tbaederr wrote: ```suggestio

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-22 Thread Timm Baeder via cfe-commits
@@ -8605,6 +8620,27 @@ static bool checkForConflictWithNonVisibleExternC(Sema &S, const T *ND, return false; } +static bool CheckC23ConstexprVarTypeQualifiers(Sema &SemaRef, +SourceLocation VarLoc, QualType T) { + if (const auto

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-22 Thread Timm Baeder via cfe-commits
@@ -2231,6 +2231,13 @@ static bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, return false; } + if (Info.getLangOpts().C23) { +auto *VarD = dyn_cast_or_null(BaseVD); +if (VarD && VarD->isConstexpr() && !LVal.isNullPointer()) { + Info

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-22 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,99 @@ +//===--- RedundantInlineSpecifierCheck.cpp - +// clang-tidy--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/

[clang] [clang][dataflow] Clear `ExprToLoc` and `ExprToVal` at the start of a block. (PR #72985)

2023-11-22 Thread via cfe-commits
martinboehme wrote: Update: I've run some tests on an internal codebase, and with this PR, Crubit's nullability check sees a reduction in SAT solver timeouts of over 40% and a reduction in "reached maximum iterations" errors of over 60% -- similar to the previous more complicated approach in #

[clang] [clang] Ensure minimal alignment of global vars of incomplete type. (PR #72886)

2023-11-22 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang --target=s390x-linux -S -emit-llvm -o - %s | FileCheck %s nikic wrote: Why is this a Driver test rather than a CodeGen test using clang_cc1? https://github.com/llvm/llvm-project/pull/72886

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-22 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,99 @@ +//===--- RedundantInlineSpecifierCheck.cpp - +// clang-tidy--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-22 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,99 @@ +//===--- RedundantInlineSpecifierCheck.cpp - +// clang-tidy--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-22 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,99 @@ +//===--- RedundantInlineSpecifierCheck.cpp - +// clang-tidy--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-22 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,99 @@ +//===--- RedundantInlineSpecifierCheck.cpp - +// clang-tidy--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-22 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -0,0 +1,99 @@ +//===--- RedundantInlineSpecifierCheck.cpp - +// clang-tidy--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/

[clang-tools-extra] [clang] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-22 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -7889,7 +7889,7 @@ AST_POLYMORPHIC_MATCHER(isInline, AST_POLYMORPHIC_SUPPORTED_TYPES(NamespaceDecl, if (const auto *NSD = dyn_cast(&Node)) return NSD->isInline(); if (const auto *VD = dyn_cast(&Node)) -

[clang-tools-extra] [clang] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-22 Thread Piotr Zegar via cfe-commits
=?utf-8?q?F=C3=A9lix-Antoine?= Constantin Message-ID: In-Reply-To: https://github.com/PiotrZSL requested changes to this pull request. Not bad, just few nits. https://github.com/llvm/llvm-project/pull/73069 ___ cfe-commits mailing list cfe-commits@li

[clang] Refactor ASTContext::getDeclAlign() (NFC) (PR #72977)

2023-11-22 Thread Jonas Paulsson via cfe-commits
https://github.com/JonPsson1 updated https://github.com/llvm/llvm-project/pull/72977 >From 000dcadc0fd118df643e3f2ecbe5fcbb2f8eaab0 Mon Sep 17 00:00:00 2001 From: Jonas Paulsson Date: Tue, 21 Nov 2023 12:10:03 +0100 Subject: [PATCH 1/3] Refactor ASTContext::getDeclAlign() (NFC) --- clang/lib/

[clang-tools-extra] [clang] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-22 Thread via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: philnik777 wrote: @PiotrZSL could you use the "Start review" button to avoid spamming people with dozens of E-Mails for a single review? https://github.com/llvm/llvm-project/pull/73069 __

[clang] [Clang] Implement P2308R1 - Template Parameter Initialization. (PR #73103)

2023-11-22 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/73103 https://wiki.edg.com/pub/Wg21kona2023/StrawPolls/p2308r1.html This implements P2308R1 as a DR and resolves CWG2459, CWG2450 and CWG2049. >From 90a9c92ce532af7c6346a381499780f158cd26ca Mon Sep 17 00:00:00 2001 F

[clang] Refactor ASTContext::getDeclAlign() (NFC) (PR #72977)

2023-11-22 Thread Jonas Paulsson via cfe-commits
@@ -1627,28 +1627,20 @@ const llvm::fltSemantics &ASTContext::getFloatTypeSemantics(QualType T) const { CharUnits ASTContext::getDeclAlign(const Decl *D, bool ForAlignof) const { unsigned Align = Target->getCharWidth(); - bool UseAlignAttrOnly = false; - if (unsigned Alig

[clang] [flang] [llvm] [Flang] Add code-object-version option (PR #72638)

2023-11-22 Thread Dominik Adamski via cfe-commits
https://github.com/DominikAdamski updated https://github.com/llvm/llvm-project/pull/72638 >From e5d339c24193e4e37013b3b25460009418d6ce6d Mon Sep 17 00:00:00 2001 From: Dominik Adamski Date: Fri, 17 Nov 2023 03:02:49 -0600 Subject: [PATCH 1/2] [Flang] Add code-object-version option Information

[clang] [Clang] Implement P2308R1 - Template Parameter Initialization. (PR #73103)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes https://wiki.edg.com/pub/Wg21kona2023/StrawPolls/p2308r1.html This implements P2308R1 as a DR and resolves CWG2459, CWG2450 and CWG2049. --- Full diff: https://github.com/llvm/llvm-project/pull/73103.diff 11

[clang] [clang] Ensure minimal alignment of global vars of incomplete type. (PR #72886)

2023-11-22 Thread Jonas Paulsson via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang --target=s390x-linux -S -emit-llvm -o - %s | FileCheck %s JonPsson1 wrote: I found some other align tests there, like arm-alignment.c, so I thought this should work..? https://github.com/llvm/llvm-project/pull/72886

[clang] [flang] [llvm] [Flang] Add code-object-version option (PR #72638)

2023-11-22 Thread Dominik Adamski via cfe-commits
@@ -264,6 +263,37 @@ static void addDepdendentLibs(mlir::ModuleOp &mlirModule, } } +// Add to MLIR code target specific items which are dependent on target +// configuration specified by the user +static void addTargetSpecificMLIRItems(mlir::ModuleOp &mlirModule, +

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-22 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: PiotrZSL wrote: > @PiotrZSL could you use the "Start review" button to avoid spamming people > with dozens of E-Mails for a single review? @philnik777 If you prefer not to receive notifications, simply unsubscribe. Specially if yo

[clang] [flang] [llvm] [Flang] Add code-object-version option (PR #72638)

2023-11-22 Thread Dominik Adamski via cfe-commits
@@ -264,6 +263,37 @@ static void addDepdendentLibs(mlir::ModuleOp &mlirModule, } } +// Add to MLIR code target specific items which are dependent on target +// configuration specified by the user +static void addTargetSpecificMLIRItems(mlir::ModuleOp &mlirModule, +

[clang] [flang] [llvm] [Flang] Add code-object-version option (PR #72638)

2023-11-22 Thread Dominik Adamski via cfe-commits
@@ -264,6 +263,37 @@ static void addDepdendentLibs(mlir::ModuleOp &mlirModule, } } +// Add to MLIR code target specific items which are dependent on target +// configuration specified by the user +static void addTargetSpecificMLIRItems(mlir::ModuleOp &mlirModule, +

[clang] [llvm] [flang] [Flang] Add code-object-version option (PR #72638)

2023-11-22 Thread Dominik Adamski via cfe-commits
DominikAdamski wrote: Done https://github.com/llvm/llvm-project/pull/72638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P2308R1 - Template Parameter Initialization. (PR #73103)

2023-11-22 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors \ Endilll wrote: Is triple necessary for the test? https://github.com/llvm/llvm-project/pull/73103 _

[clang] [Clang] Implement P2308R1 - Template Parameter Initialization. (PR #73103)

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

[clang] [Clang] Implement P2308R1 - Template Parameter Initialization. (PR #73103)

2023-11-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. DR test side looks good, except for a small nit. https://github.com/llvm/llvm-project/pull/73103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[llvm] [clang] [mlir] [lld] [AMDGPU] Change default AMDHSA Code Object version to 5 (PR #73000)

2023-11-22 Thread Saiyedul Islam via cfe-commits
saiislam wrote: > (patches like this should probably be broken up - test changes to the > defaults in lld and llvm for instance don't depend on the change to the clang > driver which is the only real semantic change in this patch, right? So > probably only change the semantics of clang, and th

[llvm] [clang] [flang] [Flang] Add code-object-version option (PR #72638)

2023-11-22 Thread Dominik Adamski via cfe-commits
@@ -264,6 +263,37 @@ static void addDepdendentLibs(mlir::ModuleOp &mlirModule, } } +// Add to MLIR code target specific items which are dependent on target +// configuration specified by the user +static void addTargetSpecificMLIRItems(mlir::ModuleOp &mlirModule, +

[llvm] [clang] [flang] [Flang] Add code-object-version option (PR #72638)

2023-11-22 Thread Dominik Adamski via cfe-commits
@@ -85,6 +85,19 @@ class CodeGenOptions : public CodeGenOptionsBase { RK_WithPattern, // Remark pattern specified via '-Rgroup=regexp'. }; + /// \brief Enumeration value for AMDGPU code object version, which is the + /// code object version times 100. + enum class Cod

[llvm] [clang] [flang] [Flang] Add code-object-version option (PR #72638)

2023-11-22 Thread Dominik Adamski via cfe-commits
@@ -264,6 +263,37 @@ static void addDepdendentLibs(mlir::ModuleOp &mlirModule, } } +// Add to MLIR code target specific items which are dependent on target +// configuration specified by the user +static void addTargetSpecificMLIRItems(mlir::ModuleOp &mlirModule, +

[clang] [Clang] Implement P28646R2 Remove Deprecated Arithmetic Conversion on… (PR #73105)

2023-11-22 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/73105 … Enumerations https://isocpp.org/files/papers/P2864R2.pdf >From f548a8e11c75b3157a9337892688f5414234bff8 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 22 Nov 2023 12:25:20 +0100 Subject: [PATCH] [C

[clang] [Clang] Implement P28646R2 Remove Deprecated Arithmetic Conversion on… (PR #73105)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes … Enumerations https://isocpp.org/files/papers/P2864R2.pdf --- Full diff: https://github.com/llvm/llvm-project/pull/73105.diff 5 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+3) - (modified) cl

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

2023-11-22 Thread Jay Foad via cfe-commits
@@ -1847,6 +1862,7 @@ bool SIInsertWaitcnts::runOnMachineFunction(MachineFunction &MF) { TrackedWaitcntSet.clear(); BlockInfos.clear(); + jayfoad wrote: Remove this https://github.com/llvm/llvm-project/pull/68932

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

2023-11-22 Thread Jay Foad via cfe-commits
@@ -1708,6 +1710,19 @@ bool SIInsertWaitcnts::insertWaitcntInBlock(MachineFunction &MF, } ++Iter; +if (ST->isPreciseMemoryEnabled() && Inst.mayLoadOrStore()) { + auto Builder = + BuildMI(Block, Iter, DebugLoc(), TII->get(AMDGPU::S_WAITCNT)) +

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

2023-11-22 Thread Jay Foad via cfe-commits
@@ -1708,6 +1710,19 @@ bool SIInsertWaitcnts::insertWaitcntInBlock(MachineFunction &MF, } ++Iter; +if (ST->isPreciseMemoryEnabled() && Inst.mayLoadOrStore()) { + auto Builder = + BuildMI(Block, Iter, DebugLoc(), TII->get(AMDGPU::S_WAITCNT)) +

[clang-tools-extra] [clang] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-22 Thread via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: philnik777 wrote: > > @PiotrZSL could you use the "Start review" button to avoid spamming people > > with dozens of E-Mails for a single review? > > @philnik777 If you prefer not to receive notifications, simply unsubscribe. > Spe

[flang] [llvm] [clang] [Flang] Add code-object-version option (PR #72638)

2023-11-22 Thread Dominik Adamski via cfe-commits
@@ -85,6 +85,19 @@ class CodeGenOptions : public CodeGenOptionsBase { RK_WithPattern, // Remark pattern specified via '-Rgroup=regexp'. }; + /// \brief Enumeration value for AMDGPU code object version, which is the + /// code object version times 100. + enum class Cod

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Canonicalise ADD+GEP

2023-11-22 Thread Dave Green via Phabricator via cfe-commits
dmgreen added a comment. I hadn't realized this came from someone at Arm. The performance results I had were overall roughly flat, with some improvements and regressions. I think there were still some people working through some fixes for some of the knock-on effects but with those nothing larg

[clang] Refactor ASTContext::getDeclAlign() (NFC) (PR #72977)

2023-11-22 Thread Jonas Paulsson via cfe-commits
https://github.com/JonPsson1 updated https://github.com/llvm/llvm-project/pull/72977 >From 000dcadc0fd118df643e3f2ecbe5fcbb2f8eaab0 Mon Sep 17 00:00:00 2001 From: Jonas Paulsson Date: Tue, 21 Nov 2023 12:10:03 +0100 Subject: [PATCH 1/4] Refactor ASTContext::getDeclAlign() (NFC) --- clang/lib/

[PATCH] D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes

2023-11-22 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. This revision is now accepted and ready to land. LGTM except the final nits. Comment at: clang/lib/Format/ObjCPropertyAttributeOrderFixer.cpp:48 +const FormatToken *BeginTok, const FormatToken *EndTok) const { + // I

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

2023-11-22 Thread via cfe-commits
https://github.com/huixie90 updated https://github.com/llvm/llvm-project/pull/68597 >From 617d6d23b2f861cd6dceb82f54a2685059b6 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Thu, 14 Sep 2023 09:09:29 + Subject: [PATCH] [flang] Enable alias tags pass by default Enable by default when o

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

2023-11-22 Thread Tom Eccles via cfe-commits
https://github.com/tblah closed https://github.com/llvm/llvm-project/pull/68597 ___ 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-22 Thread Tom Eccles via cfe-commits
tblah wrote: Sorry for the noise all. Closing and re-creating to avoid pinging everyone with review https://github.com/llvm/llvm-project/pull/68597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] fbfd2c9 - [coroutines] Introduce [[clang::coro_lifetimebound]] (#72851)

2023-11-22 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2023-11-22T12:51:24+01:00 New Revision: fbfd2c9972695bc74a646bfa5e3e2d00477dabe2 URL: https://github.com/llvm/llvm-project/commit/fbfd2c9972695bc74a646bfa5e3e2d00477dabe2 DIFF: https://github.com/llvm/llvm-project/commit/fbfd2c9972695bc74a646bfa5e3e2d00477dabe2.diff

[clang] [coroutines] Introduce [[clang::coro_lifetimebound]] (PR #72851)

2023-11-22 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/72851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-22 Thread Tom Eccles via cfe-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/73111 Enable by default when optimizing for speed. For simplicity, only forward the flag to the frontend driver when it contradicts what is implied by the optimization level. Since https://github.com/llvm/llvm-project/p

[llvm] [clang] Revert "Revert "[SVE2.1][Clang][LLVM]Add BFloat16 builtin in Clang an… (PR #73110)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc @llvm/pr-subscribers-backend-aarch64 Author: None (CarolineConcatto) Changes …d LLVM intrinisc (#70362)"" This reverts commit e1ee0e85104eed2c68b6821d9e5a2066e4154099. The patch https://github.com/llvm/llvm-project/pull/70362 had a test in LLDB fai

[llvm] [clang] Revert "Revert "[SVE2.1][Clang][LLVM]Add BFloat16 builtin in Clang an… (PR #73110)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (CarolineConcatto) Changes …d LLVM intrinisc (#70362)"" This reverts commit e1ee0e85104eed2c68b6821d9e5a2066e4154099. The patch https://github.com/llvm/llvm-project/pull/70362 had a test in LLDB failing. The Feature sve2p1 in AArch6

[flang] [clang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Tom Eccles (tblah) Changes Enable by default when optimizing for speed. For simplicity, only forward the flag to the frontend driver when it contradicts what is implied by the optimization level. Since https://github.com/llvm/llvm

[clang] [Clang] Implement P28646R2 Remove Deprecated Arithmetic Conversion on… (PR #73105)

2023-11-22 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/73105 >From 6c02a92f2d2dbd426bf9e5fd34cc0f32203a0283 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 22 Nov 2023 12:25:20 +0100 Subject: [PATCH] [Clang] Implement P28646R2 Remove Deprecated Arithmetic Conver

[flang] [clang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-22 Thread Mats Petersson via cfe-commits
@@ -311,7 +311,7 @@ inline void createDefaultFIRCodeGenPassPipeline( if (config.VScaleMin != 0) pm.addPass(fir::createVScaleAttrPass({config.VScaleMin, config.VScaleMax})); - fir::addFIRToLLVMPass(pm, config.OptLevel); + fir::addFIRToLLVMPass(pm, config.OptLevel, conf

[flang] [clang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-22 Thread Mats Petersson via cfe-commits
@@ -242,10 +242,24 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts, clang::driver::options::OPT_fno_loop_versioning, false)) opts.LoopVersioning = 1; - opts.AliasAnalysis = - args.hasFlag(clang::driver::options::OPT_falias_

[clang] [flang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-22 Thread Tom Eccles via cfe-commits
@@ -242,10 +242,24 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts, clang::driver::options::OPT_fno_loop_versioning, false)) opts.LoopVersioning = 1; - opts.AliasAnalysis = - args.hasFlag(clang::driver::options::OPT_falias_

[clang] [llvm] Revert "Revert "[SVE2.1][Clang][LLVM]Add BFloat16 builtin in Clang an… (PR #73110)

2023-11-22 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett approved this pull request. LGTM, thank you for the fix! You'll know within ~15 minutes of landing whether there is still an issue, but I doubt there will be. https://github.com/llvm/llvm-project/pull/73110 ___ cfe-co

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-22 Thread via cfe-commits
@@ -1355,6 +1362,10 @@ unsigned UnwrappedLineFormatter::format( bool FixIndentation = (FixBadIndentation || ContinueFormatting) && Indent != TheLine.First->OriginalColumn; bool ShouldFormat = TheLine.Affected || FixIndentation; + +if (Style

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-22 Thread via cfe-commits
https://github.com/tomekpaszek updated https://github.com/llvm/llvm-project/pull/70338 >From b5ba0b3fde2c6662e19dfdf96a787621ec767460 Mon Sep 17 00:00:00 2001 From: Tomek Paszek Date: Sat, 11 Nov 2023 19:38:00 +0100 Subject: [PATCH 01/11] Added an option to ignore macro definitions. --- clang

[clang] [clang][dataflow] Clear `ExprToLoc` and `ExprToVal` at the start of a block. (PR #72985)

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

[clang] [clang-tools-extra] [llvm] Dont alter cold function alignment unless using Os (PR #72387)

2023-11-22 Thread Phil Camp via cfe-commits
FlameTop wrote: @pogo59 I agree that stating the PS ABI has an explicit function alignment unless overridden does negate the need for a new attribute. I will re-work the code to remove the new attribute and instead enforce it for the PS ABI target. https://github.com/llvm/llvm-project/pull/7

[clang] [llvm] Revert "Revert "[SVE2.1][Clang][LLVM]Add BFloat16 builtin in Clang an… (PR #73110)

2023-11-22 Thread via cfe-commits
https://github.com/CarolineConcatto closed https://github.com/llvm/llvm-project/pull/73110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang-tools-extra] [clang] [llvm] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-22 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 1/7] GETLOG runtime and extension implementation: get login username Ge

[clang-tools-extra] [clang-tidy] Add check hicpp-ignored-remove-result (PR #73119)

2023-11-22 Thread Björn Svensson via cfe-commits
https://github.com/bjosv created https://github.com/llvm/llvm-project/pull/73119 This check implements the [rule 17.5.1](https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/standard-library) of the HICPP standard which states: - Do not ignore the result of std::remove, st

[clang-tools-extra] [clang-tidy] Add check hicpp-ignored-remove-result (PR #73119)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Björn Svensson (bjosv) Changes This check implements the [rule 17.5.1](https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/standard-library) of the HICPP standard which states: - Do not ignore the result of std

[clang-tools-extra] [flang] [llvm] [clang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-22 Thread Kiran Chandramohan via cfe-commits
@@ -37,5 +80,17 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str = {}; + + int error = getlogi

[llvm] [clang-tools-extra] [flang] [clang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-22 Thread Kiran Chandramohan via cfe-commits
@@ -10,9 +10,52 @@ // extensions that will eventually be implemented in Fortran. #include "flang/Runtime/extensions.h" +#include "terminator.h" #include "flang/Runtime/command.h" #include "flang/Runtime/descriptor.h" #include "flang/Runtime/io-api.h" +#include "flang/Runtim

[llvm] [clang-tools-extra] [clang] [MCP] Enhance MCP copy Instruction removal for special case (PR #70778)

2023-11-22 Thread via cfe-commits
https://github.com/qcolombet approved this pull request. Thanks for your patience iterating through this. LGTM https://github.com/llvm/llvm-project/pull/70778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [APINotes] Upstream Driver and Frontend options that enable API Notes (PR #73120)

2023-11-22 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan created https://github.com/llvm/llvm-project/pull/73120 This upstreams more of the Clang API Notes functionality that is currently implemented in the Apple fork: https://github.com/apple/llvm-project/tree/next/clang/lib/APINotes >From 41f0d8ce31e656288cb5753c37282

[clang] [APINotes] Upstream Driver and Frontend options that enable API Notes (PR #73120)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Egor Zhdan (egorzhdan) Changes This upstreams more of the Clang API Notes functionality that is currently implemented in the Apple fork: https://github.com/apple/llvm-project/tree/next/clang/lib/APINotes --- Full diff: https://git

[clang] e5cc3da - [X86][AVX10] Add no-evex512 for MMX intrinsics, NFCI

2023-11-22 Thread Phoebe Wang via cfe-commits
Author: Phoebe Wang Date: 2023-11-22T21:59:30+08:00 New Revision: e5cc3da6a9077548f613eee3aacc5e7b017c81f3 URL: https://github.com/llvm/llvm-project/commit/e5cc3da6a9077548f613eee3aacc5e7b017c81f3 DIFF: https://github.com/llvm/llvm-project/commit/e5cc3da6a9077548f613eee3aacc5e7b017c81f3.diff L

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-22 Thread Ulrich Weigand via cfe-commits
@@ -1026,6 +1030,71 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module &M) { + if (auto *VersionVal = mdconst::extract_or_null( + M.getModuleFlag("zos_product_major_version"))) +return VersionVal

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-22 Thread Ulrich Weigand via cfe-commits
@@ -1026,6 +1030,71 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module &M) { + if (auto *VersionVal = mdconst::extract_or_null( + M.getModuleFlag("zos_product_major_version"))) +return VersionVal

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-22 Thread Ulrich Weigand via cfe-commits
@@ -1026,6 +1030,78 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module &M) { + if (auto *VersionVal = cast_or_null( + M.getModuleFlag("zos_product_major_version"))) +return cast(VersionVal->getVa

[clang-tools-extra] [llvm] [clang] [flang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-22 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 1/8] GETLOG runtime and extension implementation: get login username Ge

[clang-tools-extra] [llvm] [clang] [flang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-22 Thread Yi Wu via cfe-commits
@@ -37,5 +80,17 @@ void FORTRAN_PROCEDURE_NAME(getarg)( (void)RTNAME(GetCommandArgument)( n, &value, nullptr, nullptr, __FILE__, __LINE__); } + +void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) { + std::array str = {}; + + int error = getlogi

[clang-tools-extra] [llvm] [clang] [flang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-22 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 1/9] GETLOG runtime and extension implementation: get login username Ge

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-22 Thread Ulrich Weigand via cfe-commits
@@ -976,6 +976,46 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +getModule().addModuleFlag(llvm::Modu

[clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-22 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm created https://github.com/llvm/llvm-project/pull/73124 The flang driver was silently ignoring the `main()` function in `Fortran_main.a` for entry into the Fortran program unit if an external `main()` as supplied (e.g., via cross-language linkage with Fortran and C/C

[clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Klemm (mjklemm) Changes The flang driver was silently ignoring the `main()` function in `Fortran_main.a` for entry into the Fortran program unit if an external `main()` as supplied (e.g., via cross-language linkage with Fortran an

[clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Michael Klemm (mjklemm) Changes The flang driver was silently ignoring the `main()` function in `Fortran_main.a` for entry into the Fortran program unit if an external `main()` as supplied (e.g., via cross-language linkage with For

[clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-22 Thread Kiran Chandramohan via cfe-commits
@@ -1029,7 +1042,7 @@ void tools::addFortranRuntimeLibraryPath(const ToolChain &TC, ArgStringList &CmdArgs) { // Default to the /../lib directory. This works fine on the // platforms that we have tested so far. We will probably have

[clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-22 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/73124 >From ba38aec7ac04c63fd5167908fe7f91d6ac7bceed Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Wed, 22 Nov 2023 14:22:20 +0100 Subject: [PATCH 1/2] Let the linker fail on multiple definitions of main() --- c

[clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-22 Thread Michael Klemm via cfe-commits
@@ -1029,7 +1042,7 @@ void tools::addFortranRuntimeLibraryPath(const ToolChain &TC, ArgStringList &CmdArgs) { // Default to the /../lib directory. This works fine on the // platforms that we have tested so far. We will probably have

  1   2   3   4   >