[clang] [Clang][Driver] Merge the different strategies of how libc++ is included (PR #83721)

2024-03-05 Thread Fangrui Song via cfe-commits
@@ -705,6 +705,47 @@ class ToolChain { AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const; + struct IncludeStrategy { +enum AvailabilityOptions { + // Check whether the director

[clang] Revert "[Driver] Default riscv*- triples to -fdebug-default-version=4" (PR #84119)

2024-03-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/84119 This reverts commit bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6 (https://reviews.llvm.org/D157663). With this change, the next major release 19.1 will generate R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 relocations, wh

[clang] Revert "[Driver] Default riscv*- triples to -fdebug-default-version=4" (PR #84119)

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

[clang] [Driver,CrossWindows] Remove -isystem-after (PR #84121)

2024-03-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/84121 Commit 88879e6559a3ae8593e32568900707b1dbf3f060 added -isystem-after (not in GCC) for CrossWindows (see 543a78b55ee993c2977fc2984f278f7ec0125765; *-windows-itanium). I have heard two reports that the documented op

[clang] [llvm] [Driver] Default -msmall-data-limit= to 0 and clean up code (PR #83093)

2024-03-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: Ping:) https://github.com/llvm/llvm-project/pull/83093 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/84098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Fangrui Song via cfe-commits
@@ -2799,6 +2799,34 @@ counter's true frequency will need to be provided by the user. Query for this feature with ``__has_builtin(__builtin_readsteadycounter)``. +``__builtin_cpu_supports`` +-- + +**Syntax**: + +.. code-block:: c++ + + int __builtin_

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

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

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Fangrui Song via cfe-commits
@@ -2799,6 +2799,34 @@ counter's true frequency will need to be provided by the user. Query for this feature with ``__has_builtin(__builtin_readsteadycounter)``. +``__builtin_cpu_supports`` +-- + +**Syntax**: + +.. code-block:: c++ + + int __builtin_

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Fangrui Song via cfe-commits
@@ -2799,6 +2799,34 @@ counter's true frequency will need to be provided by the user. Query for this feature with ``__has_builtin(__builtin_readsteadycounter)``. +``__builtin_cpu_supports`` +-- + +**Syntax**: + +.. code-block:: c++ + + int __builtin_

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Fangrui Song via cfe-commits
@@ -2799,6 +2799,34 @@ counter's true frequency will need to be provided by the user. Query for this feature with ``__has_builtin(__builtin_readsteadycounter)``. +``__builtin_cpu_supports`` +-- + +**Syntax**: + +.. code-block:: c++ + + int __builtin_

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Fangrui Song via cfe-commits
@@ -2799,6 +2799,34 @@ counter's true frequency will need to be provided by the user. Query for this feature with ``__has_builtin(__builtin_readsteadycounter)``. +``__builtin_cpu_supports`` +-- + +**Syntax**: + +.. code-block:: c++ + + int __builtin_

[clang] [Driver,CrossWindows] Remove -isystem-after (PR #84121)

2024-03-06 Thread Fangrui Song via cfe-commits
MaskRay wrote: > I'm not so sure that it is that simple. `-idirafter` and `-isystem-after` > have slightly different semantics. They impact ordering and warning > suppression. If there are alternative flags that can be used to control > those, that might be reasonable. Do we know the users o

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-06 Thread Fangrui Song via cfe-commits
@@ -740,7 +740,8 @@ bool tools::isTLSDESCEnabled(const ToolChain &TC, SupportedArgument = V == "desc" || V == "trad"; EnableTLSDESC = V == "desc"; } else if (Triple.isX86()) { -SupportedArgument = V == "gnu"; +SupportedArgument = V == "gnu" || V == "gnu2"; +

[clang] a331937 - [MC] Move CompressDebugSections/RelaxELFRelocations from TargetOptions/MCAsmInfo to MCTargetOptions

2024-03-06 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-03-06T23:19:59-08:00 New Revision: a3319371970b599ef65ef1567c440fbdc3a330f4 URL: https://github.com/llvm/llvm-project/commit/a3319371970b599ef65ef1567c440fbdc3a330f4 DIFF: https://github.com/llvm/llvm-project/commit/a3319371970b599ef65ef1567c440fbdc3a330f4.diff

[clang] [Clang][NFC] Remove '--' separator in the linker wrapper usage (PR #84253)

2024-03-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: If a LLVMOption users needs to parse `--`, DashDashParsing from https://reviews.llvm.org/D152286 is better :) https://github.com/llvm/llvm-project/pull/84253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [Clang][NFC] Remove '--' separator in the linker wrapper usage (PR #84253)

2024-03-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/84253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Remove '--' separator in the linker wrapper usage (PR #84253)

2024-03-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: > [NFC] >From a strict interpretation, this is not NFC as this changes clang driver >behavior. The overall behavior combining clang + clang-linker-wrapper may not >change, though... https://github.com/llvm/llvm-project/pull/84253 ___

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay requested changes to this pull request. This needs sign-off from Apple reviewers whether the version table in Darwin.cpp is correct. https://github.com/llvm/llvm-project/pull/83774 ___ cfe-commits mailing list cfe-commits@li

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-07 Thread Fangrui Song via cfe-commits
@@ -7105,10 +7105,15 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.addOptInFlag(CmdArgs, options::OPT_frelaxed_template_template_args, options::OPT_fno_relaxed_template_template_args); - // -fsized-deallocation is off by default,

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

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

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2024-03-07 Thread Fangrui Song via cfe-commits
@@ -123,6 +123,15 @@ // CHECK-CHAR8_T_: "-fno-char8_t" +// RUN: %clang_cl /TC /dev/null /E -Xclang -dM 2> /dev/null | FileCheck -match-full-lines %s --check-prefix=NOSTDC MaskRay wrote: Driver tests usually only do `-###` and check the generated cc1 options

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2024-03-07 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,11 @@ +// Note: %s must be preceded by --, otherwise it may be interpreted as a +// command-line option, e.g. on Mac where %s is commonly under /Users. +// +// Note: see also cl-zc.cpp + +// RUN: %clang_cl /TC /dev/null /E -Xclang -dM /Zc:__STDC__- 2>&1 | FileCheck %s

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: There are many `--no-offload-new-driver` test changes. They can be pre-committed to make this default flip modify fewer files. https://github.com/llvm/llvm-project/pull/84420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [Driver,BareMetal] Replace -lclang_rt.builtins{,-$arch}.a with an absolute path (PR #82424)

2024-03-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Hi, this broke our downstream. What is the motivation for this, and how is > this intended to be used with compiler-rt locations being set by > multilib.yaml? We have something similar to what ARM does for multilibs.yaml > but with different paths, and this prevents the driver

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > There are many `--no-offload-new-driver` test changes. They can be > > pre-committed to make this default flip modify fewer files. > > I think it's much easier to keep these in a single patch, both for writing > and with any potential reverting that it may require. Since ll

[libcxx] [libcxxabi] [libunwind] [libcxx, libcxxabi, libunwind] Prefer -fvisibility-global-new-delete=force-hidden (PR #84917)

2024-03-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/84917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Improve error when a compiler-rt library is not found (PR #81037)

2024-02-23 Thread Fangrui Song via cfe-commits
MaskRay wrote: @tru After related improvements this uncovered, this patch should be good to review. https://github.com/llvm/llvm-project/pull/81037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang] Update -Wformat warnings for fixed-point format specifiers (PR #82855)

2024-02-23 Thread Fangrui Song via cfe-commits
MaskRay wrote: Do you know a libc implementation that actually implements `%k` `%r` and who are the potential users? From a quick glance, gcc avr supports fixed-point types but avr-libc doesn't seem to support %k %r. https://github.com/llvm/llvm-project/pull/82855 _

[clang] [clang] Update -Wformat warnings for fixed-point format specifiers (PR #82855)

2024-02-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/82855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

2024-02-24 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,26 @@ +/* === vadefs.h ---=== + * + * 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: Apache

[clang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

2024-02-24 Thread Fangrui Song via cfe-commits
MaskRay wrote: I am not familiar with the MSVC ecosystem, but the change looks reasonable. Thanks! https://github.com/llvm/llvm-project/pull/75711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-02-24 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,16 @@ +// REQUIRES: arm-registered-target + +// RUN: %clang -flto -target thumbv7m-unknown-unknown-eabi -mbranch-protection=pac-ret %s -S -o - 2>&1 | FileCheck %s MaskRay wrote: prefer `--target=` for new tests For codegen tests we prefer `%clang_cc

[clang] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-02-24 Thread Fangrui Song via cfe-commits
@@ -138,58 +163,79 @@ void run_foo_tml() { // CHECK: resolver_return1: // CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlEv._Mfrintts // CHECK: resolver_else2: -// CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlEv +// CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlE

[clang] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-02-24 Thread Fangrui Song via cfe-commits
@@ -138,58 +163,79 @@ void run_foo_tml() { // CHECK: resolver_return1: // CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlEv._Mfrintts // CHECK: resolver_else2: -// CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlEv +// CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlE

[clang] [Driver] Improve error when a compiler-rt library is not found (PR #81037)

2024-02-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/81037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Unify InstalledDir and Dir (PR #80527)

2024-02-26 Thread Fangrui Song via cfe-commits
MaskRay wrote: Ping:) https://github.com/llvm/llvm-project/pull/80527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver] Default -msmall-data-limit= to 0 and clean up code (PR #83093)

2024-02-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/83093 D57497 added -msmall-data-limit= as an alias for -G and defaulted it to 8 for -fno-pic/-fpie. The behavior is already different from GCC in a few ways: * GCC doesn't accept -G. * GCC -fpie doesn't seem to use -m

[clang] [llvm] MIPS/clang: Fix asm constraint for softfloat (PR #79116)

2024-02-26 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,25 @@ +; RUN: llc -march=mips < %s | FileCheck %s --check-prefix=MIPS32 +; RUN: llc -march=mips64 < %s | FileCheck %s --check-prefix=MIPS64 + +define dso_local void @read_double(ptr nocapture noundef readonly %0) local_unnamed_addr #0 { + %2 = load double, ptr %0, a

[clang] [llvm] MIPS/clang: Fix asm constraint for softfloat (PR #79116)

2024-02-26 Thread Fangrui Song via cfe-commits
@@ -238,6 +238,9 @@ class LLVM_LIBRARY_VISIBILITY MipsTargetInfo : public TargetInfo { case 'd': // Equivalent to "r" unless generating MIPS16 code. case 'y': // Equivalent to "r", backward compatibility only. case 'f': // floating-point registers. + if (*Name

[clang] [llvm] MIPS/clang: Fix asm constraint for softfloat (PR #79116)

2024-02-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/79116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] MIPS/clang: Fix asm constraint for softfloat (PR #79116)

2024-02-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/79116 >From 14ea44a352d547f3c2736f16a47f3dad449446f5 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Tue, 23 Jan 2024 18:14:48 +0800 Subject: [PATCH 1/2] MIPS/clang: Fix asm constraint for softfloat This include 2 fi

[clang] [llvm] MIPS/clang: Fix asm constraint for softfloat (PR #79116)

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

[clang] [llvm] MIPS: Fix asm constraints "f" and "r" for softfloat (PR #79116)

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

[clang] [llvm] MIPS: Fix asm constraints "f" and "r" for softfloat (PR #79116)

2024-02-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/79116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Allow -fbasic-block-address-map for AArch64 ELF (PR #82662)

2024-02-27 Thread Fangrui Song via cfe-commits
@@ -1,4 +1,5 @@ // RUN: %clang -### -target x86_64 -fbasic-block-address-map %s -S 2>&1 | FileCheck -check-prefix=CHECK-PRESENT %s +// RUN: %clang -### -target aarch64 -fbasic-block-address-map %s -S 2>&1 | FileCheck -check-prefix=CHECK-PRESENT %s MaskRay wrote

[clang] [Driver] Allow -fbasic-block-address-map for AArch64 ELF (PR #82662)

2024-02-27 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/82662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[CLANG][DWARF] Do not emit -ggnu-pubnames for split dwarf version 5." (PR #83214)

2024-02-27 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/83214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-02-27 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,165 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc < %s -mtriple=i686-unknown-unknown --relocation-model=pic -enable-tlsdesc | FileCheck %s --check-prefix=X86 MaskRay wrote: `-unkno

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-02-27 Thread Fangrui Song via cfe-commits
@@ -18515,17 +18515,17 @@ X86TargetLowering::LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const { return LowerGlobalOrExternal(Op, DAG, /*ForCall=*/false); } -static SDValue -GetTLSADDR(SelectionDAG &DAG, SDValue Chain, GlobalAddressSDNode *GA, - SDValue *InG

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-02-27 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,165 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc < %s -mtriple=i686-unknown-unknown --relocation-model=pic -enable-tlsdesc | FileCheck %s --check-prefix=X86 +; RUN: llc < %s -mtriple=x86_64-pc-linu

[clang] [openmp] [OpenMP] Respect LLVM per-target install directories (PR #83282)

2024-02-28 Thread Fangrui Song via cfe-commits
@@ -2763,13 +2763,13 @@ void tools::addOpenMPDeviceRTL(const Driver &D, const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, StringRef BitcodeSuffix, -

[clang] [openmp] [OpenMP] Respect LLVM per-target install directories (PR #83282)

2024-02-28 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/83282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstallAPI] Hookup Input files & basic ASTVisitor (PR #82552)

2024-02-28 Thread Fangrui Song via cfe-commits
MaskRay wrote: Hi, I believe this patch introduced a library layering issue. https://llvm.org/docs/CodingStandards.html#library-layering Since clangFrontend depends on clangInstallAPI, clangInstallAPI cannot include include/clang/Frontend header files. CMake doesn't have good support for detect

[clang] [InstallAPI] Hookup Input files & basic ASTVisitor (PR #82552)

2024-02-28 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > Since clangFrontend depends on clangInstallAPI, > > @MaskRay Thanks for reporting this issue. Is it possible the issue is from a > stale build? `clangFrontend` should no longer depend on `clangInstallAPI`. > That dependency was removed in > [0a518db#diff-9606e9f9f8eb1bb317d

[clang] [Driver] Unify InstalledDir and Dir (PR #80527)

2024-02-28 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/80527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0f76d9f - clang-installapi: remove setInstalledDir

2024-02-28 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-02-28T15:17:31-08:00 New Revision: 0f76d9fb5fbfea92da7647af70d78165c71c0700 URL: https://github.com/llvm/llvm-project/commit/0f76d9fb5fbfea92da7647af70d78165c71c0700 DIFF: https://github.com/llvm/llvm-project/commit/0f76d9fb5fbfea92da7647af70d78165c71c0700.diff

[clang] [llvm] [RISCV] Remove experimental from Zacas. (PR #83195)

2024-02-28 Thread Fangrui Song via cfe-commits
@@ -103,6 +103,7 @@ Changes to the RISC-V Backend * Codegen support was added for the Zimop (May-Be-Operations) extension. * The experimental Ssnpm, Smnpm, Smmpm, Sspm, and Supm 0.8.1 Pointer Masking extensions are supported. * The experimental Ssqosid extension is supported.

[clang] [llvm] [RISCV] Remove experimental from Zacas. (PR #83195)

2024-02-28 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/83195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HIP] Support compressing bundle by LZMA (PR #83306)

2024-02-28 Thread Fangrui Song via cfe-commits
MaskRay wrote: Have you tried zstd with a higher compression level? https://github.com/llvm/llvm-project/pull/83306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] -Wpointer-bool-conversion: suppress lambda function pointer conversion diagnostic during instantiation (PR #83497)

2024-02-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/83497 I have seen internal pieces of code that uses a template type parameter to accept std::function, a closure type, or any callable type. The diagnostic added in #83152 would require adaptation to the template, which

[clang] [Sema] -Wpointer-bool-conversion: suppress lambda function pointer conversion diagnostic during instantiation (PR #83497)

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

[clang] [Sema] -Wpointer-bool-conversion: suppress lambda function pointer conversion diagnostic during instantiation (PR #83497)

2024-02-29 Thread Fangrui Song via cfe-commits
MaskRay wrote: @vinayakdsci https://github.com/llvm/llvm-project/pull/83497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] -Wpointer-bool-conversion: suppress lambda function pointer conversion diagnostic during instantiation (PR #83497)

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

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-29 Thread Fangrui Song via cfe-commits
MaskRay wrote: Created #83497 as a follow-up to suppress the diagnostic for certain template instantiation uses. I made one change to unblock our internal users ``` #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpointer-bool-conversion" #endif // functor_

[clang] [Sema] -Wpointer-bool-conversion: suppress lambda function pointer conversion diagnostic during instantiation (PR #83497)

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

[clang] [Sema] -Wpointer-bool-conversion: suppress lambda function pointer conversion diagnostic during instantiation (PR #83497)

2024-03-01 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/83497 >From d7a168190f2fdf3b4f8ec1457400ad8e03bc3f3a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 29 Feb 2024 14:40:00 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF

[clang] [Sema] -Wpointer-bool-conversion: suppress lambda function pointer conversion diagnostic during instantiation (PR #83497)

2024-03-01 Thread Fangrui Song via cfe-commits
@@ -92,6 +92,19 @@ void foo() { bool is_true = [](){ return true; }; // expected-warning@-1{{address of lambda function pointer conversion operator will always evaluate to 'true'}} } + +template +static bool IsFalse(const Ts&...) { return false; } +template +static bool

[clang] [Sema] -Wpointer-bool-conversion: suppress lambda function pointer conversion diagnostic during instantiation (PR #83497)

2024-03-01 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/83497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG][DWARF] Do not emit -ggnu-pubnames for split dwarf version 5 (PR #83331)

2024-03-01 Thread Fangrui Song via cfe-commits
@@ -4478,14 +4478,20 @@ renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T, Args.getLastArg(options::OPT_ggnu_pubnames, options::OPT_gno_gnu_pubnames, options::OPT_gpubnames, options::OPT_gno_pubnames); if (DwarfFissio

[clang] [CLANG][DWARF] Do not emit -ggnu-pubnames for split dwarf version 5 (PR #83331)

2024-03-01 Thread Fangrui Song via cfe-commits
@@ -11,7 +11,6 @@ // NOINLINE-NOT: "-fsplit-dwarf-inlining" // SPLIT-NOT: "-dumpdir" // SPLIT: "-debug-info-kind=constructor" -// SPLIT-SAME: "-ggnu-pubnames" MaskRay wrote: I haven't checked closely, but you probably need a `-NOT` directive, and if the

[clang] [Sema] -Wpointer-bool-conversion: suppress lambda function pointer conversion diagnostic during instantiation (PR #83497)

2024-03-01 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Presumably similar things might show up in macros? But can cross that bridge > when we come to it. > > Perhaps we have some/could use some generic utility for this sort of > contextual warning "if these things are literally written next to each other, > warn, but if they came

[clang] ed0aa34 - [Driver] Add BoolMOption to simplify boolean -m* options

2024-03-01 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-03-01T16:40:26-08:00 New Revision: ed0aa344a8aaab4d8eedbe800750b8dcd36b0bcd URL: https://github.com/llvm/llvm-project/commit/ed0aa344a8aaab4d8eedbe800750b8dcd36b0bcd DIFF: https://github.com/llvm/llvm-project/commit/ed0aa344a8aaab4d8eedbe800750b8dcd36b0bcd.diff

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-02 Thread Fangrui Song via cfe-commits
MaskRay wrote: Test? https://github.com/llvm/llvm-project/pull/83216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HIP] change compress level (PR #83605)

2024-03-02 Thread Fangrui Song via cfe-commits
@@ -942,20 +942,28 @@ CompressedOffloadBundle::compress(const llvm::MemoryBuffer &Input, Input.getBuffer().size()); llvm::compression::Format CompressionFormat; + int Level; - if (llvm::compression::zstd::isAvailable()) + if (llvm::compression::zstd::isAvailable(

[clang] [llvm] [HIP] change compress level (PR #83605)

2024-03-02 Thread Fangrui Song via cfe-commits
@@ -1,4 +1,4 @@ -// REQUIRES: zlib +// REQUIRES: zlib && !zstd MaskRay wrote: Since zstd configurations become more prevalence, `zlib && !zstd` would essentially disable the test for increasingly more bots. But I guess this cannot be improved. https://github.c

[clang] [llvm] [HIP] change compress level (PR #83605)

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

[clang] [llvm] [HIP] change compress level (PR #83605)

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

[clang] [Driver] Remove duplicate -r flag usage when linking (PR #82715)

2024-03-02 Thread Fangrui Song via cfe-commits
MaskRay wrote: Gnu.cpp used by Linux doesn't have the problem. Thanks for fixing other targets. https://github.com/llvm/llvm-project/pull/82715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [Driver] Remove duplicate -r flag usage when linking (PR #82715)

2024-03-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/82715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-02 Thread Fangrui Song via cfe-commits
@@ -203,3 +203,12 @@ // RELOCATABLE-NOT: "-l // RELOCATABLE-NOT: crt{{[^./\\]+}}.o +// Check that the -X flag is passed to the linker on riscv64 MaskRay wrote: The CHECK is self-explanatory and renders the comment redundant. The RUN line may test additional

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/83216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2b5cd8b - [Driver] Remove InstallDir and getInstalledDir. NFC

2024-03-03 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-03-03T18:10:46-08:00 New Revision: 2b5cd8be3af43e5aa5b76b6aeb1edd3141b803ca URL: https://github.com/llvm/llvm-project/commit/2b5cd8be3af43e5aa5b76b6aeb1edd3141b803ca DIFF: https://github.com/llvm/llvm-project/commit/2b5cd8be3af43e5aa5b76b6aeb1edd3141b803ca.diff

[clang] 938ddbf - [Driver, Darwin] Simplify libc++ include path after #80527. NFC

2024-03-03 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-03-03T18:30:17-08:00 New Revision: 938ddbf349276c6ded6ef2d65432f41c512a86c6 URL: https://github.com/llvm/llvm-project/commit/938ddbf349276c6ded6ef2d65432f41c512a86c6 DIFF: https://github.com/llvm/llvm-project/commit/938ddbf349276c6ded6ef2d65432f41c512a86c6.diff

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-04 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,165 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc < %s -mtriple=i686-unknown-unknown --relocation-model=pic -enable-tlsdesc | FileCheck %s --check-prefix=X86 +; RUN: llc < %s -mtriple=x86_64-pc-linu

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

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

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

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

[clang] [Clang][ARM][AArch64] Add branch protection attributes to the defaults. (PR #83277)

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

[clang] [Clang][ARM][AArch64] Add branch protection attributes to the defaults. (PR #83277)

2024-03-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/83277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ARM][AArch64] Add branch protection attributes to the defaults. (PR #83277)

2024-03-04 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -triple aarch64-none-none -mbranch-target-enforce -msign-return-address=all -fcxx-exceptions -fexceptions -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK MaskRay wrote: perhaps it's time to add CodeGenCXX/AArch64/ ?

[clang] [llvm] [HIP] add --offload-compression-level= option (PR #83605)

2024-03-04 Thread Fangrui Song via cfe-commits
MaskRay wrote: It may be worth asking on https://github.com/facebook/zstd/ . I am sure zstd maintainers are happy to see more adoption:) https://github.com/llvm/llvm-project/pull/83605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] Update Clang.cpp (PR #77882)

2024-03-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/77882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update Clang.cpp (PR #77882)

2024-03-04 Thread Fangrui Song via cfe-commits
MaskRay wrote: The code has been removed by #77711 https://github.com/llvm/llvm-project/pull/77882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [lldb] [libcxxabi] [llvm] [lld] [libcxx] [clang] [flang] [msan] Unpoison indirect outputs for userspace using llvm.memset.* (PR #79924)

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

[flang] [libcxx] [clang] [llvm] [lld] [libcxxabi] [lldb] [libc] [msan] Unpoison indirect outputs for userspace using llvm.memset.* (PR #79924)

2024-01-30 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/79924 >From 07043d27155ffd89e23b64c77a99880b2fa57e57 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 29 Jan 2024 17:02:18 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF

[flang] [libcxx] [clang] [llvm] [lld] [libcxxabi] [lldb] [libc] [msan] Unpoison indirect outputs for userspace using llvm.memset.* (PR #79924)

2024-01-30 Thread Fangrui Song via cfe-commits
MaskRay wrote: > LGTM in general. > > But the downside here is that the compiler won't be able to optimize away > repeated stores if they are transformed to memset calls. Maybe introduce some > threshold and only memset() sizes greater than, say, 64? (IIRC that's what > `-ftrivial-auto-var-in

[flang] [libcxx] [clang] [llvm] [lld] [libcxxabi] [lldb] [libc] [msan] Unpoison indirect outputs for userspace using llvm.memset.* (PR #79924)

2024-01-30 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/79924 >From 07043d27155ffd89e23b64c77a99880b2fa57e57 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 29 Jan 2024 17:02:18 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[llvm] [clang-tools-extra] [clang] [AArch64] Implement -fno-plt for SelectionDAG/GlobalISel (PR #78890)

2024-01-30 Thread Fangrui Song via cfe-commits
@@ -1293,8 +1293,19 @@ bool AArch64CallLowering::lowerCall(MachineIRBuilder &MIRBuilder, !Subtarget.noBTIAtReturnTwice() && MF.getInfo()->branchTargetEnforcement()) Opc = AArch64::BLR_BTI; - else + else { +// For an intrinsic call (e.g. memset),

[lldb] [llvm] [libcxxabi] [libcxx] [libc] [lld] [clang] [flang] [msan] Unpoison indirect outputs for userspace using memset for large operands (PR #79924)

2024-01-30 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/79924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang-tools-extra] [llvm] [clang] [lld][AArch64][ELF][PAC] Support AUTH relocations and AUTH ELF marking (PR #72714)

2024-01-30 Thread Fangrui Song via cfe-commits
@@ -1461,6 +1493,33 @@ template void RelocationScanner::scanOne(RelTy *&i) { } } + // if (config->emachine == EM_AARCH64 && type == R_AARCH64_AUTH_ABS64) { MaskRay wrote: Why is this commented out? https://github.com/llvm/llvm-project/pull/72714 ___

<    5   6   7   8   9   10   11   12   13   14   >