[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-20 Thread via cfe-commits
@@ -1959,9 +2064,12 @@ multiclass VCMLA_ROTS { let isLaneQ = 1 in { // vcmla{ROT}_laneq + // ACLE specifies that the fp16 vcmla_#ROT_laneq variant has an immedaite range of 0 <= lane <= 1. + // fp16 is the only variant for which these two differ. + /

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2024-08-20 Thread Nabeel Omer via cfe-commits
https://github.com/omern1 updated https://github.com/llvm/llvm-project/pull/101962 >From 14f3cb82f0d7e69261bd7e1317bd66392e9a2c2b Mon Sep 17 00:00:00 2001 From: Nabeel Omer Date: Mon, 5 Aug 2024 11:50:18 +0100 Subject: [PATCH 1/8] [MC] Emit a jump table size section This patch will make LLVM e

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,256 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -std=c++20 -verify %s +// These are in a separate file because errors (e.g. incompatible attributes) currently prevent +// the FXAnalysis pass from running at all. + +// This diagnostic is re-enabled a

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,1199 @@ +//=== EffectAnalysis.cpp - Sema warnings for function effects -===// +// +// 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: A

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,1199 @@ +//=== EffectAnalysis.cpp - Sema warnings for function effects -===// +// +// 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: A

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,1199 @@ +//=== EffectAnalysis.cpp - Sema warnings for function effects -===// +// +// 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: A

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,1199 @@ +//=== EffectAnalysis.cpp - Sema warnings for function effects -===// +// +// 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: A

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,1199 @@ +//=== EffectAnalysis.cpp - Sema warnings for function effects -===// +// +// 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: A

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/99656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-08-20 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786 >From c8b31f1e1d1d30cb8523772d3fd15a0358c540d6 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Tue, 20 Aug 2024 04:37:20 -0700 Subject: [PATCH 1/4] [RISC-V] Make EmitRISCVCpuSupports accept multiple features This p

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-08-20 Thread Piyou Chen via cfe-commits
BeMg wrote: Rebase and stack on https://github.com/llvm/llvm-project/pull/104917 https://github.com/llvm/llvm-project/pull/85786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Hazard3 Core as taped out for RP2350 (PR #102452)

2024-08-20 Thread Michael Maitland via cfe-commits
https://github.com/michaelmaitland approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/102452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-08-20 Thread via cfe-commits
@@ -0,0 +1,216 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --default-march nvptx64 --version 5 +; RUN: llc < %s -march=nvptx64 -mcpu=sm_32 | FileCheck %s --check-prefixes=SM30,CHECK +; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcp

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-20 Thread via cfe-commits
@@ -1,444 +1,596 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios -target-feature +neon \ -// RUN:-target-feature +v8.3a \ -// RUN:-target-feature +fullfp16 \ -// RUN:-disable-O0-optnone -emit-llvm -o - %s | opt -S -O1 | FileCheck %s +// NOTE: Assertions hav

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/91895 >From f602189e20d15d7805b40f60b9383c83117b7d04 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 20 Aug 2024 13:23:52 +0100 Subject: [PATCH 1/3] [Clang] Add __builtin_is_within_lifetime to implement P2641

[clang] [clang][NFC] Split invalid-cpu-note tests (PR #104601)

2024-08-20 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Totally worth it, thanks! https://github.com/llvm/llvm-project/pull/104601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread via cfe-commits
@@ -169,14 +169,14 @@ def note_constexpr_this : Note< def access_kind : TextSubstitution< "%select{read of|read of|assignment to|increment of|decrement of|" "member call on|dynamic_cast of|typeid applied to|construction of|" - "destruction of}0">; + "destruction of|read o

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread via cfe-commits
@@ -1844,6 +1844,44 @@ static ExprResult BuiltinLaunder(Sema &S, CallExpr *TheCall) { return TheCall; } +static ExprResult BuiltinIsWithinLifetime(Sema &S, CallExpr *TheCall) { + if (S.checkArgCount(TheCall, 1)) +return ExprError(); + + ExprResult Arg = S.DefaultFunct

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #101024)

2024-08-20 Thread Abhina Sree via cfe-commits
@@ -532,9 +532,371 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation +//===

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-08-20 Thread via cfe-commits
@@ -3324,6 +3359,20 @@ llvm::Constant *CodeGenFunction::EmitCheckTypeDescriptor(QualType T) { DiagnosticsEngine::ak_qualtype, (intptr_t)T.getAsOpaquePtr(), StringRef(), StringRef(), std::nullopt, Buffer, std::nullopt); + if (IsBitInt) { +// The Structure is:

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-08-20 Thread via cfe-commits
https://github.com/earnol edited https://github.com/llvm/llvm-project/pull/96240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-08-20 Thread via cfe-commits
https://github.com/earnol edited https://github.com/llvm/llvm-project/pull/96240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/91895 >From f602189e20d15d7805b40f60b9383c83117b7d04 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 20 Aug 2024 13:23:52 +0100 Subject: [PATCH 1/4] [Clang] Add __builtin_is_within_lifetime to implement P2641

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread Mital Ashok via cfe-commits
@@ -169,14 +169,14 @@ def note_constexpr_this : Note< def access_kind : TextSubstitution< "%select{read of|read of|assignment to|increment of|decrement of|" "member call on|dynamic_cast of|typeid applied to|construction of|" - "destruction of}0">; + "destruction of|read o

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread via cfe-commits
@@ -0,0 +1,256 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -std=c++20 -verify %s +// These are in a separate file because errors (e.g. incompatible attributes) currently prevent +// the FXAnalysis pass from running at all. + +// This diagnostic is re-enabled a

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/91895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread via cfe-commits
@@ -169,14 +169,14 @@ def note_constexpr_this : Note< def access_kind : TextSubstitution< "%select{read of|read of|assignment to|increment of|decrement of|" "member call on|dynamic_cast of|typeid applied to|construction of|" - "destruction of}0">; + "destruction of|read o

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/91895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 27e5f50 - [Driver] Make ffp-model=fast honor non-finite-values, introduce ffp-model=aggressive (#100453)

2024-08-20 Thread via cfe-commits
Author: Andy Kaylor Date: 2024-08-20T07:11:29-07:00 New Revision: 27e5f505e5eee3da27c1515d6ed95d66fbe543ea URL: https://github.com/llvm/llvm-project/commit/27e5f505e5eee3da27c1515d6ed95d66fbe543ea DIFF: https://github.com/llvm/llvm-project/commit/27e5f505e5eee3da27c1515d6ed95d66fbe543ea.diff L

[clang] [Driver] Make ffp-model=fast honor non-finite-values, introduce ffp-model=aggressive (PR #100453)

2024-08-20 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/100453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2024-08-20 Thread Saleem Abdulrasool via cfe-commits
@@ -2764,6 +2770,27 @@ void AsmPrinter::emitJumpTableInfo() { for (const MachineBasicBlock *MBB : JTBBs) emitJumpTableEntry(MJTI, MBB, JTI); } + + if (EmitJumpTableSizesSection && TM.getTargetTriple().isOSBinFormatELF() && compnerd wrote: Outside

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2024-08-20 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,97 @@ +; RUN: llc %s -o - -emit-jump-table-sizes-section -verify-machineinstrs --relocation-model=pic | FileCheck --check-prefix=CHECK %s +; RUN: llc %s -o - -verify-machineinstrs --relocation-model=pic | FileCheck --check-prefix=NOFLAG %s compnerd wr

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,256 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -std=c++20 -verify %s +// These are in a separate file because errors (e.g. incompatible attributes) currently prevent +// the FXAnalysis pass from running at all. + +// This diagnostic is re-enabled a

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread via cfe-commits
@@ -0,0 +1,256 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -std=c++20 -verify %s +// These are in a separate file because errors (e.g. incompatible attributes) currently prevent +// the FXAnalysis pass from running at all. + +// This diagnostic is re-enabled a

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread via cfe-commits
cor3ntin wrote: @MitalAshok will you need me to merge? https://github.com/llvm/llvm-project/pull/91895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8f4f3df - Reenable anon structs (#104922)

2024-08-20 Thread via cfe-commits
Author: Daniel Grumberg Date: 2024-08-20T15:36:46+01:00 New Revision: 8f4f3df3c0ffc22c09d9201980a88ebb8aecc8f8 URL: https://github.com/llvm/llvm-project/commit/8f4f3df3c0ffc22c09d9201980a88ebb8aecc8f8 DIFF: https://github.com/llvm/llvm-project/commit/8f4f3df3c0ffc22c09d9201980a88ebb8aecc8f8.dif

[clang] Reenable anon structs (PR #104922)

2024-08-20 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/104922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix printing preprocessed tokens and macros (PR #104964)

2024-08-20 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo created https://github.com/llvm/llvm-project/pull/104964 None >From dc37b356fb9527c3b4cf6b31f55d2dd5067fc29d Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Tue, 20 Aug 2024 16:25:15 +0200 Subject: [PATCH 1/2] [clang-repl] Fix printing preprocessed tokens --- cl

[clang] [clang][bytecode] Fix 'if consteval' in non-constant contexts (PR #104707)

2024-08-20 Thread via cfe-commits
@@ -4368,8 +4363,19 @@ template bool Compiler::visitIfStmt(const IfStmt *IS) { if (!visitDeclStmt(CondDecl)) return false; - if (!this->visitBool(IS->getCond())) -return false; + // Compile condition. + if (IS->isNonNegatedConsteval()) { +if (!this->emit

[clang] [clang-repl] Fix printing preprocessed tokens and macros (PR #104964)

2024-08-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jonas Hahnfeld (hahnjo) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/104964.diff 2 Files Affected: - (modified) clang/lib/Frontend/PrintPreprocessedOutput.cpp (+4-6) - (added) clang/test/Interpreter/preprocessor.cp

[clang] [clang-repl] Fix printing preprocessed tokens and macros (PR #104964)

2024-08-20 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM, @hahnjo! Thank you! https://github.com/llvm/llvm-project/pull/104964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @cor3ntin I will, yes. But this probably at least needs some libc++ reviewers https://github.com/llvm/llvm-project/pull/91895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread Younan Zhang via cfe-commits
@@ -285,7 +286,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, // If this function was instantiated from a specialized member that is // a function template, we're done. assert(Function->getPrimaryTemplate() && "No function template?"); -

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,256 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -std=c++20 -verify %s +// These are in a separate file because errors (e.g. incompatible attributes) currently prevent +// the FXAnalysis pass from running at all. + +// This diagnostic is re-enabled a

[clang] 1c3955f - [clang][OpenMP] Fix typo in comment, NFC

2024-08-20 Thread Krzysztof Parzyszek via cfe-commits
Author: Krzysztof Parzyszek Date: 2024-08-20T10:07:19-05:00 New Revision: 1c3955f9dff9b653be88d5dea5bc3cd007904e90 URL: https://github.com/llvm/llvm-project/commit/1c3955f9dff9b653be88d5dea5bc3cd007904e90 DIFF: https://github.com/llvm/llvm-project/commit/1c3955f9dff9b653be88d5dea5bc3cd007904e90

[clang] [clang][AIX] Fix -print-runtime-dir on AIX (PR #104806)

2024-08-20 Thread Jake Egan via cfe-commits
https://github.com/jakeegan updated https://github.com/llvm/llvm-project/pull/104806 >From 11f5d09315140772877bd460e72a3ddeeceb5641 Mon Sep 17 00:00:00 2001 From: Jake Egan Date: Mon, 19 Aug 2024 11:08:24 -0400 Subject: [PATCH 1/2] [clang][AIX] Fix -print-runtime-dir on AIX --- clang/lib/Driv

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,256 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -std=c++20 -verify %s +// These are in a separate file because errors (e.g. incompatible attributes) currently prevent +// the FXAnalysis pass from running at all. + +// This diagnostic is re-enabled a

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread via cfe-commits
@@ -285,7 +286,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, // If this function was instantiated from a specialized member that is // a function template, we're done. assert(Function->getPrimaryTemplate() && "No function template?"); -

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/99656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen][SPIR-V][AMDGPU] Tweak AMDGCNSPIRV ABI to allow for the correct handling of aggregates passed to kernels / functions. (PR #102776)

2024-08-20 Thread Alex Voicu via cfe-commits
AlexVlx wrote: @VyacheslavLevytskyy @michalpaszkowski any objections / thoughts on this? https://github.com/llvm/llvm-project/pull/102776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang][CodeGen][SPIR-V][AMDGPU] Tweak AMDGCNSPIRV ABI to allow for the correct handling of aggregates passed to kernels / functions. (PR #102776)

2024-08-20 Thread Vyacheslav Levytskyy via cfe-commits
VyacheslavLevytskyy wrote: > @VyacheslavLevytskyy @michalpaszkowski any objections / thoughts on this? Thank you for pinging me. I have no objections and no valuable advices wrt. this particular subject. https://github.com/llvm/llvm-project/pull/102776 _

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,256 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -std=c++20 -verify %s +// These are in a separate file because errors (e.g. incompatible attributes) currently prevent +// the FXAnalysis pass from running at all. + +// This diagnostic is re-enabled a

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread Younan Zhang via cfe-commits
@@ -285,7 +286,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, // If this function was instantiated from a specialized member that is // a function template, we're done. assert(Function->getPrimaryTemplate() && "No function template?"); -

[clang] [clang][ASTMatcher] Fix execution order of hasOperands submatchers (PR #104148)

2024-08-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/104148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f9e2a86 - [clang][ASTMatcher] Fix execution order of hasOperands submatchers (#104148)

2024-08-20 Thread via cfe-commits
Author: Nicolas van Kempen Date: 2024-08-20T11:44:13-04:00 New Revision: f9e2a86b2e852dbed027e6aea5b48f32f2415b13 URL: https://github.com/llvm/llvm-project/commit/f9e2a86b2e852dbed027e6aea5b48f32f2415b13 DIFF: https://github.com/llvm/llvm-project/commit/f9e2a86b2e852dbed027e6aea5b48f32f2415b13.

[clang] [clang][ASTMatcher] Fix execution order of hasOperands submatchers (PR #104148)

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

[clang] [HLSL] Add __builtin_hlsl_is_scalarized_layout_compatible (PR #102227)

2024-08-20 Thread Aaron Ballman via cfe-commits
@@ -1142,3 +1142,85 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { } return false; } + +static void BuildFlattenedTypeList(QualType BaseTy, + llvm::SmallVectorImpl &List) { + llvm::SmallVector WorkList

[clang] [HLSL] Add __builtin_hlsl_is_scalarized_layout_compatible (PR #102227)

2024-08-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/102227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-20 Thread Doug Wyatt via cfe-commits
@@ -5137,47 +5137,41 @@ StringRef FunctionEffect::name() const { llvm_unreachable("unknown effect kind"); } -bool FunctionEffect::canInferOnFunction(const Decl &Callee) const { +std::optional FunctionEffect::effectProhibitingInference( +const Decl &Callee, const Function

[clang] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

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

[clang] clang/AMDGPU: Emit atomicrmw from {global|flat}_atomic_fadd_v2f16 builtins (PR #96873)

2024-08-20 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: ping https://github.com/llvm/llvm-project/pull/96873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang/AMDGPU: Emit atomicrmw from {global|flat}_atomic_fadd_v2f16 builtins (PR #96873)

2024-08-20 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/96873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-20 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/101882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-20 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/101882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-20 Thread Owen Pan via cfe-commits
@@ -5475,6 +5475,14 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, return true; } + // Ignores the first parameter as this will be handled separately by + // BreakFunctionDefinitionParameters or AlignAfterOpenBracket. + if (FormatStyle::BPPS_Alway

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-20 Thread Owen Pan via cfe-commits
@@ -134,6 +134,19 @@ template <> struct ScalarEnumerationTraits { } }; +template <> +struct ScalarEnumerationTraits { + static void enumeration(IO &IO, FormatStyle::BinPackParametersStyle &Value) { +IO.enumCase(Value, "OnePerLine", FormatStyle::BPPS_OnePerLine); +I

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-20 Thread Owen Pan via cfe-commits
@@ -8925,6 +8925,97 @@ TEST_F(FormatTest, FormatsOneParameterPerLineIfNecessary) { NoBinPacking); } +TEST_F(FormatTest, FormatsDeclarationBreakAlways) { + FormatStyle BreakAlways = getGoogleStyle(); + BreakAlways.BinPackParameters = FormatStyle::BPPS_AlwaysOnePerLine;

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-20 Thread Owen Pan via cfe-commits
@@ -403,13 +416,25 @@ TEST_F(FormatTestComments, UnderstandsBlockComments) { verifyFormat("f(/* aa = */\n" " );"); - FormatStyle NoBinPacking = getLLVMStyle(); - NoBinPacking.BinPackParamet

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-20 Thread Owen Pan via cfe-commits
@@ -1192,20 +1192,36 @@ struct FormatStyle { /// \version 3.7 bool BinPackArguments; - /// If ``false``, a function declaration's or function definition's - /// parameters will either all be on the same line or will have one line each. - /// \code - /// true: - ///

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-20 Thread Owen Pan via cfe-commits
@@ -436,6 +435,19 @@ TEST(ConfigParseTest, ParsesConfiguration) { CHECK_PARSE("BreakBeforeInheritanceComma: true", BreakInheritanceList, FormatStyle::BILS_BeforeComma); + Style.BinPackParameters = FormatStyle::BPPS_BinPack; + CHECK_PARSE("BinPackParameters: O

[clang] [libc] [llvm] [NVPTX] Implement variadic functions using IR lowering (PR #96015)

2024-08-20 Thread Tom Honermann via cfe-commits
tahonermann wrote: For historical reference, @jhuber6 backed out the change to `NVPTXTargetInfo::getBuiltinVaListKind()` in https://github.com/llvm/llvm-project/pull/100438 (commit https://github.com/llvm/llvm-project/commit/fb1e077982e90e715058188fa667ea5dd8027a98) https://github.com/llvm/ll

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-20 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/105043 Also, don't insert a space after ::* for method pointers. See https://github.com/llvm/llvm-project/pull/86253#issuecomment-2298404887. Fixes #100841. >From 4aa47d190a84ecd0432dc9b6db1d38b296f4df23 Mon Sep 17 00

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Also, don't insert a space after ::* for method pointers. See https://github.com/llvm/llvm-project/pull/86253#issuecomment-2298404887. Fixes #100841. --- Full diff: https://github.com/llvm/llvm-project/pu

[clang] [clang][bytecode] Fix 'if consteval' in non-constant contexts (PR #104707)

2024-08-20 Thread Timm Baeder via cfe-commits
@@ -4368,8 +4363,19 @@ template bool Compiler::visitIfStmt(const IfStmt *IS) { if (!visitDeclStmt(CondDecl)) return false; - if (!this->visitBool(IS->getCond())) -return false; + // Compile condition. + if (IS->isNonNegatedConsteval()) { +if (!this->emit

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread via cfe-commits
@@ -285,7 +286,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, // If this function was instantiated from a specialized member that is // a function template, we're done. assert(Function->getPrimaryTemplate() && "No function template?"); -

[clang] [clang] Add support for omitting only global destructors (PR #104899)

2024-08-20 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang -### -c -fc++-static-destructors=all %s 2>&1 | FileCheck --check-prefix ALL %s +// RUN: %clang -### -c -fc++-static-destructors %s 2>&1 | FileCheck --check-prefix ALL %s +// RUN: %clang -### -c -fc++-static-destructors=none %s 2>&1 | FileCheck --

[clang] [clang] Add support for omitting only global destructors (PR #104899)

2024-08-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/104899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for omitting only global destructors (PR #104899)

2024-08-20 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang -### -c -fc++-static-destructors=all %s 2>&1 | FileCheck --check-prefix ALL %s MaskRay wrote: thx for adding a driver test. The previous `-fc++-static-destructors` patch https://reviews.llvm.org/D50994 did not come with a driver

[clang] [clang] Add support for omitting only global destructors (PR #104899)

2024-08-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. LGTM! (I'm starting a 3-week vacation this Friday and will have limited availability.) https://github.com/llvm/llvm-project/pull/104899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [clang] Add support for omitting only global destructors (PR #104899)

2024-08-20 Thread Fangrui Song via cfe-commits
@@ -7967,8 +7967,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, options::OPT_fno_keep_persistent_storage_variables); Args.addOptInFlag(CmdArgs, options::OPT_fcomplete_member_pointers, options::OPT_fno_complete_membe

[clang] [clang][CodeGen][SPIR-V][AMDGPU] Tweak AMDGCNSPIRV ABI to allow for the correct handling of aggregates passed to kernels / functions. (PR #102776)

2024-08-20 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/102776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-08-20 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @eddyz87 , > > just create a new PR with the changes and make the cross references between > this PR and the new one to let people easy find the original PR when > necessary. Yup, this is the typical process (GitHub doesn't let you reopen a merged PR). https://github.co

[clang] [clang][bytecode] Fix 'if consteval' in non-constant contexts (PR #104707)

2024-08-20 Thread via cfe-commits
@@ -4368,8 +4363,19 @@ template bool Compiler::visitIfStmt(const IfStmt *IS) { if (!visitDeclStmt(CondDecl)) return false; - if (!this->visitBool(IS->getCond())) -return false; + // Compile condition. + if (IS->isNonNegatedConsteval()) { +if (!this->emit

[clang] [Clang] CWG722: nullptr to ellipses (PR #104704)

2024-08-20 Thread via cfe-commits
cor3ntin wrote: @MitalAshok should we merge? https://github.com/llvm/llvm-project/pull/104704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-08-20 Thread via cfe-commits
https://github.com/gonzalobg edited https://github.com/llvm/llvm-project/pull/99646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-08-20 Thread via cfe-commits
https://github.com/gonzalobg approved this pull request. I think this is good to go and we should merge as is. https://github.com/llvm/llvm-project/pull/99646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [Clang] CWG722: nullptr to ellipses (PR #104704)

2024-08-20 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @cor3ntin Yes, there's no more planned for this pr. Thanks in advance! https://github.com/llvm/llvm-project/pull/104704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] 0e24686 - [Clang] CWG722: nullptr to ellipses (#104704)

2024-08-20 Thread via cfe-commits
Author: Mital Ashok Date: 2024-08-20T18:31:52+02:00 New Revision: 0e24686af49d2f9e50438d3a27db6f1ade594855 URL: https://github.com/llvm/llvm-project/commit/0e24686af49d2f9e50438d3a27db6f1ade594855 DIFF: https://github.com/llvm/llvm-project/commit/0e24686af49d2f9e50438d3a27db6f1ade594855.diff L

[clang] [Clang] CWG722: nullptr to ellipses (PR #104704)

2024-08-20 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/104704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2351 `void{}` (PR #78060)

2024-08-20 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78060 >From 6ed7cad5d4993603221c3d9a777463675d69643b Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 13 Jan 2024 18:03:15 + Subject: [PATCH 1/4] [SemaCXX] Implement CWG2351 `void{}` --- clang/docs/Releas

[clang] [clang][modules] Built-in modules are not correctly enabled for Mac Catalyst (PR #104872)

2024-08-20 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: /cherry-pick 4c5ef6690040383956461828457ac27f7f912edb b9864387d9d00e1d4888181460d05dbc92364d75 https://github.com/llvm/llvm-project/pull/104872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang][modules] Built-in modules are not correctly enabled for Mac Catalyst (PR #104872)

2024-08-20 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#105093 https://github.com/llvm/llvm-project/pull/104872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-08-20 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 updated https://github.com/llvm/llvm-project/pull/101073 >From 39208a7b73893d1eef2078b3d212c92eb58e4457 Mon Sep 17 00:00:00 2001 From: Chris Warner Date: Wed, 17 Jul 2024 11:22:39 -0700 Subject: [PATCH 1/4] [clang-tidy] bugprone-implicit-widening ignores unsigned

[clang] [llvm] [HLSL] Implement support for HLSL intrinsic - saturate (PR #104619)

2024-08-20 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/104619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6a38e19 - [HLSL] Implement support for HLSL intrinsic - saturate (#104619)

2024-08-20 Thread via cfe-commits
Author: S. Bharadwaj Yadavalli Date: 2024-08-20T12:46:33-04:00 New Revision: 6a38e19c92ed09eeecb70d5f61c3b822acb4964d URL: https://github.com/llvm/llvm-project/commit/6a38e19c92ed09eeecb70d5f61c3b822acb4964d DIFF: https://github.com/llvm/llvm-project/commit/6a38e19c92ed09eeecb70d5f61c3b822acb49

[clang] [llvm] [HLSL] Implement support for HLSL intrinsic - saturate (PR #104619)

2024-08-20 Thread S. Bharadwaj Yadavalli via cfe-commits
https://github.com/bharadwajy closed https://github.com/llvm/llvm-project/pull/104619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Map `omp_default_mem_alloc` to global memory (PR #104790)

2024-08-20 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert approved this pull request. LG https://github.com/llvm/llvm-project/pull/104790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e0326b6 - [OpenMP] Map `omp_default_mem_alloc` to global memory (#104790)

2024-08-20 Thread via cfe-commits
Author: Joseph Huber Date: 2024-08-20T12:00:41-05:00 New Revision: e0326b668efda1d4ed7969c1a6cca44a487d24b6 URL: https://github.com/llvm/llvm-project/commit/e0326b668efda1d4ed7969c1a6cca44a487d24b6 DIFF: https://github.com/llvm/llvm-project/commit/e0326b668efda1d4ed7969c1a6cca44a487d24b6.diff

[clang] [llvm] [OpenMP] Map `omp_default_mem_alloc` to global memory (PR #104790)

2024-08-20 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/104790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISC-V] Make EmitRISCVCpuSupports accept multiple features (PR #104917)

2024-08-20 Thread Craig Topper via cfe-commits
@@ -32,6 +32,8 @@ struct RISCVExtensionBitmask { }; } // namespace RISCVExtensionBitmaskTable +static constexpr unsigned RISCVFeatureBitSize = 2; topperc wrote: The RISCV prefix on this seems redundant since it is in the RISCV namespace. https://github.com/l

<    1   2   3   4   >