[flang] [libc] [clang] [libcxx] [compiler-rt] [lldb] [mlir] [llvm] [clang-tools-extra] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/77886 >From f5a33f9e6893250e3584a77630b771ee76693c20 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 11 Jan 2024 23:42:38 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[libcxx] [mlir] [compiler-rt] [flang] [llvm] [libc] [clang-tools-extra] [clang] [lldb] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

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

[libcxx] [mlir] [flang] [llvm] [clang-tools-extra] [clang] [lldb] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-13 Thread Fangrui Song via cfe-commits
@@ -5336,6 +5336,7 @@ X86: operand in a SSE register. If AVX is also enabled, can also be a 256-bit vector operand in an AVX register. If AVX-512 is also enabled, can also be a 512-bit vector operand in an AVX512 register. Otherwise, an error. +- ``Ws``: A symbolic

[clang] [clang] SyntaxWarning: invalid escape sequence '\s' with Python3.12 (PR #78036)

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

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-13 Thread Fangrui Song via cfe-commits
@@ -78,3 +78,82 @@ // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/bin/ld" {{.*}} "-m" "elf_i386" // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o" // CHECK-CROSS:

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-13 Thread Fangrui Song via cfe-commits
@@ -78,3 +78,82 @@ // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/bin/ld" {{.*}} "-m" "elf_i386" // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o" // CHECK-CROSS:

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

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

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-13 Thread Fangrui Song via cfe-commits
@@ -78,3 +78,82 @@ // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/bin/ld" {{.*}} "-m" "elf_i386" // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o" // CHECK-CROSS:

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

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

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

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

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

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

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-13 Thread Fangrui Song via cfe-commits
@@ -2477,7 +2477,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( "x86_64-redhat-linux","x86_64-suse-linux", "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux", "x86_64-unknown-linux", -

[llvm] [clang-tools-extra] [Kaleidoscope] LLVM is not needed for chapter two (PR #69823)

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

[clang-tools-extra] [llvm] [Kaleidoscope] LLVM is not needed for chapter two (PR #69823)

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

[clang-tools-extra] [llvm] [Kaleidoscope] LLVM is not needed for chapter two (PR #69823)

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

[clang-tools-extra] [llvm] LLVM is not needed for chapter two. (PR #69823)

2024-01-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. This is correct. `llvm/examples/Kaleidoscope/Chapter2/toy.cpp` doesn't use LLVM. https://github.com/llvm/llvm-project/pull/69823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][RISCV] Forward --no-relax option to linker for RISC-V (PR #76432)

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

[llvm] [clang] [clang-tools-extra] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #77244)

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

[llvm] [clang] [clang-tools-extra] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #77244)

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

[clang-tools-extra] [llvm] [clang] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #77244)

2024-01-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/77244 >From f4758993998e221cc41924d8ec9feb70f759937a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 7 Jan 2024 09:47:53 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [clang] Adjust -mlarge-data-threshold handling (PR #77958)

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

[clang] [clang] Adjust -mlarge-data-threshold handling (PR #77958)

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

[clang] [clang] Adjust -mlarge-data-threshold handling (PR #77958)

2024-01-12 Thread Fangrui Song via cfe-commits
@@ -5752,20 +5752,29 @@ void Clang::ConstructJob(Compilation , const JobAction , } } - if (Arg *A = Args.getLastArg(options::OPT_mlarge_data_threshold_EQ)) { -if (!Triple.isX86()) { - D.Diag(diag::err_drv_unsupported_opt_for_target) - <<

[llvm] [clang-tools-extra] [lldb] [libcxx] [clang] [flang] [mlir] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-12 Thread Fangrui Song via cfe-commits
@@ -56966,6 +56965,17 @@ void X86TargetLowering::LowerAsmOperandForConstraint(SDValue Op, } return; } + case 'W': { +assert(Constraint[1] == 's'); +if (const auto *GA = dyn_cast(Op)) { + Ops.push_back(DAG.getTargetGlobalAddress(GA->getGlobal(),

[llvm] [clang-tools-extra] [lldb] [libcxx] [clang] [flang] [mlir] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-12 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,34 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc -mtriple=i686 < %s | FileCheck %s +; RUN: llc -mtriple=x86_64 < %s | FileCheck %s + +@var = external dso_local global i32, align 4 + +define dso_local void @test() { +;

[llvm] [clang-tools-extra] [lldb] [libcxx] [clang] [flang] [mlir] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/77886 >From f5a33f9e6893250e3584a77630b771ee76693c20 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 11 Jan 2024 23:42:38 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] 3bbc912 - [Driver,test] Update sanitizer test after RequiresPIE removal #77689

2024-01-12 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-01-12T10:09:53-08:00 New Revision: 3bbc912d37f03d9ad3be330b81d91c2eaf6c37f2 URL: https://github.com/llvm/llvm-project/commit/3bbc912d37f03d9ad3be330b81d91c2eaf6c37f2 DIFF: https://github.com/llvm/llvm-project/commit/3bbc912d37f03d9ad3be330b81d91c2eaf6c37f2.diff

[clang] [llvm] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-12 Thread Fangrui Song via cfe-commits
@@ -5336,6 +5336,7 @@ X86: operand in a SSE register. If AVX is also enabled, can also be a 256-bit vector operand in an AVX register. If AVX-512 is also enabled, can also be a 512-bit vector operand in an AVX512 register. Otherwise, an error. +- ``Ws``: A symbolic

[llvm] [clang] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/77886 Printing the raw symbol is useful in inline asm (e.g. getting the C++ mangled name, referencing a symbol in a custom way while ensuring it is not optimized out even if internal). Similar constraints are available

[clang] 7e60448 - [test] Improve x86 inline asm tests

2024-01-11 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-01-11T23:35:46-08:00 New Revision: 7e604485e18d40be6ce6310e4a3e583ca0b7df47 URL: https://github.com/llvm/llvm-project/commit/7e604485e18d40be6ce6310e4a3e583ca0b7df47 DIFF: https://github.com/llvm/llvm-project/commit/7e604485e18d40be6ce6310e4a3e583ca0b7df47.diff

[compiler-rt] [llvm] [libcxx] [mlir] [clang] [asan] Enable StackSafetyAnalysis by default (PR #77210)

2024-01-11 Thread Fangrui Song via cfe-commits
MaskRay wrote: > I guess we we should avoid ClUseStackSafety for -O0 There may be two competing goals. The traditional one that `-O0` should run very few optimizations and a practical one that instrumentations should reduce code size increase. `[asan] Skip promotable allocas to improve

[clang] [Driver,sanitizer] Remove RequiresPIE and msan's NeedPIE setting (PR #77689)

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

[clang] [clang][FatLTO][UnifiedLTO] Pass -enable-matrix to the LTO driver (PR #77829)

2024-01-11 Thread Fangrui Song via cfe-commits
MaskRay wrote: The description should mention https://reviews.llvm.org/D153583 ("[ThinLTO][Matrix] Forward -enable-matrix flag to the LTO plugin"). I think this is correct when used in the ThinLTO mode, but it's not clear whether regular LTO mode is correct.

[clang] [clang][FatLTO][UnifiedLTO] Pass -enable-matrix to the LTO driver (PR #77829)

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

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-01-11 Thread Fangrui Song via cfe-commits
@@ -819,6 +819,43 @@ class LLVM_LIBRARY_VISIBILITY X86_64TargetInfo : public X86TargetInfo { } }; +// x86-64 UEFI target +class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo +: public UEFITargetInfo { +public: + UEFIX86_64TargetInfo(const llvm::Triple , const

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-01-11 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,115 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-01-11 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,115 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-01-11 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,115 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-01-11 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,61 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-01-11 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,115 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-01-11 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,115 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-01-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay requested changes to this pull request. https://github.com/llvm/llvm-project/pull/76838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

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

[libcxxabi] [llvm] [clang] [openmp] [compiler-rt] [libcxx] [mlir] [lld] [runtimes] Use LLVM libunwind from libc++abi by default (PR #77687)

2024-01-11 Thread Fangrui Song via cfe-commits
MaskRay wrote: > @ldionne @MaskRay Any ideas what does this mean > [lab.llvm.org/buildbot/#/builders/85/builds/21530](https://lab.llvm.org/buildbot/#/builders/85/builds/21530) This looks like a fatal runtime error for the test `test/ExecutionEngine/MCJIT/Output/eh.ll` related to OrcJIT. It

[compiler-rt] [llvm] [libcxx] [mlir] [clang] [asan] Enable StackSafetyAnalysis by default (PR #77210)

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

[compiler-rt] [libcxx] [mlir] [llvm] [clang] [asan] Enable StackSafetyAnalysis by default (PR #77210)

2024-01-11 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Reverted at > [e7f7948](https://github.com/llvm/llvm-project/commit/e7f794875169811f3801fad6d40bb9fe833e1a69). > Will file an issue to track it once reducing is done. I've reduced it. It's code like below where a memcpy confused StackSafetyAnalysis in a macOS+libc++ build.

[clang] [Driver,sanitizer] Remove RequiresPIE and msan's NeedPIE setting (PR #77689)

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

[clang] [Driver,sanitizer] Remove RequiresPIE and msan's NeedPIE setting (PR #77689)

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

[libcxxabi] [mlir] [compiler-rt] [openmp] [libcxx] [clang] [lld] [llvm] [runtimes] Use LLVM libunwind from libc++abi by default (PR #77687)

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

[libcxxabi] [mlir] [compiler-rt] [openmp] [libcxx] [clang] [lld] [llvm] [runtimes] Use LLVM libunwind from libc++abi by default (PR #77687)

2024-01-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. This looks like a simplified version of https://reviews.llvm.org/D150897 that does not remove redundant `LIBCXXABI_USE_LLVM_UNWINDER ON`. LGTM but I think some `docs/` changes are needed. https://github.com/llvm/llvm-project/pull/77687

[clang] [Driver, sanitizer] Remove RequiresPIE and msan's RequiresPIE setting (PR #77689)

2024-01-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/77689 This variable causes clang to default to -fPIE when no PIC/PIC option is specified. msan used to require PIE because many `kMemoryLayout` made the low address (used by ET_EXEC executables) invalid. Current

[libcxx] [mlir] [compiler-rt] [llvm] [clang] [asan] Enable StackSafetyAnalysis by default (PR #77210)

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

[clang] [CMake] Deprecate GCC_INSTALL_PREFIX (PR #77537)

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

[clang] [CMake] Deprecate GCC_INSTALL_PREFIX (PR #77537)

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

[clang] [CMake] Deprecate GCC_INSTALL_PREFIX (PR #77537)

2024-01-10 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Seems okay to me, but it would be good to include an update to the release > notes, which ideally shows an example of what replacing the cmake flag with a > config file would look like. Thanks for the feedback. I have added pseudocode how GCC installation detection works in

[clang] [CMake] Deprecate GCC_INSTALL_PREFIX (PR #77537)

2024-01-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/77537 >From 8bd31c3cdb6ce41194b063c9ac13e5e2fbfbcc02 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 17 Aug 2023 14:01:02 -0700 Subject: [PATCH] [CMake] Deprecate GCC_INSTALL_PREFIX Part of

[clang] [CMake] Deprecate GCC_INSTALL_PREFIX (PR #77537)

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

[llvm] [compiler-rt] [clang] [mlir] [lld] [sanitizer] Select non-internal frames in ReportErrorSummary (PR #77406)

2024-01-09 Thread Fangrui Song via cfe-commits
MaskRay wrote: Nice filtering! https://github.com/llvm/llvm-project/pull/77406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [Driver] Treat MuslEABIHF as a hardfloat environment wrt multiarch directories (PR #77536)

2024-01-09 Thread Fangrui Song via cfe-commits
MaskRay wrote: `bool isEABIHF` from clang/lib/CodeGen/Targets/ARM.cpp can probably be factored. https://github.com/llvm/llvm-project/pull/77536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [CMake] Deprecate GCC_INSTALL_PREFIX (PR #77537)

2024-01-09 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/77537 Part of https://reviews.llvm.org/D158218 GCC_INSTALL_PREFIX is a rarely-used legacy option inherited from pre-CMake build system and has configuration file replacement nowadays. Many `clang/test/Driver` tests

[clang] [clang] [Driver] Treat MuslEABIHF as a hardfloat environment wrt multiarch directories (PR #77536)

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

[libunwind] [libunwind] Convert a few options from CACHE PATH to CACHE STRING (PR #77534)

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

[llvm] [clang-tools-extra] [lld] [libc] [lldb] [compiler-rt] [clang] [libcxx] [libcxxabi] [flang] [RISC-V][LLD] Add Support for RISC-V TLSDESC Relocations (PR #66916)

2024-01-09 Thread Fangrui Song via cfe-commits
MaskRay wrote: > @MaskRay , do you think this is worth abandoning in favor of #77516? If so, I > guess I'd also need to abandon #66915, which is unfortunate. You may abandon this in favor of #77516. For the LLVM patch, just use #66915 as it contains a lot of discussions. It's fine to make the

[clang] [AMDGPU] add function attrbute amdgpu-lib-fun (PR #74737)

2024-01-09 Thread Fangrui Song via cfe-commits
MaskRay wrote: > An AMDGPU library function is not internalized and can be used to fullfill > calls generated by LLVM passes or instruction selection. I am confused by the description of "internalized". Do you refer to LTO internalization? You can leverage `llvm.used` to disable LTO

[lldb] [compiler-rt] [clang-tools-extra] [libcxxabi] [flang] [libc] [lld] [llvm] [libcxx] [clang] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)

2024-01-08 Thread Fangrui Song via cfe-commits
@@ -71,6 +71,18 @@ enum Fixups { // Used to generate an R_RISCV_ALIGN relocation, which indicates the linker // should fixup the alignment after linker relaxation. fixup_riscv_align, + // 20-bit fixup corresponding to %tlsdesc_hi(foo) for instructions like + // auipc +

[libc] [libcxxabi] [lldb] [compiler-rt] [clang-tools-extra] [clang] [llvm] [flang] [lld] [libcxx] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)

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

[lldb] [compiler-rt] [clang-tools-extra] [libcxxabi] [flang] [libc] [lld] [llvm] [libcxx] [clang] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)

2024-01-08 Thread Fangrui Song via cfe-commits
@@ -188,3 +188,8 @@ addi a2, ft0, 24 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction # fence.tso accepts no operands fence.tso rw, rw # CHECK: :[[@LINE]]:11: error: invalid operand for instruction + +.Ltlsdesc_hi0: +jalr x5, 0(a1), %tlsdesc_hi(.Ltlsdesc_hi0)

[flang] [libcxxabi] [lldb] [clang-tools-extra] [libcxx] [compiler-rt] [lld] [clang] [libc] [llvm] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)

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

[flang] [libcxxabi] [lldb] [clang-tools-extra] [libcxx] [compiler-rt] [lld] [clang] [libc] [llvm] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)

2024-01-08 Thread Fangrui Song via cfe-commits
@@ -71,6 +71,18 @@ enum Fixups { // Used to generate an R_RISCV_ALIGN relocation, which indicates the linker // should fixup the alignment after linker relaxation. fixup_riscv_align, + // 20-bit fixup corresponding to %tlsdesc_hi(foo) for instructions like + // auipc +

[lldb] [compiler-rt] [clang-tools-extra] [libcxxabi] [flang] [libc] [lld] [llvm] [libcxx] [clang] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)

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

[lld] [libcxxabi] [openmp] [flang] [clang-tools-extra] [mlir] [libc] [libcxx] [llvm] [clang] [lldb] [libunwind] [polly] [compiler-rt] Make clang report invalid target versions. (PR #75373)

2024-01-08 Thread Fangrui Song via cfe-commits
@@ -786,4 +786,7 @@ def warn_android_unversioned_fallback : Warning< " directories will not be used in Clang 19. Provide a versioned directory" " for the target version or lower instead.">, InGroup>; + +def err_android_version_invalid : Error< + "Version %0 in triple %1

[lld] [libcxxabi] [flang] [clang-tools-extra] [libc] [libcxx] [lldb] [llvm] [clang] [compiler-rt] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)

2024-01-08 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,44 @@ +# RUN: llvm-mc -filetype=obj -triple riscv32 < %s --defsym RV32=1 | llvm-objdump -d -M no-aliases - | FileCheck %s --check-prefixes=INST,RV32 +# RUN: llvm-mc -filetype=obj -triple riscv64 < %s | llvm-objdump -d -M no-aliases - | FileCheck %s

[lld] [libcxxabi] [flang] [clang-tools-extra] [libc] [libcxx] [lldb] [llvm] [clang] [compiler-rt] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)

2024-01-08 Thread Fangrui Song via cfe-commits
@@ -3,8 +3,8 @@ # Out of range immediates ## simm12 -flh ft1, -2049(a0) # CHECK: :[[@LINE]]:10: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047] -fsh ft2, 2048(a1) # CHECK: :[[@LINE]]:10: error: operand must be a

[lld] [libcxxabi] [flang] [clang-tools-extra] [libc] [libcxx] [lldb] [llvm] [clang] [compiler-rt] [RISC-V][LLD] Add Support for RISC-V TLSDESC Relocations (PR #66916)

2024-01-08 Thread Fangrui Song via cfe-commits
MaskRay wrote: The base branch can be edited if you click "Edit" near the title, which will help reveal the lld side changes... https://github.com/llvm/llvm-project/pull/66916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[mlir] [polly] [clang] [libunwind] [flang] [lld] [lldb] [compiler-rt] [clang-tools-extra] [libcxxabi] [libcxx] [openmp] [libc] [llvm] Make clang report invalid target versions. (PR #75373)

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

[lld] [libcxxabi] [openmp] [flang] [clang-tools-extra] [mlir] [libc] [libcxx] [llvm] [clang] [lldb] [libunwind] [polly] [compiler-rt] Make clang report invalid target versions. (PR #75373)

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

[lld] [libcxxabi] [openmp] [flang] [clang-tools-extra] [mlir] [libc] [libcxx] [llvm] [clang] [lldb] [libunwind] [polly] [compiler-rt] Make clang report invalid target versions. (PR #75373)

2024-01-08 Thread Fangrui Song via cfe-commits
@@ -786,4 +786,7 @@ def warn_android_unversioned_fallback : Warning< " directories will not be used in Clang 19. Provide a versioned directory" " for the target version or lower instead.">, InGroup>; + +def err_android_version_invalid : Error< MaskRay

[lld] [libcxxabi] [openmp] [flang] [clang-tools-extra] [mlir] [libc] [libcxx] [llvm] [clang] [lldb] [libunwind] [polly] [compiler-rt] Make clang report invalid target versions. (PR #75373)

2024-01-08 Thread Fangrui Song via cfe-commits
@@ -786,4 +786,7 @@ def warn_android_unversioned_fallback : Warning< " directories will not be used in Clang 19. Provide a versioned directory" " for the target version or lower instead.">, InGroup>; + +def err_android_version_invalid : Error< + "Version %0 in triple %1

[llvm] [lld] [clang] [llvm-driver] Fix usage of `InitLLVM` on Windows (PR #76306)

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

[llvm] [lld] [clang] [llvm-driver] Fix usage of `InitLLVM` on Windows (PR #76306)

2024-01-08 Thread Fangrui Song via cfe-commits
MaskRay wrote: > InitLLVM which was part of the main() function of these tools `*_main` functions? https://github.com/llvm/llvm-project/pull/76306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Sema] Clean up -Wc++11-narrowing-const-reference code after #76094. NFC (PR #77278)

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

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2024-01-07 Thread Fangrui Song via cfe-commits
@@ -10410,40 +10410,53 @@ static void DiagnoseNarrowingInInitList(Sema , // No narrowing occurred. return; - case NK_Type_Narrowing: + case NK_Type_Narrowing: { // This was a floating-to-integer conversion, which is always considered a // narrowing

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2024-01-07 Thread Fangrui Song via cfe-commits
@@ -6158,12 +6158,24 @@ def err_illegal_initializer_type : Error<"illegal initializer type %0">; def ext_init_list_type_narrowing : ExtWarn< "type %0 cannot be narrowed to %1 in initializer list">, InGroup, DefaultError, SFINAEFailure; +// *_narrowing_const_reference

[clang] [Sema] Clean up -Wc++11-narrowing-const-reference code after #76094. NFC (PR #77278)

2024-01-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/77278 None >From 70441f463f7dbb73b1185db46ef20a86289eb246 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 7 Jan 2024 23:24:02 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #77244)

2024-01-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/77244 -fandroid-pad-segment is an Android-specific opt-in option that links in crt_pad_segment.o. crt_pad_segment.o contains a note section, which will be included in the linker-created PT_NOTE segment. This PT_NOTE

[clang] [llvm] [compiler-rt] [libcxx] [mlir] [asan] Enable StackSafetyAnalysis by default (PR #77210)

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

[llvm] [compiler-rt] [libcxx] [clang] [mlir] [asan] Enable StackSafetyAnalysis by default (PR #77210)

2024-01-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/77210 >From af33fcdf5a46c5bd34db89615a037e5eca421ef9 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 5 Jan 2024 23:50:40 -0800 Subject: [PATCH] [asan] Enable StackSafetyAnalysis by default StackSafetyAnalysis

[llvm] [clang] [llvm] Add support for building on illumos (PR #74930)

2024-01-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: `[CMake]` may be a good tag. https://github.com/llvm/llvm-project/pull/74930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [llvm] Add support for building on illumos (PR #74930)

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

[clang] [llvm] [SpecialCaseList] Use glob by default (PR #74809)

2024-01-06 Thread Fangrui Song via cfe-commits
MaskRay wrote: > ah it's because we something like > > ``` > [cfi-unrelated-cast|cfi-derived-cast] > > src:*third_party/vulkan_memory_allocator/include/vk_mem_alloc.h > ``` > > it seems like the new system doesn't match > `[cfi-unrelated-cast|cfi-derived-cast]` The glob mode can use the

[clang] [Driver] Add the --gcc-triple option (PR #73214)

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

[clang] [llvm] [llvm] Add support for building on illumos (PR #74930)

2024-01-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: > illumos has an older version of the Solaris linker that does not support the > GNU version script compat nor version scripts and does not support > -Bsymbolic-functions. Treat illumos linker separately. Are they aware of the issue and is there a tracking feature

[clang] [llvm] [llvm] Add support for building on illumos (PR #74930)

2024-01-05 Thread Fangrui Song via cfe-commits
@@ -241,6 +241,11 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32) set(LLVM_LINKER_DETECTED YES CACHE INTERNAL "") set(LLVM_LINKER_IS_GNULD YES CACHE INTERNAL "") message(STATUS "Linker detection: GNU ld") +elseif("${stderr}" MATCHES "(illumos)" OR

[lldb] [flang] [compiler-rt] [libcxxabi] [llvm] [clang] [polly] [libcxx] [libc] [mlir] [clang-tools-extra] [lld] Make clang report invalid target versions. (PR #75373)

2024-01-05 Thread Fangrui Song via cfe-commits
@@ -5,13 +5,13 @@ // RUN: %clang -O3 -target aarch64-linux-eabi -mno-fix-cortex-a53-835769 %s -S -o- 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NO --check-prefix=CHECK %s -// RUN: %clang -O3 -target aarch64-android-eabi %s -S -o- \ +// RUN: %clang -O3 -target

[clang-tools-extra] [libcxx] [compiler-rt] [flang] [libc] [lldb] [llvm] [polly] [mlir] [lld] [clang] [libcxxabi] Make clang report invalid target versions. (PR #75373)

2024-01-05 Thread Fangrui Song via cfe-commits
@@ -786,4 +786,7 @@ def warn_android_unversioned_fallback : Warning< " directories will not be used in Clang 19. Provide a versioned directory" " for the target version or lower instead.">, InGroup>; + +def err_android_version_invalid : Error< + "Version %0 in triple

[libunwind] [llvm] [libc] [flang] [libcxx] [clang-tools-extra] [lldb] [clang] [compiler-rt] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

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

[clang] [clang][Driver] Don't warn when -nostdinc and -nostdinc++ are both specified (PR #77130)

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

[clang] Clang/MIPS: Use -mnan value for -mabs if not specified (PR #71157)

2024-01-02 Thread Fangrui Song via cfe-commits
@@ -214,6 +214,14 @@ // RUN: -mnan=legacy -mnan=2008 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NAN2008 %s // CHECK-NAN2008: "-target-feature" "+nan2008" +// CHECK-NAN2008: "-target-feature" "+abs2008" MaskRay wrote: If abs2008 is adjacent, just

[clang] Clang/MIPS: Use -mnan value for -mabs if not specified (PR #71157)

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

[clang] Clang/MIPS: Use -mnan value for -mabs if not specified (PR #71157)

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

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