[clang] [clang][driver] Support `-x` for all languages in CL mode (PR #89772)

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

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Fangrui Song via cfe-commits
MaskRay wrote: > So PPC64 can use ELFv2 for `Triple::OpenBSD`. We probably want to diagnose > this OS for PPC64, since with ELFv2 we might emit separate local and global > entry points which means only certain values can be passed to > `-fpatchable-function-entry` option. This patch matches

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

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

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,49 @@ +; RUN: llc -mtriple=powerpc-unknown-linux-gnu %s -o - | FileCheck %s --check-prefixes=CHECK,PPC32 MaskRay wrote: `-mtriple=powerpc`. Prefer a generic ELF triple to a Linux specific one. Suggest 2 RUN lines, `powerpc` and `powerpc64le`, to

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Fangrui Song via cfe-commits
@@ -6681,7 +6681,9 @@ void Clang::ConstructJob(Compilation , const JobAction , StringRef S0 = A->getValue(), S = S0; unsigned Size, Offset = 0; if (!Triple.isAArch64() && !Triple.isLoongArch() && !Triple.isRISCV() && -!Triple.isX86()) +

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Fangrui Song via cfe-commits
@@ -6,15 +6,20 @@ // RUN: %clang -target loongarch64 %s -fpatchable-function-entry=1,0 -c -### 2>&1 | FileCheck %s // RUN: %clang -target riscv32 %s -fpatchable-function-entry=1,0 -c -### 2>&1 | FileCheck %s // RUN: %clang -target riscv64 %s -fpatchable-function-entry=1,0 -c

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,49 @@ +; RUN: llc -mtriple=powerpc-unknown-linux-gnu %s -o - | FileCheck %s --check-prefixes=CHECK,PPC32 +; RUN: llc -mtriple=powerpc64-unknown-linux-gnu %s -o - | FileCheck %s --check-prefixes=CHECK,PPC64 + +define void @f0() { +; CHECK-LABEL: f0: +; CHECK-NOT:

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-23 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -fsyntax-only -verify %s + +// expected-error@+1 {{'patchable_function_entry' attribute is not yet supported on AIX}} +__attribute__((patchable_function_entry(0))) void f(); MaskRay wrote: Some

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

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

[clang] d03e56b - [Driver] Simplify -f[no-]sized-deallocation forwarding. NFC

2024-05-23 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-23T16:03:46-07:00 New Revision: d03e56b27cd992e29482a21d88693f626f3dfffb URL: https://github.com/llvm/llvm-project/commit/d03e56b27cd992e29482a21d88693f626f3dfffb DIFF: https://github.com/llvm/llvm-project/commit/d03e56b27cd992e29482a21d88693f626f3dfffb.diff

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

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

[clang] [z/OS] Set the default arch for z/OS to be arch10 (PR #89854)

2024-05-23 Thread Fangrui Song via cfe-commits
@@ -11,6 +11,8 @@ // //===--===// +#include "clang/Config/config.h" MaskRay wrote: If SystemZ.h uses CLANG_SYSTEMZ_DEFAULT_ARCH, that file should have `#include "clang/Config/config.h"` as

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-05-22 Thread Fangrui Song via cfe-commits
@@ -801,7 +801,7 @@ static OutputDesc *addInputSec(StringMap> , auto *firstIsec = cast( cast(sec->commands[0])->sectionBases[0]); OutputSection *firstIsecOut = - firstIsec->flags & SHF_LINK_ORDER MaskRay wrote: A CppCheck issue

[clang] [z/OS] Set the default arch for z/OS to be arch10 (PR #89854)

2024-05-22 Thread Fangrui Song via cfe-commits
@@ -10,6 +10,8 @@ // //===--===// +#include "clang/Config/config.h" MaskRay wrote: unneeded include https://github.com/llvm/llvm-project/pull/89854

[clang] [z/OS] Set the default arch for z/OS to be arch10 (PR #89854)

2024-05-22 Thread Fangrui Song via cfe-commits
@@ -11,6 +11,8 @@ // //===--===// +#include "clang/Config/config.h" MaskRay wrote: unneeded include https://github.com/llvm/llvm-project/pull/89854

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

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

[clang] [llvm] [CodeGen] Assign SHT_LLVM_LTO to .llvm.lto section (PR #92856)

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

[clang] [llvm] [CodeGen] Assign SHT_LLVM_LTO to .llvm.lto section (PR #92856)

2024-05-21 Thread Fangrui Song via cfe-commits
MaskRay wrote: Oh, I didn't know #92820! Thanks. Landing... https://github.com/llvm/llvm-project/pull/92856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeGen] Assign SHT_LLVM_LTO to .llvm.lto section (PR #92856)

2024-05-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: @ilovepi I just realized that the FatLTO LLVM patch did not incorporate https://reviews.llvm.org/D153215 . I thought it did... Hope this is not too late. https://github.com/llvm/llvm-project/pull/92856 ___ cfe-commits mailing list

[clang] [llvm] [CodeGen] Assign SHT_LLVM_LTO to .llvm.lto section (PR #92856)

2024-05-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/92856 This follows up to SHT_LLVM_LTO (https://reviews.llvm.org/D153215) and resolves the comment of the FatLTO patch https://reviews.llvm.org/D146776#4430626 >From fdf70f50de2d51223f3f04b2db4913360ded3469 Mon Sep 17

[clang] [llvm] [mlir] Use StringRef::find_first_of(char), etc (NFC) (PR #92841)

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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: https://discourse.llvm.org/t/rfc-nolock-and-noalloc-attributes/76837/75 contains a discussion about the subproject name. Do you have opinions? @llvm/pr-subscribers-sanitizer @compnerd @petrhosek @isanbard https://github.com/llvm/llvm-project/pull/92460

[clang] [Offload] Do not pass `-fcf-protection=` for offloading (PR #88402)

2024-05-20 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,39 @@ +// Check that -fcf-protection does not get passed to the device-side MaskRay wrote: We also have unsupported-option-gpu.c to test various ignored options for GPU. https://github.com/llvm/llvm-project/pull/88402

[clang] [llvm] [MC] Make UseAssemblerInfoForParsing mostly true (PR #91082)

2024-05-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: > @MaskRay It looks like the new version still causes large compile-time > regressions for sqlite3 debug builds: > http://llvm-compile-time-tracker.com/compare.php?from=7529fe2e92e79eef22a528a7168e4dd777d6e9bd=9500a5d02e23f9b43294e5f662ac099f8989c0e4=instructions:u > It's

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-20 Thread Fangrui Song via cfe-commits
@@ -1,12 +1,12 @@ -//==- SemaRISCVVectorLookup.cpp - Name Lookup for RISC-V Vector Intrinsic -==// +//==--- SemaRISCV.cpp --- RISC-V target-specific routines --==// MaskRay wrote: The prevailing style starts with `//===-` or `//===--`

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

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

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

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

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: Nice refactoring! Pushing a prerequisite commit first with `git mv SemaRISCVVectorLookup.cpp SemaRISCV.cpp` should make git recognize this as a file rename. This PR can be changed to rebase on that precommit. https://github.com/llvm/llvm-project/pull/92682

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-20 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,106 @@ +//===--- radsan_context.cpp - Realtime Sanitizer --*- 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] [clang] Use SmallString::str (NFC) (PR #92717)

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

[clang] 9500a5d - [MC] Make UseAssemblerInfoForParsing mostly true

2024-05-20 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-19T23:35:15-07:00 New Revision: 9500a5d02e23f9b43294e5f662ac099f8989c0e4 URL: https://github.com/llvm/llvm-project/commit/9500a5d02e23f9b43294e5f662ac099f8989c0e4 DIFF: https://github.com/llvm/llvm-project/commit/9500a5d02e23f9b43294e5f662ac099f8989c0e4.diff

[clang] [llvm] [MC] Make UseAssemblerInfoForParsing mostly true (PR #91082)

2024-05-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: Removing `getUseAssemblerInfoForParsing` would make MCDwarfFrameEmitter::Emit (for .eh_frame FDE) slow (~4% compile time regression for sqlite3.c amalgamation) due to expensive `AttemptToFoldSymbolOffsetDifference`. For now, make `UseAssemblerInfoForParsing` false in

[clang] [llvm] [MC] Make UseAssemblerInfoForParsing mostly true (PR #91082)

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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,71 @@ +# -*- Python -*- + +import os + +# Setup config name. +config.name = "RADSAN" + config.name_suffix + +# Setup source root. +config.test_source_root = os.path.dirname(__file__) MaskRay wrote: `msan`, `lsan`, `gwp_asan` places lit tests directly

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,413 @@ +//===--- radsan_interceptors.cpp - Realtime Sanitizer --*- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,38 @@ +//===--- radsan_context.h - Realtime Sanitizer --*- 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] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,52 @@ +//===--- radsan_stack.cpp - Realtime Sanitizer --*- 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] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,106 @@ +//===--- radsan_context.cpp - Realtime Sanitizer --*- 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] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,50 @@ +//===--- radsan.h - Realtime Sanitizer --*- 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: Apache-2.0 WITH

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,52 @@ +//===--- radsan_stack.cpp - Realtime Sanitizer --*- 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] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,71 @@ +# -*- Python -*- MaskRay wrote: Delete Some older `lit.cfg.py` files might use this because previously they were named `lit.cfg` https://github.com/llvm/llvm-project/pull/92460 ___ cfe-commits

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -1382,6 +1382,10 @@ collectSanitizerRuntimes(const ToolChain , const ArgList , StaticRuntimes.push_back("asan_cxx"); } + if (!SanArgs.needsSharedRt() && SanArgs.needsRadsanRt()) { +StaticRuntimes.push_back("radsan"); + } MaskRay wrote: I

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

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

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -435,9 +435,8 @@ static std::string replaceDotDot(StringRef Path) { llvm::sys::path::const_iterator B = llvm::sys::path::begin(Path), E = llvm::sys::path::end(Path); while (B != E) { -if (B->compare(".") == 0) { -} -else if (B->compare("..") == 0) +

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,100 @@ +# RUN: llvm-mc -filetype=obj -crel -triple=x86_64 %s -o %t.o +# RUN: llvm-readelf -Sr -x .crelrodata2 -x .crelrodata16 %t.o | FileCheck %s + +# RUN: %if aarch64-registered-target %{ llvm-mc -filetype=obj -crel -triple=aarch64_be %s -o %t.be.o %} +# RUN: %if

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -1278,29 +1285,69 @@ void ELFState::writeSectionContent( if (!Section.Relocations) return; + const bool IsCrel = Section.Type == llvm::ELF::SHT_CREL; const bool IsRela = Section.Type == llvm::ELF::SHT_RELA; + typename ELFT::uint OffsetMask = 8, Offset = 0,

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -3840,14 +3849,15 @@ void GNUELFDumper::printRelRelaReloc(const Relocation , template static void printRelocHeaderFields(formatted_raw_ostream , unsigned SType, - const typename ELFT::Ehdr ) { + const

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -86,6 +86,8 @@ DYNAMIC_TAG(RELRSZ, 35) // Size of Relr relocation table. DYNAMIC_TAG(RELR, 36)// Address of relocation table (Relr entries). DYNAMIC_TAG(RELRENT, 37) // Size of a Relr relocation entry. +DYNAMIC_TAG(CREL, 38) // CREL relocation table +

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -32,12 +32,17 @@ FileHeader: # RUN: --match-full-lines --check-prefixes=GNU-RELOCS,GNU-PLTRELA # LLVM-RELOCS: Dynamic Relocations { +# LLVM-RELOCS-NEXT: 0x8 R_X86_64_64 foo 0x0 # LLVM-RELOCS-NEXT: 0x1 R_X86_64_NONE foo 0x0 # LLVM-RELOCS-NEXT: 0x2

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -123,6 +123,12 @@ class ContiguousBlobAccumulator { return encodeULEB128(Val, OS); } + unsigned writeSLEB128(int64_t Val) { +if (!checkLimit(10)) MaskRay wrote: Yes, LEB128 representing 64-bit integer needs at most 10 bytes. I added a change

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,18 @@ +# REQUIRES: powerpc-registered-target +## Test CREL for a 32-bit big-endian target. MaskRay wrote: Thanks for the suggestion. Changed ppc to arm. For static relocations, the RELA form is exclusively used as recommended toolchain practice.

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -934,10 +943,51 @@ void ELFWriter::WriteSecHdrEntry(uint32_t Name, uint32_t Type, uint64_t Flags, WriteWord(EntrySize); // sh_entsize } +template +static void encodeCrel(ArrayRef Relocs, raw_ostream ) { + uint OffsetMask = 8, Offset = 0, Addend = 0; + uint32_t Symidx

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -1278,29 +1285,69 @@ void ELFState::writeSectionContent( if (!Section.Relocations) return; + const bool IsCrel = Section.Type == llvm::ELF::SHT_CREL; const bool IsRela = Section.Type == llvm::ELF::SHT_RELA; + typename ELFT::uint OffsetMask = 8, Offset = 0,

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/91280 >From a0cfafb82db825512b0ca44778fa9d4bb435563d Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 6 May 2024 15:37:50 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] e2db08f - [test] Use conventional -emit-llvm-only

2024-05-17 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-17T14:42:48-07:00 New Revision: e2db08f8f1a7dd37cd18705164f0c1188707e5b6 URL: https://github.com/llvm/llvm-project/commit/e2db08f8f1a7dd37cd18705164f0c1188707e5b6 DIFF: https://github.com/llvm/llvm-project/commit/e2db08f8f1a7dd37cd18705164f0c1188707e5b6.diff

[clang] [llvm] [AArch64] Add intrinsics for multi-vector to ZA array vector accumulators (PR #91606)

2024-05-17 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -verify -emit-llvm %s MaskRay wrote: `-emit-llvm-only` is more conventional when the output is unneeded. In our internal build system, PWD is read-only and `-emit-llvm`

[clang] [CodeGen] Support arrays with initializers of 64-bit size (PR #92473)

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

[clang] [z/OS] Set the default arch for z/OS to be arch10 (PR #89854)

2024-05-17 Thread Fangrui Song via cfe-commits
MaskRay wrote: > @MaskRay Got it. > > The problem with that solution is that if you use --target you won't get the > correct arch. This would be a problem for any cross compilation. For example, > say you cross compile from zLinux (which wouldn't have the config file), the > arch would be

[clang] [CodeGen] Support arrays with initializers of 64-bit size (PR #92473)

2024-05-16 Thread Fangrui Song via cfe-commits
@@ -949,11 +949,11 @@ tryEmitGlobalCompoundLiteral(ConstantEmitter , static llvm::Constant * EmitArrayConstant(CodeGenModule , llvm::ArrayType *DesiredType, - llvm::Type *CommonElementType, unsigned ArrayBound, + llvm::Type

[clang] [CodeGen] Support arrays with initializers of 64-bit size (PR #92473)

2024-05-16 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/92473 >From fec942ed085d2a4004a6cefcb7fdf20a4b062ca3 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 16 May 2024 16:24:01 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [CodeGen] Support arrays with initializers of 64-bit size (PR #92473)

2024-05-16 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/92473 Based on @OfekShochat's https://reviews.llvm.org/D133648 init.c is the primary test for array initialization, but it uses a 32-bit triple, which would lead to an "array is too large" error. Add the new test to

[clang] 9a7f54b - [clang-fuzzer-dictionary] Skip EmptySpellingName after #89358

2024-05-16 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-16T11:53:15-07:00 New Revision: 9a7f54ba4878c4e66c99430b52d8c014ab7b2a03 URL: https://github.com/llvm/llvm-project/commit/9a7f54ba4878c4e66c99430b52d8c014ab7b2a03 DIFF: https://github.com/llvm/llvm-project/commit/9a7f54ba4878c4e66c99430b52d8c014ab7b2a03.diff

[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

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

[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

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

[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

2024-05-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/91082 >From 7e36c4d9f736b9b2eff29e565d22e01c29744c1e Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 4 May 2024 13:10:21 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

2024-05-14 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > Thanks for the additional context. My main concern is that we're undoing > > the consensus of [reviews.llvm.org/D45164](https://reviews.llvm.org/D45164) > > which if I've understood the comments properly was "There is a reasonable > > expectation that compiled (not

[clang-tools-extra] 4cfe347 - [clangd] Fix -Wunused-but-set-variable after #82396

2024-05-14 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-14T12:58:49-07:00 New Revision: 4cfe347c107485aab6bd003f99ab06aac242b0fd URL: https://github.com/llvm/llvm-project/commit/4cfe347c107485aab6bd003f99ab06aac242b0fd DIFF: https://github.com/llvm/llvm-project/commit/4cfe347c107485aab6bd003f99ab06aac242b0fd.diff

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-05-14 Thread Fangrui Song via cfe-commits
MaskRay wrote: > This seems to [break > something](https://lab.llvm.org/buildbot/#/builders/121/builds/41631) in > LLVM... investigating I've also noticed a stage-2-build issue. ``` llvm::any_of(LHS->users(), [&](auto *U) { return U != I &&

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

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

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

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

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-14 Thread Fangrui Song via cfe-commits
@@ -2900,7 +2900,7 @@ defm clangir : BoolFOption<"clangir", PosFlag, NegFlag LLVM pipeline to compile">, BothFlags<[], [ClangOption, CC1Option], "">>; -def emit_cir : Flag<["-"], "emit-cir">, Visibility<[CC1Option]>, +def emit_cir : Flag<["-"], "emit-cir">,

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Ideally FileCheck should prefix commands with some tag to distinguish > comments from filecheck annotations, like > `--command-tag=@` and use as `@CHECK: xxx`, `@MYCHECK-NEXT: yyy`, etc. Making > typo\error in both prefix and command tag will be harder, i guess. That way >

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. Some CHECK prefixes are auto-generated by llvm/utils/update_*_test_checks.py. Let's say my build directory is `/tmp/Rel` while my source is at `~/llvm`, use ``` PATH=/tmp/Rel/bin:$PATH ~/llvm/llvm/utils/update_any_test_checks.py path/to/test

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: The previous failures reported by `buildkite/github-pull-requests Pending` were genuine. I have fixed them separately. When doing large scale cleanups, it might make sense to partition them, e.g. llvm/ (clang/ & clang-tools-extra/) mlir/ in different PRs. The number of files

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: The clang/test/Driver codegen tests might have been removed. Note: clang/test/Driver is to test how clangDriver passes options to cc1, not for sema/codegen/etc. https://github.com/llvm/llvm-project/pull/89727 ___ cfe-commits mailing

[clang] a6d7828 - [test] Use conventional -emit-llvm-only

2024-05-13 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-13T12:53:16-07:00 New Revision: a6d7828f4c50c1ec7b0b5f61fe59d7a768175dcc URL: https://github.com/llvm/llvm-project/commit/a6d7828f4c50c1ec7b0b5f61fe59d7a768175dcc DIFF: https://github.com/llvm/llvm-project/commit/a6d7828f4c50c1ec7b0b5f61fe59d7a768175dcc.diff

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-12 Thread Fangrui Song via cfe-commits
@@ -45,10 +45,10 @@ # RUN: ld.lld -Ttext 0x201000 %t.o -o %t4 # RUN: llvm-readelf -S -l %t4 | FileCheck %s --check-prefix=USER3 # USER3: .text PROGBITS 00201000 001000 01 -# USER3-NEX: .rodata PROGBITS 00202000 002000 08 -# USER3-NEX: .aw

[clang] [clang] Use StringRef::operator== instead of StringRef::equals (NFC) (PR #91844)

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

[clang] df88d61 - [Driver] Remove unused getInstalledDir

2024-05-10 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-10T19:15:17-07:00 New Revision: df88d610ab10c1e3f22d7f5daf3794158972c584 URL: https://github.com/llvm/llvm-project/commit/df88d610ab10c1e3f22d7f5daf3794158972c584 DIFF: https://github.com/llvm/llvm-project/commit/df88d610ab10c1e3f22d7f5daf3794158972c584.diff

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

2024-05-10 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-05-10 Thread Fangrui Song via cfe-commits
MaskRay wrote: Some older toolchains were probably contributed with a lot of `CmdArgs.push_back` uncovered by tests. They are not good examples to follow. For new toolchains, we do want all constructed `CmdArgs.push_back` to be covered. This allows refactoring by someone who is unfamiliar

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -238,3 +238,17 @@ // RUN: %clang -### -fno-unsafe-math-optimizations -funsafe-math-optimizations \ // RUN: -ffp-contract=off -c %s 2>&1 | FileCheck --check-prefix=CHECK-FPC-OFF %s +// RUN: %clang -### -funsafe-math-optimizations -ffp-contract=off -c %s 2>&1 \

[clang] [test] Move RISCV tests to clang/test/CodeGen/RISCV/ (PR #91783)

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

[clang] [test] Move RISCV tests to clang/test/CodeGen/RISCV/ (PR #91783)

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

[clang] [test] Move RISCV tests to clang/test/CodeGen/RISCV/ (PR #91783)

2024-05-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/91783 None >From 79c0d400fee943f794ed38965cec0c8b0d2dffef Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 10 May 2024 11:00:14 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,29 @@ +// When -march with zicfiss0p4 or zicfilp0p4 add GNU property to file object MaskRay wrote: This directory is for driver tests. Codegen tests should use `%clang_cc1` and be moved elsewhere (e.g. test/CodeGen)

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -238,3 +238,17 @@ // RUN: %clang -### -fno-unsafe-math-optimizations -funsafe-math-optimizations \ // RUN: -ffp-contract=off -c %s 2>&1 | FileCheck --check-prefix=CHECK-FPC-OFF %s +// RUN: %clang -### -funsafe-math-optimizations -ffp-contract=off -c %s 2>&1 \

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Fangrui Song via cfe-commits
MaskRay wrote: Unless `lld/test/ELF` tests will get a failure, the `lld/` part should ideally be dropped from this PR. lld folks (like I) might not notice this patch if there is just a `[RISCV]` tag. https://github.com/llvm/llvm-project/pull/77414

[clang] 514d80b - [Driver, test] Add -Werror to -ffp-contract/-ffp-model tests

2024-05-10 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-10T10:49:52-07:00 New Revision: 514d80b4feea3c788c1b0821959e96f63c8b8f3d URL: https://github.com/llvm/llvm-project/commit/514d80b4feea3c788c1b0821959e96f63c8b8f3d DIFF: https://github.com/llvm/llvm-project/commit/514d80b4feea3c788c1b0821959e96f63c8b8f3d.diff

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -2751,6 +2751,7 @@ static void RenderFloatingPointOptions(const ToolChain , const Driver , // If one wasn't given by the user, don't pass it here. StringRef FPContract; StringRef LastSeenFfpContractOption; + StringRef LastFpContractOverrideOption;

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -238,3 +238,17 @@ // RUN: %clang -### -fno-unsafe-math-optimizations -funsafe-math-optimizations \ // RUN: -ffp-contract=off -c %s 2>&1 | FileCheck --check-prefix=CHECK-FPC-OFF %s +// RUN: %clang -### -funsafe-math-optimizations -ffp-contract=off -c %s 2>&1 \

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/91280 >From a0cfafb82db825512b0ca44778fa9d4bb435563d Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 6 May 2024 15:37:50 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -1142,6 +1193,13 @@ ELFObjectFile::getRela(DataRefImpl Rela) const { return *Ret; } +template MaskRay wrote: Changes to this file are for llvm-objdump support. The use patterns ensure that `Crels` will be populated. I've added the assert to

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -292,6 +293,9 @@ template class ELFObjectFile : public ELFObjectFileBase { const Elf_Shdr *DotSymtabSec = nullptr; // Symbol table section. const Elf_Shdr *DotSymtabShndxSec = nullptr; // SHT_SYMTAB_SHNDX section. + // Hold CREL relocations for

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -446,6 +450,7 @@ template class ELFObjectFile : public ELFObjectFileBase { const Elf_Rel *getRel(DataRefImpl Rel) const; const Elf_Rela *getRela(DataRefImpl Rela) const; + Elf_Crel getCrel(DataRefImpl Rel) const; MaskRay wrote: renamed

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -321,6 +321,11 @@ class ELFFile { std::vector decode_relrs(Elf_Relr_Range relrs) const; + uint64_t crelHeader(ArrayRef Content) const; + using RelsOrRelas = std::pair, std::vector>; MaskRay wrote: Yes, `std::pair<` instead of an exclusive or is for

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -1117,9 +1166,11 @@ void ELFObjectFile::getRelocationTypeName( template Expected ELFObjectFile::getRelocationAddend(DataRefImpl Rel) const { - if (getRelSection(Rel)->sh_type != ELF::SHT_RELA) -return createError("Section is not SHT_RELA"); - return

[clang] [Driver] Use StringRef::operator== instead of StringRef::equals (NFC) (PR #91698)

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

[clang] [clang][driver] Support `-x` for all languages in CL mode (PR #89772)

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

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-09 Thread Fangrui Song via cfe-commits
MaskRay wrote: > I think it would be useful to nominate a source as the canonical reference > for the specification which is updated along with any implementation changes. > I think >

  1   2   3   4   5   6   7   8   9   10   >