[clang] [llvm] [X86][AVX10.2] Support AVX10.2 MOVZXC new Instructions. (PR #108537)

2024-09-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux-lnt` running on `systemz-1` while building `clang,llvm` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/136/builds/960 Here is the relevant piece of the bu

[clang] [Driver] Add toolchain for X86_64 UEFI target (PR #76838)

2024-09-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-linux-multistage` running on `ppc64le-clang-multistage-test` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/2986 Here is the

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Erich Keane via cfe-commits
@@ -324,6 +324,13 @@ class ASTContext : public RefCountedBase { /// This is lazily created. This is intentionally not serialized. mutable llvm::StringMap StringLiteralCache; + /// The next string literal "version" to allocate during constant evaluation. + /// This is us

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-19 Thread YunQiang Su via cfe-commits
wzssyqa wrote: > My understanding is that all of these `musl*` environments have been added to > GCC and LLVM on an as-needed basis for toolchains, not necessarily because > musl itself needs them. Do you have interesting to add them to GCC? I guess we need to add config.sub/config.guess firs

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-19 Thread YunQiang Su via cfe-commits
wzssyqa wrote: Sorry for the late comment. I find a problem. With the IR code like ``` define dso_local float @f1(float noundef %a, float noundef %b) local_unnamed_addr #0 { entry: %call = tail call float @llvm.minimumnum.f32(float noundef %a, float noundef %b) #2 ret float %call } `./bin/

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
https://github.com/zygoloid updated https://github.com/llvm/llvm-project/pull/109208 >From 81193568c17a89f6cf42f43a82fb1fbf0f90184d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 18 Sep 2024 21:59:56 + Subject: [PATCH 01/14] Implement current CWG direction for string literal compa

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
@@ -8573,7 +8661,10 @@ class LValueExprEvaluator bool VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *E); bool VisitCompoundLiteralExpr(const CompoundLiteralExpr *E); bool VisitMemberExpr(const MemberExpr *E); - bool VisitStringLiteral(const StringLiteral *

[clang] dab3c6d - [Clang] Change Attribute plugin to link clang-cpp like other examples (#109319)

2024-09-19 Thread via cfe-commits
Author: Thomas Fransham Date: 2024-09-20T08:05:59+03:00 New Revision: dab3c6d39458fcc0607c678263132d7ca184cddd URL: https://github.com/llvm/llvm-project/commit/dab3c6d39458fcc0607c678263132d7ca184cddd DIFF: https://github.com/llvm/llvm-project/commit/dab3c6d39458fcc0607c678263132d7ca184cddd.dif

[clang] [Clang] Change Attribute plugin to link clang-cpp like other examples (PR #109319)

2024-09-19 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/109319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Use X86AS::GS and X86AS::FS instead of 256 and 257. NFC (PR #109342)

2024-09-19 Thread Phoebe Wang via cfe-commits
@@ -144,6 +144,7 @@ add_clang_library(clangCodeGen VarBypassDetector.cpp DEPENDS + vt_gen phoebewang wrote: Why it depends? https://github.com/llvm/llvm-project/pull/109342 ___ cfe-commits mailing list cfe-com

[clang] [AST] Ensure getRawCommentsForAnyRedecl() does not miss any redecl with a comment (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/108475 >From 2b14e8063c21e32d771c3f82ec9fc2319a24d5a6 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 10 Sep 2024 22:34:55 -0400 Subject: [PATCH] [AST] Ensure getRawCommentsForAnyRedecl() does not miss an

[clang] [TableGen] Avoid repeated hash lookups (NFC) (PR #109372)

2024-09-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/109372 None >From b8009302e897f8759c18e74012ea8b4901a82481 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 19 Sep 2024 09:21:50 -0700 Subject: [PATCH] [TableGen] Avoid repeated hash lookups (NFC) --- cl

[clang-tools-extra] [clang-tidy] Avoid repeated hash lookups (NFC) (PR #109373)

2024-09-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/109373 None >From 68677c82b0c2d437be7926288249a043e5325ffe Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 19 Sep 2024 09:37:59 -0700 Subject: [PATCH] [clang-tidy] Avoid repeated hash lookups (NFC) ---

[clang] [AST] Ensure getRawCommentsForAnyRedecl() does not miss any redecl with a comment (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/108475 >From d224e1b658f56bf741cebf8dc5b2914716d9f47b Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 10 Sep 2024 22:34:55 -0400 Subject: [PATCH] [AST] Ensure getRawCommentsForAnyRedecl() does not miss an

[clang-tools-extra] [clang-move] Avoid repeated hash lookups (NFC) (PR #109374)

2024-09-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/109374 None >From 5e05b5835a639eb211a381b03057b8ff9f7be6df Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 19 Sep 2024 09:39:33 -0700 Subject: [PATCH] [clang-move] Avoid repeated hash lookups (NFC) ---

[clang] [AST] Ensure getRawCommentsForAnyRedecl() does not miss any redecl with a comment (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (Rebased) https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Avoid repeated hash lookups (NFC) (PR #109372)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/109372.diff 1 Files Affected: - (modified) clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp (+3-5) ``diff diff --git a/clang/uti

[clang-tools-extra] [clang-tidy] Avoid repeated hash lookups (NFC) (PR #109373)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/109373.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp (+1-2) ``diff di

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #109375)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes GlobalMethodPool, the type of MethodPool, is a type wrapping DenseMap and exposes only a subset of the DenseMap methods. This patch adds operator[] to GlobalMethodPool so that we can avoid repeated hash

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #109375)

2024-09-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/109375 GlobalMethodPool, the type of MethodPool, is a type wrapping DenseMap and exposes only a subset of the DenseMap methods. This patch adds operator[] to GlobalMethodPool so that we can avoid repeated hash l

[clang-tools-extra] [clang-move] Avoid repeated hash lookups (NFC) (PR #109374)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/109374.diff 1 Files Affected: - (modified) clang-tools-extra/clang-move/HelperDeclRefGraph.cpp (+1-2) ``diff diff --gi

[clang-tools-extra] [clang-tools-extra] Fix add_clang_library usage (PR #109321)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Thomas Fransham (fsfod) Changes If a add_clang_library call doesn't specify building as static or shared library they are implicitly added to the list static libraries that is linked in to clang-cpp shared library here. https://github.co

[clang] [Driver] Add toolchain for X86_64 UEFI target (PR #76838)

2024-09-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/6103 Here is the

[clang-tools-extra] [clang-tools-extra] Fix add_clang_library usage (PR #109321)

2024-09-19 Thread Thomas Fransham via cfe-commits
https://github.com/fsfod created https://github.com/llvm/llvm-project/pull/109321 If a add_clang_library call doesn't specify building as static or shared library they are implicitly added to the list static libraries that is linked in to clang-cpp shared library here. https://github.com/llvm/

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Erich Keane via cfe-commits
@@ -74,6 +74,22 @@ C++ Specific Potentially Breaking Changes template void f(); +- During constant evaluation, comparisons between different evaluations of the + same string literal are now correctly treated as non-constant, and comparisons + between string literal

[clang] [llvm] UEFI backend for x86_64 (PR #109320)

2024-09-19 Thread via cfe-commits
https://github.com/Prabhuk created https://github.com/llvm/llvm-project/pull/109320 Continuing the effort to support UEFI target as a first class citizen. The first backend I am trying to support here is x86_64. Original RFC: https://discourse.llvm.org/t/rfc-uefi-driver-support-uefi-target/73

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Erich Keane via cfe-commits
@@ -2142,11 +2150,81 @@ static const ValueDecl *GetLValueBaseDecl(const LValue &LVal) { return LVal.Base.dyn_cast(); } -static bool IsLiteralLValue(const LValue &Value) { - if (Value.getLValueCallIndex()) +// Information about an LValueBase that is some kind of string. +st

[clang] [Clang] Change Attribute plugin to link clang-cpp like other examples (PR #109319)

2024-09-19 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. This change looks reasonable to me. https://github.com/llvm/llvm-project/pull/109319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Thomas Köppe via cfe-commits
https://github.com/tkoeppe updated https://github.com/llvm/llvm-project/pull/109169 From 1149cbacb6b8376b6ed3d7651f0fa51360a67ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 18 Sep 2024 17:04:44 + Subject: [PATCH] [clang-tidy] Make modernize-use-nullptr matcher

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I'm happy once SOME level of solution for the index-starting-value is done (`NextStringLiteralVersion=rand()` 🤡). I think the avoided collisions is worth a touch of effort, but not much more. I think there is some concern from other

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,29 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer fmayer wrote: Sorry, the implication of my comment was: explain why in a comment, because

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/109169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,29 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer fmayer wrote: Thanks, otherwise this comment will only cause confusion. https://github.co

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Thomas Köppe via cfe-commits
@@ -84,6 +84,29 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer tkoeppe wrote: Sure, done. https://github.com/llvm/llvm-project/pull/109169 _

[clang] [llvm] adding clang codegen (PR #109331)

2024-09-19 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 8f21239c496cc4ce273bafb2c2dd5a22de16a0c3 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH] adding clang codegen --- clang/include/clang/Basic/Builtins

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-09-19 Thread via cfe-commits
goldsteinn wrote: > Reproducer: > > ``` > ; bin/opt -passes=inline reduced.ll -S > target datalayout = > "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" > target triple = "x86_64-unknown-linux-gnu" > > define i64 @caller(ptr %p1, ptr %p2) { > %1 = call i64 %

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/108475 >From 2b14e8063c21e32d771c3f82ec9fc2319a24d5a6 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 10 Sep 2024 22:34:55 -0400 Subject: [PATCH] [AST] Ensure getRawCommentsForAnyRedecl() does not miss an

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
@@ -440,14 +440,23 @@ const RawComment *ASTContext::getRawCommentForAnyRedecl( // Any redeclarations of D that we haven't checked for comments yet? // We can't use DenseMap::iterator directly since it'd get invalid. - auto LastCheckedRedecl = [this, CanonicalD]() -> const

[clang] [AMDGPU] Correctly use the auxiliary toolchain to include libc++ (PR #109366)

2024-09-19 Thread Shilei Tian via cfe-commits
shiltian wrote: The fix looks good. A test would be preferred. https://github.com/llvm/llvm-project/pull/109366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Thanks for the reviews! I'll add the release note shortly (need to update to a newer baseline first). https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
@@ -0,0 +1,99 @@ +//===- unittests/AST/RawCommentForDeclTestTest.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:

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Ensure getRawCommentsForAnyRedecl() does not miss any redecl with a comment (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Note, I also updated the commit message to reflect the new fix approach. https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-19 Thread Keith Packard via cfe-commits
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const ToolChain &TC, << A->getOption().getName() << Value << "sysreg global"; return; } +if (EffectiveTriple.isRISCV()) { + if (Value != "tls" && Value != "global") { ---

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-19 Thread Keith Packard via cfe-commits
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const ToolChain &TC, << A->getOption().getName() << Value << "sysreg global"; return; } +if (EffectiveTriple.isRISCV()) { + if (Value != "tls" && Value != "global") { +D.

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-19 Thread Keith Packard via cfe-commits
@@ -3664,12 +3680,18 @@ static void RenderSSPOptions(const Driver &D, const ToolChain &TC, << A->getOption().getName() << Value; return; } +if (EffectiveTriple.isRISCV() && (Offset <= -2048 || Offset >= 2048)) { keith-packard wrote: Do

[clang] [clang-tools-extra] [llvm] Remove clang-rename (PR #108988)

2024-09-19 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-tools-extra,clang,llvm,utils` at step 3 "clean-build-dir". Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/1020 Here is the rel

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
https://github.com/zygoloid updated https://github.com/llvm/llvm-project/pull/109208 >From 81193568c17a89f6cf42f43a82fb1fbf0f90184d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 18 Sep 2024 21:59:56 + Subject: [PATCH 01/13] Implement current CWG direction for string literal compa

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
zygoloid wrote: > I'm happy once SOME level of solution for the index-starting-value is done > (`NextStringLiteralVersion=rand()` 🤡). I think the avoided collisions is > worth a touch of effort, but not much more. Um. So. I added a test for this before I started working on a fix, and ... the

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-19 Thread Craig Topper via cfe-commits
@@ -0,0 +1,19 @@ +; RUN: llc -mtriple=riscv64-unknown-elf < %s | \ topperc wrote: Use `llvm/utils/update_llc_test_checks.py` to generate the checks. https://github.com/llvm/llvm-project/pull/108942 ___ cfe-commits mail

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Eli Friedman via cfe-commits
@@ -8573,7 +8661,10 @@ class LValueExprEvaluator bool VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *E); bool VisitCompoundLiteralExpr(const CompoundLiteralExpr *E); bool VisitMemberExpr(const MemberExpr *E); - bool VisitStringLiteral(const StringLiteral *

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-09-19 Thread via cfe-commits
goldsteinn wrote: > Okay, the bug is from the fact that we simplify the values in `VMap` which > can mean that even if `VMap.lookup(InnerCB)` exists, it doesn't imply that > `NewInnerCB` is actually the same function. This is really only an issue for > intrins which can simplify but is an acti

[clang] [llvm] adding clang codegen (PR #109331)

2024-09-19 Thread Sarah Spall via cfe-commits
@@ -18824,6 +18824,40 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: { retType, CGM.getHLSLRuntime().getSignIntrinsic(), ArrayRef{Op0}, nullptr, "hlsl.sign"); } + // This should only be called when targeting DXIL + case Builtin::BI__builtin_hlsl_asuint

[clang] [llvm] Tentative fix for not removing newly internal functions (PR #106146)

2024-09-19 Thread Greg Roth via cfe-commits
https://github.com/pow2clk updated https://github.com/llvm/llvm-project/pull/106146 >From 40224473a7b43bc4ffe2024ab51196c2130bedc7 Mon Sep 17 00:00:00 2001 From: Greg Roth Date: Sun, 25 Aug 2024 12:00:03 -0600 Subject: [PATCH] [DirectX] Remove trivially dead functions at linkage finalize Funct

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Greg Roth (pow2clk) Changes Functions are not removed even when made internal by DXILFinalizeLinkage The removal code is called from alwaysinliner and globalopt, which are invoked too early to remove functions made internal by this pass.

[clang] [llvm] Tentative fix for not removing newly internal functions (PR #106146)

2024-09-19 Thread Greg Roth via cfe-commits
https://github.com/pow2clk ready_for_review https://github.com/llvm/llvm-project/pull/106146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-19 Thread Greg Roth via cfe-commits
https://github.com/pow2clk edited https://github.com/llvm/llvm-project/pull/106146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-directx Author: Greg Roth (pow2clk) Changes Functions are not removed even when made internal by DXILFinalizeLinkage The removal code is called from alwaysinliner and globalopt, which are invoked too early to remove functions made internal by t

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-19 Thread Greg Roth via cfe-commits
https://github.com/pow2clk edited https://github.com/llvm/llvm-project/pull/106146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-19 Thread Xiang Li via cfe-commits
@@ -19,20 +19,20 @@ using namespace llvm; static bool finalizeLinkage(Module &M) { - SmallPtrSet EntriesAndExports; + SmallPtrSet Funcs; // Find all entry points and export functions for (Function &EF : M.functions()) { -if (!EF.hasFnAttribute("hlsl.shader") && !

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Greg Roth (pow2clk) Changes Functions are not removed even when made internal by DXILFinalizeLinkage The removal code is called from alwaysinliner and globalopt, which are invoked too early to remove functions made internal by this pass.

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-09-19 Thread Henrik G. Olsson via cfe-commits
@@ -443,6 +443,426 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { return false; } +AST_MATCHER_P(CallExpr, hasNumArgs, unsigned, Num) { + return Node.getNumArgs() == Num; +} + +namespace libc_func_matchers { +// Under `libc_func_matchers`, define a set of matche

[clang] [clang-format] Correctly annotate pointer/reference in `if` statement (PR #109370)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #60146. --- Full diff: https://github.com/llvm/llvm-project/pull/109370.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+13-21) - (modified) clang/unittests/Format/TokenAn

[clang] [clang-format] Correctly annotate pointer/reference in `if` statement (PR #109370)

2024-09-19 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/109370 Fixes #60146. >From bbe60a2126bd90835738485955fbe05f530afb6e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 19 Sep 2024 21:12:06 -0700 Subject: [PATCH] [clang-format] Correctly annotate pointer/reference in

[clang] [AST] Ensure getRawCommentsForAnyRedecl() does not miss any redecl with a comment (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add missing deps edge: CodeGenAction.cpp.o -> GenVT.inc (PR #109306)

2024-09-19 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/109306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
https://github.com/zygoloid updated https://github.com/llvm/llvm-project/pull/109208 >From 81193568c17a89f6cf42f43a82fb1fbf0f90184d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 18 Sep 2024 21:59:56 + Subject: [PATCH 01/12] Implement current CWG direction for string literal compa

[clang] c3fe727 - Add missing deps edge: CodeGenAction.cpp.o -> GenVT.inc (#109306)

2024-09-19 Thread via cfe-commits
Author: Evan Wilde Date: 2024-09-19T14:14:18-07:00 New Revision: c3fe727181818d3efdd2ce96598bfe6a2d3ffb83 URL: https://github.com/llvm/llvm-project/commit/c3fe727181818d3efdd2ce96598bfe6a2d3ffb83 DIFF: https://github.com/llvm/llvm-project/commit/c3fe727181818d3efdd2ce96598bfe6a2d3ffb83.diff LO

[clang] Add missing deps edge: CodeGenAction.cpp.o -> GenVT.inc (PR #109306)

2024-09-19 Thread Evan Wilde via cfe-commits
https://github.com/etcwilde closed https://github.com/llvm/llvm-project/pull/109306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-19 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/102975 >From f0801cb9e3caeb41a078bc091b9ed624695c83e4 Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Mon, 12 Aug 2024 14:32:08 -0600 Subject: [PATCH 1/6] [clang][flang][mlir] Support -frecord-command-line option

[clang] [analyzer] [MallocChecker] Fix Store modification in `checkPreCall` (PR #109337)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Pavel Skripkin (pskrgag) Changes This is small follow-up for #106081 While trying to add sanity check for `Enviroment` and `Store` being consistent during `checkPostCall` and `checkPreCall` I f

[clang] [llvm] adding clang codegen (PR #109331)

2024-09-19 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 0059eb9640cad23ef2a7178c6b0eca327f5db6da Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH] adding clang codegen --- clang/include/clang/Basic/Builtins

[clang] b3533a1 - [clang][flang][mlir] Support -frecord-command-line option (#102975)

2024-09-19 Thread via cfe-commits
Author: Tarun Prabhu Date: 2024-09-19T18:28:50-06:00 New Revision: b3533a156da92262eb19429d8c12f53e87f5ccec URL: https://github.com/llvm/llvm-project/commit/b3533a156da92262eb19429d8c12f53e87f5ccec DIFF: https://github.com/llvm/llvm-project/commit/b3533a156da92262eb19429d8c12f53e87f5ccec.diff

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-19 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu closed https://github.com/llvm/llvm-project/pull/102975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-19 Thread Peilin Ye via cfe-commits
https://github.com/peilin-ye updated https://github.com/llvm/llvm-project/pull/108636 >From 087c7eb6e5fdd6866ee5209ce9cea93864dd3c6d Mon Sep 17 00:00:00 2001 From: Peilin Ye Date: Thu, 15 Aug 2024 21:49:23 + Subject: [PATCH 1/3] [BPF] Refactor BPFSubtarget::initSubtargetFeatures() (NFC) R

[clang] [llvm] adding clang codegen (PR #109331)

2024-09-19 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From cb1ed6bead315b9d4982a27c53501c94981777ad Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH] adding clang codegen --- clang/include/clang/Basic/Builtins

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-19 Thread Peilin Ye via cfe-commits
peilin-ye wrote: (pushed v2 to resolve the easier issues first :-) - deleted redundant `CPU.empty()` check - for now, fall back to `ACQUIRE` and `RELEASE` if user requested weaker memory orders (`RELAXED` or `CONSUME`), until we actually support them - took Eduard's suggestion in #107343 to u

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-libcxx` running on `linaro-flang-aarch64-libcxx` while building `clang,flang,mlir` at step 6 "test-build-unified-tree-check-flang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/89/buil

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-19 Thread Alex Rønne Petersen via cfe-commits
alexrp wrote: > Do you have interesting to add them to GCC? I guess we need to add > config.sub/config.guess first. I would like to see the changes mirrored there, and code-wise it doesn't seem like a lot of work to do so. But, frankly, the contribution process for GCC (and the GNU ecosystem

[clang] 72a2180 - [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (#107664)

2024-09-19 Thread via cfe-commits
Author: Alex Rønne Petersen Date: 2024-09-20T08:53:03+08:00 New Revision: 72a218056d68b7aa65ab3eda56837117bb59f11a URL: https://github.com/llvm/llvm-project/commit/72a218056d68b7aa65ab3eda56837117bb59f11a DIFF: https://github.com/llvm/llvm-project/commit/72a218056d68b7aa65ab3eda56837117bb59f11a

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-19 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa closed https://github.com/llvm/llvm-project/pull/107664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-19 Thread YunQiang Su via cfe-commits
wzssyqa wrote: OK. Then I will work on GCC with this support. https://github.com/llvm/llvm-project/pull/107664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Correctly use the auxiliary toolchain to include libc++ (PR #109366)

2024-09-19 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/109366 Summary: Now that we have a functional build for `libc++` on the GPU, it will now find the target specific headers in `include/amdgcn-amd-amdhsa`. This is a problem for offloading via OpenMP because we need the C

[clang] [AMDGPU] Correctly use the auxiliary toolchain to include libc++ (PR #109366)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: Now that we have a functional build for `libc++` on the GPU, it will now find the target specific headers in `include/amdgcn-amd-amdhsa`. This is a problem for offloading via OpenMP because we need th

[clang] Reland "[Driver] Add toolchain for X86_64 UEFI target" (PR #109364)

2024-09-19 Thread via cfe-commits
https://github.com/Prabhuk edited https://github.com/llvm/llvm-project/pull/109364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-19 Thread Xiang Li via cfe-commits
https://github.com/python3kgae approved this pull request. https://github.com/llvm/llvm-project/pull/106146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] - Add libclangSerialization to clang driver unittests (PR #109329)

2024-09-19 Thread Pranav Bhandarkar via cfe-commits
bhandarkar-pranav wrote: > I just merged my revert PR #109340 I'll investigate further on the cause for > the warning that shows up in the build bots causing the test failure Sounds good. As you can see, my fix is unrelated to this issue that you are seeing which seems to be real issue worth i

[clang] Reland "[Driver] Add toolchain for X86_64 UEFI target" (PR #109364)

2024-09-19 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/109364 >From 5686cf3c8b4f2c9d92528d3d8b2d47e831600488 Mon Sep 17 00:00:00 2001 From: Prabhuk Date: Thu, 19 Sep 2024 19:53:59 -0700 Subject: [PATCH 1/2] Reland "[Driver] Add toolchain for X86_64 UEFI target (#76838)"

[clang] Reland "[Driver] Add toolchain for X86_64 UEFI target" (PR #109364)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Prabhuk (Prabhuk) Changes Reverts llvm/llvm-project#109340 Addressing the failed MAC Clang Driver test as part of this reland. --- Full diff: https://github.com/llvm/llvm-project/pull/109364.diff 10 Files Affected: - (modified) c

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-19 Thread Greg Roth via cfe-commits
https://github.com/pow2clk updated https://github.com/llvm/llvm-project/pull/106146 >From 40224473a7b43bc4ffe2024ab51196c2130bedc7 Mon Sep 17 00:00:00 2001 From: Greg Roth Date: Sun, 25 Aug 2024 12:00:03 -0600 Subject: [PATCH 1/2] [DirectX] Remove trivially dead functions at linkage finalize

[clang] Reland "[Driver] Add toolchain for X86_64 UEFI target" (PR #109364)

2024-09-19 Thread via cfe-commits
https://github.com/Prabhuk ready_for_review https://github.com/llvm/llvm-project/pull/109364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

2024-09-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux-multistage` running on `systemz-1` while building `clang,llvm,mlir` at step 11 "ninja check 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/98/builds/388 Here is the relevant pi

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: Same question for regular binary operators: ```c++ using VI __attribute__((ext_vector_type(4))) = int; constexpr int a() { VI a = {0, 0, 0, 0}; VI b = {1,1,1,1}; VI C = (a + b); return 0; } static_assert(a() == 0); ``` Also, might make sense to add them to `tes

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-09-19 Thread Jonas Paulsson via cfe-commits
@@ -9800,3 +9817,45 @@ SDValue SystemZTargetLowering::lowerVECREDUCE_ADD(SDValue Op, ISD::EXTRACT_VECTOR_ELT, DL, VT, DAG.getBitcast(OpVT, Op), DAG.getConstant(OpVT.getVectorNumElements() - 1, DL, MVT::i32)); } + +// Only consider a function fully internal as long

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Aaron Ballman via cfe-commits
@@ -2142,11 +2150,81 @@ static const ValueDecl *GetLValueBaseDecl(const LValue &LVal) { return LVal.Base.dyn_cast(); } -static bool IsLiteralLValue(const LValue &Value) { - if (Value.getLValueCallIndex()) +// Information about an LValueBase that is some kind of string. +st

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Aaron Ballman via cfe-commits
@@ -324,6 +324,13 @@ class ASTContext : public RefCountedBase { /// This is lazily created. This is intentionally not serialized. mutable llvm::StringMap StringLiteralCache; + /// The next string literal "version" to allocate during constant evaluation. + /// This is us

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Aaron Ballman via cfe-commits
@@ -2061,15 +2063,21 @@ static bool EvaluateIgnoredValue(EvalInfo &Info, const Expr *E) { return true; } -/// Should this call expression be treated as a no-op? -static bool IsNoOpCall(const CallExpr *E) { +/// Should this call expression be treated as forming an opaque con

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove feature sha1 from FMV. (PR #108383)

2024-09-19 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/108383 >From 50820f4f3ded438162a33eabca84c5077fd2a5aa Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 12 Sep 2024 13:55:24 +0100 Subject: [PATCH] [FMV][AArch64] Remove feature sha1 from FMV. Sha1 has

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-09-19 Thread Jonas Paulsson via cfe-commits
@@ -9800,3 +9817,45 @@ SDValue SystemZTargetLowering::lowerVECREDUCE_ADD(SDValue Op, ISD::EXTRACT_VECTOR_ELT, DL, VT, DAG.getBitcast(OpVT, Op), DAG.getConstant(OpVT.getVectorNumElements() - 1, DL, MVT::i32)); } + +// Only consider a function fully internal as long

[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

2024-09-19 Thread Nikita Popov via cfe-commits
@@ -5461,6 +5461,13 @@ std::string llvm::UpgradeDataLayoutString(StringRef DL, StringRef TT) { return Res; } + if (T.isSPARC()) { +// Add "-i128:128" +if (!DL.empty() && !DL.contains("-i128:128")) + Res.append("-i128:128"); +return Res; + } --

<    1   2   3   4   5   >