[clang] [Clang][SME2] Add single and multi min/max by vector builtins (PR #71707)

2023-11-08 Thread Sam Tebbs via cfe-commits
https://github.com/SamTebbs33 created https://github.com/llvm/llvm-project/pull/71707 Adds the following SME2 builtins: svminnm_single_f(16|32|64)_x(2|4) svminnm_f(16|32|64)_x(2|4) svmaxnm_single_f(16|32|64)_x(2|4) svmaxnm_f(16|32|64)_x(2|4) See [ARM-software/acle#217](https://github.com/ARM-s

[clang] [Clang][SME2] Add single and multi min/max by vector builtins (PR #71707)

2023-11-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sam Tebbs (SamTebbs33) Changes Adds the following SME2 builtins: svminnm_single_f(16|32|64)_x(2|4) svminnm_f(16|32|64)_x(2|4) svmaxnm_single_f(16|32|64)_x(2|4) svmaxnm_f(16|32|64)_x(2|4) See [ARM-software/acle#217](https://github.com/ARM-

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-08 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/71709 This patch refactors how values are stored inside `IdentifierInfo::ObjcOrBuiltinID` bit-field, and annotates it with `preferred_type`. In order to make the value easier to interpret by debuggers, a new `ObjCKey

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch refactors how values are stored inside `IdentifierInfo::ObjcOrBuiltinID` bit-field, and annotates it with `preferred_type`. In order to make the value easier to interpret by debuggers, a ne

[clang-tools-extra] [clangd][RFC] Add container field to remote index Refs grpc method (PR #71605)

2023-11-08 Thread via cfe-commits
https://github.com/tdupes updated https://github.com/llvm/llvm-project/pull/71605 >From d2a6bec499b7163cfa97104113d0b7e297fe2f92 Mon Sep 17 00:00:00 2001 From: dup Date: Fri, 3 Nov 2023 09:03:24 -0700 Subject: [PATCH] Add container field to remote index Refs grpc method --- clang-tools-extra/

[clang] [C++20] [Modules] Introduce thin BMI (PR #71622)

2023-11-08 Thread David Blaikie via cfe-commits
dwblaikie wrote: The words probably don't need to be short. Interface BMI Implementation BMI Seem like fine, accurate terms. I guess we could say "BMInterface" and "BMImplementation" but probably best to jus tgloss over "I" being "interface" and have "interface BMI" and "implementation BMI"

[clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-08 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/71706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-08 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Added reviewers from https://reviews.llvm.org/D127812, for the AArch64 side. https://github.com/llvm/llvm-project/pull/71706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-08 Thread Eli Friedman via cfe-commits
@@ -4098,8 +4098,26 @@ void CodeGenModule::emitMultiVersionFunctions() { } llvm::Constant *ResolverConstant = GetOrCreateMultiVersionResolver(GD); -if (auto *IFunc = dyn_cast(ResolverConstant)) +if (auto *IFunc = dyn_cast(ResolverConstant)) { ResolverCon

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-08 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The C equivalent to the C++11 rule is in 6.8.5, which says "An iteration statement may be assumed by the implementation to terminate if [...]". There's no general rule that a program has to make progress if there isn't a loop involved. https://github.com/llvm/llvm-projec

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-08 Thread Eli Friedman via cfe-commits
@@ -1482,6 +1477,11 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, } else llvm_unreachable("no definition for emitted function"); + // This is checked after emitting the function body so we know if there + // are any permitted infinite loops.

[clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-08 Thread via cfe-commits
@@ -4098,8 +4098,26 @@ void CodeGenModule::emitMultiVersionFunctions() { } llvm::Constant *ResolverConstant = GetOrCreateMultiVersionResolver(GD); -if (auto *IFunc = dyn_cast(ResolverConstant)) +if (auto *IFunc = dyn_cast(ResolverConstant)) { ResolverCon

[clang] [Clang] Fix linker error for function multiversioning (PR #71706)

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

[clang] [Clang] Fix linker error for function multiversioning (PR #71706)

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

[mlir] [openmp] [llvm] [clang] [OpenMP] Introduce the KernelLaunchEnvironment as implicit argument (PR #70401)

2023-11-08 Thread via cfe-commits
dhruvachak wrote: With reference to the performance degradation, this patch introduces an additional allocation/data-submit/deallocation for every kernel (GenericKernelTy::getKernelLaunchEnvironment(), PluginInterface.cpp). Analysis shows that this overhead appears to be the primary reason for

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-08 Thread David Truby via cfe-commits
DavidTruby wrote: > @DavidTruby please see my above retraction of the suggestion to rename > `.dynamic.lib` to `.dll.lib`. Ah, I missed that, I'll make that change back https://github.com/llvm/llvm-project/pull/70833 ___ cfe-commits mailing list cfe-

[clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-08 Thread via cfe-commits
elizabethandrews wrote: I ran some tests compiling TU1 and TU2 in various combinations of clang17, trunk and g++. TU1.cpp ``` int foo(); int main() { return foo(); } ``` TU2.cpp ``` #include __attribute__((target_clones("default", "arch=sapphirerapids"))) int foo() { std::cout<<"Hello

[clang] [clang-tools-extra] [llvm] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-11-08 Thread Bill Wendling via cfe-commits
bwendling wrote: @rapidsna Friendly ping. :-) https://github.com/llvm/llvm-project/pull/70606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow][NFC] Fix stale comments. (PR #71654)

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

[clang-tools-extra] [clang] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-08 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/70559 >From b29eb35fe8597ceefc4c615817174181a16f3c4c Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 28 Oct 2023 18:08:51 +0200 Subject: [PATCH 1/3] [clang-tidy] fi

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j edited https://github.com/llvm/llvm-project/pull/69371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Implement post-opt linking option for builtin bitocdes (PR #69371)

2023-11-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j edited https://github.com/llvm/llvm-project/pull/69371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Implement post-opt linking option for builtin bitocdes (PR #69371)

2023-11-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/69371 >From 0de3e4a4b460ba407da1acbcf4ef21916ded69e2 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 17 Oct 2023 12:01:15 -0700 Subject: [PATCH 1/3] [NFC] Refactor BackendConsumer class definition into new head

[clang] c6cf329 - [CodeGen] Implement post-opt linking option for builtin bitocdes (#69371)

2023-11-08 Thread via cfe-commits
Author: Jacob Lambert Date: 2023-11-08T10:53:49-08:00 New Revision: c6cf32950283f729dfe9a9b2626443d05e2cb1b1 URL: https://github.com/llvm/llvm-project/commit/c6cf32950283f729dfe9a9b2626443d05e2cb1b1 DIFF: https://github.com/llvm/llvm-project/commit/c6cf32950283f729dfe9a9b2626443d05e2cb1b1.diff

[clang] [CodeGen] Implement post-opt linking option for builtin bitocdes (PR #69371)

2023-11-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/69371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-11-08 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Fair enough - all seems a bit unfortunate to be pushing these attributes through to places they don't technically apply to (both complicates the implementation, and might be confusing to u

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Kamau Bridgeman via cfe-commits
@@ -1,11 +1,16 @@ -// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm < %s| FileCheck %s +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm < %s | FileCheck %s \ +// RUN: --check-prefix=CHECK-X86 +// RUN: %clang_cc1 -triple ppc64le-linux-gnu -emit-llvm < %s | File

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Kamau Bridgeman via cfe-commits
https://github.com/kamaub edited https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Kamau Bridgeman via cfe-commits
https://github.com/kamaub deleted https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Kamau Bridgeman via cfe-commits
@@ -210,6 +210,12 @@ let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.". [llvm_float_ty], [llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_vararg_ty], [IntrNoMem]>; + // Load of a value provided by the system library

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Kamau Bridgeman via cfe-commits
@@ -0,0 +1,80 @@ +#ifndef PPC_FEATURE kamaub wrote: Missing file description similar to the `head` of `clang/include/clang/Basic/Builtins.def` https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing li

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-08 Thread David Truby via cfe-commits
https://github.com/DavidTruby updated https://github.com/llvm/llvm-project/pull/70833 >From 9e84729cada6c032c64934ee519e605407aab049 Mon Sep 17 00:00:00 2001 From: David Truby Date: Tue, 31 Oct 2023 15:07:13 + Subject: [PATCH 1/8] [flang][windows] Add option to link against specific MSVC C

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-08 Thread Antonio Frighetto via cfe-commits
@@ -1482,6 +1477,11 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, } else llvm_unreachable("no definition for emitted function"); + // This is checked after emitting the function body so we know if there + // are any permitted infinite loops.

[flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-08 Thread David Truby via cfe-commits
DavidTruby wrote: I've also started the work to get linker option directives (like "/DEFAULTLIB") added to MLIR's LLVMIR dialect so that we can do this the correct way: see #71720. I'd still like to merge this patch first though for the incremental improvement it does provide. Then once the ML

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Amy Kwan via cfe-commits
@@ -2110,6 +2110,66 @@ static bool checkFPMathBuiltinElementType(Sema &S, SourceLocation Loc, return false; } +/// SemaBuiltinCpuSupports - Handle __builtin_cpu_supports(char *). +/// This checks that the target supports __builtin_cpu_supports and +/// that the string argum

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Amy Kwan via cfe-commits
@@ -2110,6 +2110,66 @@ static bool checkFPMathBuiltinElementType(Sema &S, SourceLocation Loc, return false; } +/// SemaBuiltinCpuSupports - Handle __builtin_cpu_supports(char *). +/// This checks that the target supports __builtin_cpu_supports and +/// that the string argum

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-08 Thread Eli Friedman via cfe-commits
@@ -1482,6 +1477,11 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, } else llvm_unreachable("no definition for emitted function"); + // This is checked after emitting the function body so we know if there + // are any permitted infinite loops.

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

2023-11-08 Thread Jun Wang via cfe-commits
@@ -1809,6 +1816,23 @@ bool SIInsertWaitcnts::shouldFlushVmCnt(MachineLoop *ML, return HasVMemLoad && UsesVgprLoadedOutside; } +bool SIInsertWaitcnts::insertWaitcntAfterMemOp(MachineFunction &MF) { + bool Modified = false; + + for (auto &MBB : MF) { jwangg

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

2023-11-08 Thread Jun Wang via cfe-commits
@@ -52,6 +52,11 @@ static cl::opt ForceEmitZeroFlag( cl::desc("Force all waitcnt instrs to be emitted as s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)"), cl::init(false), cl::Hidden); +static cl::opt +PreciseMemOpFlag("amdgpu-precise-memory-op", + cl::de

[clang] 955dd88 - Revert "Reland [clang] Canonicalize system headers in dependency file when -canonical-prefixes" (#71697)

2023-11-08 Thread via cfe-commits
Author: Arthur Eubanks Date: 2023-11-08T11:43:35-08:00 New Revision: 955dd8800b4745784bf6da948ec7992d5b75b4d7 URL: https://github.com/llvm/llvm-project/commit/955dd8800b4745784bf6da948ec7992d5b75b4d7 DIFF: https://github.com/llvm/llvm-project/commit/955dd8800b4745784bf6da948ec7992d5b75b4d7.diff

[clang] Revert "Reland [clang] Canonicalize system headers in dependency file when -canonical-prefixes" (PR #71697)

2023-11-08 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/71697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [compiler-rt] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-08 Thread Snehasish Kumar via cfe-commits
@@ -1441,6 +1531,9 @@ void OverlapStats::dump(raw_fd_ostream &OS) const { case IPVK_MemOPSize: strncpy(ProfileKindName, "MemOP", 19); break; +case IPVK_VTableTarget: + strncpy(ProfileKindName, "VTable", 6); snehasish wrote: I think thi

[compiler-rt] [llvm] [clang-tools-extra] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-08 Thread Snehasish Kumar via cfe-commits
@@ -1070,8 +1084,138 @@ void InstrProfiling::maybeSetComdat(GlobalVariable *GV, Function *Fn, GV->setLinkage(GlobalValue::InternalLinkage); } -GlobalVariable *InstrProfiling::setupProfileSection(InstrProfInstBase *Inc, -

[clang-tools-extra] [clang] [compiler-rt] [llvm] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-08 Thread Snehasish Kumar via cfe-commits
@@ -275,18 +282,28 @@ lprofWriteDataImpl(ProfDataWriter *Writer, const __llvm_profile_data *DataBegin, const uint64_t NumBitmapBytes = __llvm_profile_get_num_bitmap_bytes(BitmapBegin, BitmapEnd); const uint64_t NamesSize = __llvm_profile_get_name_size(NamesBegin, Na

[clang] [clang-tools-extra] [llvm] [compiler-rt] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-08 Thread Snehasish Kumar via cfe-commits
@@ -1070,8 +1084,138 @@ void InstrProfiling::maybeSetComdat(GlobalVariable *GV, Function *Fn, GV->setLinkage(GlobalValue::InternalLinkage); } -GlobalVariable *InstrProfiling::setupProfileSection(InstrProfInstBase *Inc, -

[llvm] [clang] [clang-tools-extra] [compiler-rt] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-08 Thread Snehasish Kumar via cfe-commits
@@ -489,30 +520,66 @@ class InstrProfSymtab { /// \p IterRange. This interface is used by IndexedProfReader. template Error create(const NameIterRange &IterRange); - /// Update the symtab by adding \p FuncName to the table. This interface - /// is used by the raw and t

[llvm] [clang] [compiler-rt] [clang-tools-extra] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-08 Thread Snehasish Kumar via cfe-commits
@@ -12,27 +12,78 @@ #ifndef LLVM_ANALYSIS_INDIRECTCALLVISITOR_H #define LLVM_ANALYSIS_INDIRECTCALLVISITOR_H +#include "llvm/ADT/SetVector.h" #include "llvm/IR/InstVisitor.h" #include namespace llvm { -// Visitor class that finds all indirect call. +// Visitor class that

[compiler-rt] [clang-tools-extra] [llvm] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-08 Thread Snehasish Kumar via cfe-commits
@@ -123,19 +137,29 @@ static int needsCounterPadding(void) { COMPILER_RT_VISIBILITY void __llvm_profile_get_padding_sizes_for_counters( uint64_t DataSize, uint64_t CountersSize, uint64_t NumBitmapBytes, -uint64_t NamesSize, uint64_t *PaddingBytesBeforeCounters, -uin

[clang] [clang-tools-extra] [compiler-rt] [llvm] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-08 Thread Snehasish Kumar via cfe-commits
@@ -453,11 +471,94 @@ Error InstrProfSymtab::create(Module &M, bool InLTO) { if (Error E = addFuncWithName(F, getPGOFuncName(F, InLTO))) return E; } + + SmallVector Types; + for (GlobalVariable &G : M.globals()) { +if (!G.hasName()) + continue; +Types

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

2023-11-08 Thread Liviu Ionescu via cfe-commits
ilg-ul wrote: Can someone review this patch? Exactly the same strategy (check if the desired subfolder is below `InstalledDir`, and, if not, check again below `Dir`), so this patch is consistent with the rest of the code. https://github.com/llvm/llvm-project/pull/70817 __

[clang] [flang] [flang] add fveclib flag (PR #71734)

2023-11-08 Thread Tom Eccles via cfe-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/71734 -fveclib= allows users to choose a vectorized libm so that loops containing math functions are vectorized. This is implemented as much as possible in the same way as in clang. The driver test in veclib.f90 is copi

[clang] [flang] [flang] add fveclib flag (PR #71734)

2023-11-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Tom Eccles (tblah) Changes -fveclib= allows users to choose a vectorized libm so that loops containing math functions are vectorized. This is implemented as much as possible in the same way as in clang. T

[clang] [compiler-rt] [llvm] [Profile] Refactor profile correlation. (PR #70856)

2023-11-08 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > If you omit the data and names sections from the object files, then > __llvm_profile_end_data() - __llvm_profile_begin_data() and > __llvm_profile_end_names() - __llvm_profile_begin_names() are both 0 and > there's no need for [special casing this in the > runtime](https://g

[clang] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-08 Thread Owen Pan via cfe-commits
@@ -325,6 +325,7 @@ output of a unified diff and reformats all contained lines with The name of the predefined style used as a fallback in case clang-format is invoked with-style=file, but can not find the .clang-formatfile t

[clang] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-08 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/70883 >From 646cabcf167facb63c78277b50ea62afbc61b3c0 Mon Sep 17 00:00:00 2001 From: Conrad Donahue Date: Tue, 31 Oct 2023 21:55:27 -0400 Subject: [PATCH 1/3] Add ability for clang-format-diff to exit with non-0 status

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: Initial group code review comments. https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Amy Kwan via cfe-commits
@@ -2110,6 +2110,66 @@ static bool checkFPMathBuiltinElementType(Sema &S, SourceLocation Loc, return false; } +/// SemaBuiltinCpuSupports - Handle __builtin_cpu_supports(char *). +/// This checks that the target supports __builtin_cpu_supports and +/// that the string argum

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Amy Kwan via cfe-commits
@@ -359,6 +359,13 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { bool isSPRegName(StringRef RegName) const override { return RegName.equals("r1") || RegName.equals("x1"); } + + // We support __builtin_cpu_supports/__builtin_cpu_is on targets that

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-08 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/70883 >From 646cabcf167facb63c78277b50ea62afbc61b3c0 Mon Sep 17 00:00:00 2001 From: Conrad Donahue Date: Tue, 31 Oct 2023 21:55:27 -0400 Subject: [PATCH 1/4] Add ability for clang-format-diff to exit with non-0 status

[clang] [Driver][LTO] Copy fix empty stats filename to AIX (PR #71738)

2023-11-08 Thread via cfe-commits
https://github.com/diggerlin created https://github.com/llvm/llvm-project/pull/71738 copy implement of https://github.com/llvm/llvm-project/pull/71359 to AIX.cpp and add test scenario >From 592e0de1d87ad5dbfc7a1fb80974546ce161c02f Mon Sep 17 00:00:00 2001 From: zhijian Date: Wed, 8 Nov 2023 1

[clang] [Driver][LTO] Copy fix empty stats filename to AIX (PR #71738)

2023-11-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (diggerlin) Changes copy implement of https://github.com/llvm/llvm-project/pull/71359 to AIX.cpp and add test scenario --- Full diff: https://github.com/llvm/llvm-project/pull/71738.diff 2 Files Affected: - (modified) clang/lib/Dr

[clang] [Driver][LTO] Copy fix empty stats filename to AIX (PR #71738)

2023-11-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: None (diggerlin) Changes copy implement of https://github.com/llvm/llvm-project/pull/71359 to AIX.cpp and add test scenario --- Full diff: https://github.com/llvm/llvm-project/pull/71738.diff 2 Files Affected: - (modified) clang

[clang] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-08 Thread Owen Pan via cfe-commits
@@ -95,6 +95,12 @@ def main(): default="clang-format", help="location of binary to use for clang-format", ) +parser.add_argument( +"-non-zero-exit-code", +action="store_true", +default=False, +help="exit with a non-zero st

[clang] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-08 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/70883 >From 646cabcf167facb63c78277b50ea62afbc61b3c0 Mon Sep 17 00:00:00 2001 From: Conrad Donahue Date: Tue, 31 Oct 2023 21:55:27 -0400 Subject: [PATCH 1/5] Add ability for clang-format-diff to exit with non-0 status

[clang] [Driver][LTO] Copy fix empty stats filename to AIX (PR #71738)

2023-11-08 Thread via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/71738 >From 592e0de1d87ad5dbfc7a1fb80974546ce161c02f Mon Sep 17 00:00:00 2001 From: zhijian Date: Wed, 8 Nov 2023 11:27:30 -0500 Subject: [PATCH 1/2] [Driver][LTO] Copy fix empty stats filename to AIX --- clang/lib

[clang] [Clang] Fix a crash when using ast-dump=json (PR #70224)

2023-11-08 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann edited https://github.com/llvm/llvm-project/pull/70224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix a crash when using ast-dump=json (PR #70224)

2023-11-08 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann approved this pull request. I added a minor suggested change for the release note, but this otherwise looks good to me. https://github.com/llvm/llvm-project/pull/70224 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [Clang] Fix a crash when using ast-dump=json (PR #70224)

2023-11-08 Thread Tom Honermann via cfe-commits
@@ -697,6 +697,8 @@ Miscellaneous Clang Crashes Fixed `Issue 64564 `_ - Fixed a crash when an ObjC ivar has an invalid type. See (`#68001 `_) +- Fixed a crash when ``-ast-dum

[clang] [clang-format] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

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

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-11-08 Thread Tom Honermann via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [Driver][LTO] Copy fix empty stats filename to AIX (PR #71738)

2023-11-08 Thread Qiongsi Wu via cfe-commits
@@ -32,6 +32,14 @@ // CHECK-LTO: "-o" "obj/dir{{/|}}save-stats.exe" // CHECK-LTO: "-plugin-opt=stats-file=save-stats.stats" + +// RUN: %clang --target=powerpc-unknown-aix -save-stats -flto -o obj/dir/save-stats %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-AIX-LTO +//

[clang] [Driver][BoundsSafety] Add -fexperimental-bounds-safety flag (PR #70480)

2023-11-08 Thread Dan Liew via cfe-commits
@@ -3618,6 +3618,27 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts, GenerateArg(Consumer, OPT_frandomize_layout_seed_EQ, Opts.RandstructSeed); } +static void CheckBoundsSafetyLang(InputKind IK, DiagnosticsEngine &Diags) { delcyph

[clang] [Driver][BoundsSafety] Add -fexperimental-bounds-safety flag (PR #70480)

2023-11-08 Thread Dan Liew via cfe-commits
@@ -3618,6 +3618,27 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts, GenerateArg(Consumer, OPT_frandomize_layout_seed_EQ, Opts.RandstructSeed); } +static void CheckBoundsSafetyLang(InputKind IK, DiagnosticsEngine &Diags) { delcyph

[clang] [Driver][LTO] Copy fix empty stats filename to AIX (PR #71738)

2023-11-08 Thread via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/71738 >From 592e0de1d87ad5dbfc7a1fb80974546ce161c02f Mon Sep 17 00:00:00 2001 From: zhijian Date: Wed, 8 Nov 2023 11:27:30 -0500 Subject: [PATCH 1/3] [Driver][LTO] Copy fix empty stats filename to AIX --- clang/lib

[clang] [Driver][LTO] Copy fix empty stats filename to AIX (PR #71738)

2023-11-08 Thread via cfe-commits
@@ -32,6 +32,14 @@ // CHECK-LTO: "-o" "obj/dir{{/|}}save-stats.exe" // CHECK-LTO: "-plugin-opt=stats-file=save-stats.stats" + +// RUN: %clang --target=powerpc-unknown-aix -save-stats -flto -o obj/dir/save-stats %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-AIX-LTO +//

[llvm] [openmp] [clang] ReworkCtorDtor (PR #71739)

2023-11-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/71739 - [NVPTX] Allow the ctor/dtor lowering pass to emit kernels - [OpenMP] Rework handling of global ctor/dtors in OpenMP >From c1505a29d542bebd5c5e81d231e633c518b08caf Mon Sep 17 00:00:00 2001 From: Joseph Huber D

[llvm] [clang] [openmp] ReworkCtorDtor (PR #71739)

2023-11-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/71739 >From 6be02dce45d672dd358bc277c97815cb201c4d0b Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 7 Nov 2023 17:12:31 -0600 Subject: [PATCH] [OpenMP] Rework handling of global ctor/dtors in OpenMP Summary: T

[llvm] [openmp] [clang] ReworkCtorDtor (PR #71739)

2023-11-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes - [NVPTX] Allow the ctor/dtor lowering pass to emit kernels - [OpenMP] Rework handling of global ctor/dtors in OpenMP --- Patch is 57.79 KiB, truncated to 20.00 KiB below, full version: https://github.com/

[clang] [llvm] [openmp] ReworkCtorDtor (PR #71739)

2023-11-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Joseph Huber (jhuber6) Changes - [NVPTX] Allow the ctor/dtor lowering pass to emit kernels - [OpenMP] Rework handling of global ctor/dtors in OpenMP --- Patch is 57.79 KiB, truncated to 20.00 KiB below, full version: https://git

[llvm] [clang-tools-extra] [clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-11-08 Thread Yeoul Na via cfe-commits
@@ -859,53 +860,93 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, } if (IsDynamic) { -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = -getLangOpts().getStrictFlexArraysLevel(); +// The code generated here calculates

[llvm] [openmp] [clang] ReworkCtorDtor (PR #71739)

2023-11-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/71739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-08 Thread Louis Dionne via cfe-commits
https://github.com/ldionne requested changes to this pull request. I think this is generally reasonable but I'm requesting a few changes. https://github.com/llvm/llvm-project/pull/70817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

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

2023-11-08 Thread Louis Dionne via cfe-commits
@@ -2494,6 +2494,19 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs( << "\"\n"; } +// Check for the folder where the executable is located, if different. +if (getDriver().getInstalledDir() != getDriver().Dir) { + InstallBin = llvm::StringR

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

2023-11-08 Thread Louis Dionne via cfe-commits
@@ -2494,6 +2494,19 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs( << "\"\n"; } +// Check for the folder where the executable is located, if different. +if (getDriver().getInstalledDir() != getDriver().Dir) { + InstallBin = llvm::StringR

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

2023-11-08 Thread Louis Dionne via cfe-commits
@@ -2494,6 +2494,19 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs( << "\"\n"; ldionne wrote: Please update the documentation above: ``` // On Darwin, libc++ can be installed in one of the following places: // 1. Alongside the compiler in

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

2023-11-08 Thread Louis Dionne via cfe-commits
@@ -2494,6 +2494,19 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs( << "\"\n"; } +// Check for the folder where the executable is located, if different. ldionne wrote: ```suggestion // (2) Check for the folder where the execu

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

2023-11-08 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/70817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-11-08 Thread Yeoul Na via cfe-commits
@@ -859,53 +860,93 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, } if (IsDynamic) { -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = -getLangOpts().getStrictFlexArraysLevel(); +// The code generated here calculates

[clang] [llvm] [openmp] ReworkCtorDtor (PR #71739)

2023-11-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/71739 >From a9f8285ecef2d43c6ccd87a1be9f795d566ed9e8 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 7 Nov 2023 17:12:31 -0600 Subject: [PATCH] [OpenMP] Rework handling of global ctor/dtors in OpenMP Summary: T

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

2023-11-08 Thread Liviu Ionescu via cfe-commits
@@ -2494,6 +2494,19 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs( << "\"\n"; } +// Check for the folder where the executable is located, if different. +if (getDriver().getInstalledDir() != getDriver().Dir) { + InstallBin = llvm::StringR

[llvm] [clang-tools-extra] [clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-11-08 Thread Bill Wendling via cfe-commits
@@ -859,53 +860,93 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, } if (IsDynamic) { -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = -getLangOpts().getStrictFlexArraysLevel(); +// The code generated here calculates

[clang] [llvm] [clang-tools-extra] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-11-08 Thread Bill Wendling via cfe-commits
@@ -859,53 +860,93 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, } if (IsDynamic) { -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = -getLangOpts().getStrictFlexArraysLevel(); +// The code generated here calculates

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-08 Thread Antonio Frighetto via cfe-commits
@@ -1482,6 +1477,11 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, } else llvm_unreachable("no definition for emitted function"); + // This is checked after emitting the function body so we know if there + // are any permitted infinite loops.

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

2023-11-08 Thread Jon Roelofs via cfe-commits
@@ -2494,6 +2494,19 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs( << "\"\n"; } +// Check for the folder where the executable is located, if different. +if (getDriver().getInstalledDir() != getDriver().Dir) { + InstallBin = llvm::StringR

[clang] [llvm] [openmp] ReworkCtorDtor (PR #71739)

2023-11-08 Thread Artem Belevich via cfe-commits
@@ -95,7 +95,7 @@ using namespace llvm; static cl::opt LowerCtorDtor("nvptx-lower-global-ctor-dtor", cl::desc("Lower GPU ctor / dtors to globals on the device."), - cl::init(false), cl::Hidden); + cl::init(true), cl::Hidde

[clang] [llvm] [openmp] ReworkCtorDtor (PR #71739)

2023-11-08 Thread Joseph Huber via cfe-commits
@@ -95,7 +95,7 @@ using namespace llvm; static cl::opt LowerCtorDtor("nvptx-lower-global-ctor-dtor", cl::desc("Lower GPU ctor / dtors to globals on the device."), - cl::init(false), cl::Hidden); + cl::init(true), cl::Hidde

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-08 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/71452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[openmp] [llvm] [clang] ReworkCtorDtor (PR #71739)

2023-11-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/71739 >From 159031c4c880e552ea90ec8ab6f6ed328c09ff10 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 7 Nov 2023 17:12:31 -0600 Subject: [PATCH] [OpenMP] Rework handling of global ctor/dtors in OpenMP Summary: T

[openmp] [llvm] [clang] ReworkCtorDtor (PR #71739)

2023-11-08 Thread Artem Belevich via cfe-commits
@@ -95,7 +95,7 @@ using namespace llvm; static cl::opt LowerCtorDtor("nvptx-lower-global-ctor-dtor", cl::desc("Lower GPU ctor / dtors to globals on the device."), - cl::init(false), cl::Hidden); + cl::init(true), cl::Hidde

<    1   2   3   4   5   >