[clang] [llvm] [clang-tools-extra] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-12-06 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: Sorry for the delay.. https://github.com/llvm/llvm-project/pull/65815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-12-06 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,130 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This function will try to re-use multi-lib if they are compat

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-12-06 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,130 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This function will try to re-use multi-lib if they are compat

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-12-06 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,130 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This function will try to re-use multi-lib if they are compat

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-12-06 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,130 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This function will try to re-use multi-lib if they are compat

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-12-06 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,130 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This function will try to re-use multi-lib if they are compat

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-12-06 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,130 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This function will try to re-use multi-lib if they are compat

[llvm] [clang] [clang-tools-extra] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

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

[clang-tools-extra] [clang] [llvm] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-12-06 Thread Fangrui Song via cfe-commits
@@ -230,3 +230,15 @@ defm add_symbol defm update_section : Eq<"update-section", "Replace the contents of section with contents from a file ">, MetaVarName<"name=file">; + +defm gap_fill +: Eq<"gap-fill", "Fill the gaps between sections with instead of zero. "

[clang-tools-extra] [clang] [llvm] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-12-06 Thread Fangrui Song via cfe-commits
@@ -230,3 +230,15 @@ defm add_symbol defm update_section : Eq<"update-section", "Replace the contents of section with contents from a file ">, MetaVarName<"name=file">; + +defm gap_fill +: Eq<"gap-fill", "Fill the gaps between sections with instead of zero. "

[clang] [clang-tools-extra] [llvm] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

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

[llvm] [clang-tools-extra] [clang] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-12-06 Thread Fangrui Song via cfe-commits
@@ -230,3 +230,15 @@ defm add_symbol defm update_section : Eq<"update-section", "Replace the contents of section with contents from a file ">, MetaVarName<"name=file">; + +defm gap_fill +: Eq<"gap-fill", "Fill the gaps between sections with instead of zero. "

[llvm] [clang-tools-extra] [clang] [XCOFF][obj2yaml] support parsing auxiliary symbols for XCOFF (PR #70642)

2023-12-06 Thread via cfe-commits
@@ -282,45 +282,57 @@ static void auxSymMapping(IO &IO, XCOFFYAML::SectAuxEntForStat &AuxSym) { void MappingTraits>::mapping( IO &IO, std::unique_ptr &AuxSym) { - assert(!IO.outputting() && "We don't dump aux symbols currently."); + + auto ResetAuxSym = [&](auto *AuxEnt

[llvm] [clang-tools-extra] [clang] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

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

[llvm] [clang-tools-extra] [clang] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

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

[clang] [Driver][MachineOutliner] Support -moutline option for aarch64_be (PR #73223)

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

[clang] [Driver][MachineOutliner] Support -moutline option for aarch64_be (PR #73223)

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

[clang] [Driver][MachineOutliner] Support -moutline option for aarch64_be (PR #73223)

2023-12-06 Thread Fangrui Song via cfe-commits
@@ -2400,7 +2400,8 @@ void tools::addMachineOutlinerArgs(const Driver &D, // Otherwise, add the proper mllvm flags. if (!(Triple.isARM() || Triple.isThumb() || Triple.getArch() == llvm::Triple::aarch64 || MaskRay wrote: This can be simp

[clang] [llvm] [compiler-rt] [flang] [clang-tools-extra] [PowerPC][CodeGen] Exploit STMW and LMW in 32-bit big-endian mode. (PR #74415)

2023-12-06 Thread via cfe-commits
https://github.com/EsmeYi updated https://github.com/llvm/llvm-project/pull/74415 >From f6d0ef8357540c61a9c20774e3b170a8db5b72ca Mon Sep 17 00:00:00 2001 From: esmeyi Date: Tue, 5 Dec 2023 00:44:04 -0500 Subject: [PATCH 1/4] Exploit STMW and LMW in 32-bit big-endian mode. --- llvm/lib/Target/

[clang] [llvm] [RISCV] Always emit relocations for resolved symbols and relax (PR #73793)

2023-12-06 Thread Fangrui Song via cfe-commits
MaskRay wrote: For the driver BareMetal.cpp change, claiming `-mno-relax` should not be done for non-RISCV targets (e.g. AArch32). https://github.com/llvm/llvm-project/pull/73793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-12-06 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/73765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-12-06 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/73765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6c39ab9 - [Driver] Use SmallVectorImpl reference instead of SmallVector reference in MultilibSet. NFC

2023-12-06 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2023-12-06T22:25:33-08:00 New Revision: 6c39ab90524ee791b0c6adaf8a305bf68ed4cd7f URL: https://github.com/llvm/llvm-project/commit/6c39ab90524ee791b0c6adaf8a305bf68ed4cd7f DIFF: https://github.com/llvm/llvm-project/commit/6c39ab90524ee791b0c6adaf8a305bf68ed4cd7f.diff

[clang-tools-extra] [clang-tidy] Add check hicpp-ignored-remove-result (PR #73119)

2023-12-06 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson Message-ID: In-Reply-To: @@ -0,0 +1,21 @@ +.. title:: clang-tidy - hicpp-ignored-remove-result + +hicpp-ignored-remove-result +=== + +Ensure that the result of ``std::re

[clang-tools-extra] [clang-tidy] Add check hicpp-ignored-remove-result (PR #73119)

2023-12-06 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Bj=C3=B6rn?= Svensson , =?utf-8?q?Bj=C3=B6rn?= Svensson , =?utf-8?q?Bj=C3=B6rn?= Svensson Message-ID: In-Reply-To: https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/73119 ___ cfe-commits

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-12-06 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,129 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This funciton will try to re-use multi-lib if they are compat

[clang-tools-extra] [clang] [llvm] Fix #35272: Don't replace typedefs in extern c scope (PR #69102)

2023-12-06 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/69102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] Fix #35272: Don't replace typedefs in extern c scope (PR #69102)

2023-12-06 Thread Piotr Zegar via cfe-commits
@@ -318,7 +318,8 @@ Changes in existing checks - Improved :doc:`modernize-use-using ` check to fix function pointer and - forward declared ``typedef`` correctly. + forward declared ``typedef`` correctly. Ignore ``typedef`` declaration in PiotrZSL wrote: A

[clang] [clang-tools-extra] [llvm] Fix #35272: Don't replace typedefs in extern c scope (PR #69102)

2023-12-06 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Loooks, good, minor nit in release notes. https://github.com/llvm/llvm-project/pull/69102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

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

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -145,9 +160,78 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[llvm] [clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: I imagine this will be updated after 4b932d84f48e0f3f42c769a5ca7ce6623ab62f2e so I plan to review again after. https://github.com/llvm/llvm-project/pull/66316 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -1356,6 +1382,11 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) { .addExpr(SymGotTlsGD)); return; } + case PPC::GETtlsMOD32AIX: + case PPC::GETtlsMOD64AIX: +// Transform: %r3 = GETtlsMODNNAIX %r3 (for NN == 32/64). +// Into

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -231,12 +231,19 @@ class PPCTargetAsmStreamer : public PPCTargetStreamer { MCSymbolXCOFF *TCSym = cast(Streamer.getCurrentSectionOnly()) ->getQualNameSymbol(); - // On AIX, we have a region handle (symbol@m) and the variable offset - /

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -145,9 +160,78 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[llvm] [clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -145,9 +160,78 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[llvm] [clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -2058,6 +2089,10 @@ void PPCAIXAsmPrinter::emitLinkage(const GlobalValue *GV, } } + // Do not emit the _$TLSML symbol. + if (GVSym->getName() == "_Renamed..5f24__TLSML[TC]") amy-kwan wrote: Maybe a silly question, but will this always contain the `

[llvm] [clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -2385,6 +2385,13 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForExternalReference( SmallString<128> Name; getNameWithPrefix(Name, GO, TM); + // AIX TLS local-dynamic requires the setting for the specific symbol name. amy-kwan wrote: Maybe

[llvm] [clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -145,9 +160,78 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[mlir] [lldb] [clang-tools-extra] [llvm] [flang] [libcxx] [openmp] [libc] [compiler-rt] [clang] [clang-tidy] Add performance-move-smart-pointer-contents check. (PR #66139)

2023-12-06 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Personally I think that check for move out of std::unique_ptr, and check for overall heavy moves could be implemented as an separate one, not related to unique_ptr. Easiest way to detect heavy moves is to check size of object, and above some threshold mark them as heavy. But th

[llvm] [clang] [Sema] Implement support for -Wformat-signedness (PR #74440)

2023-12-06 Thread Karl-Johan Karlsson via cfe-commits
karka228 wrote: I have started to implement defining the -Wformat-signedness option config in clang/include/clang/Basic/DiagnosticSemaKinds.td as suggested originally by @hazohelet and I agree that the implementation is a lot cleaner that way. However before finishing implementing that I think

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-init: Add a hook... (PR #73921)

2023-12-06 Thread Clement Courbet via cfe-commits
legrosbuffle wrote: Thanks https://github.com/llvm/llvm-project/pull/73921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 04ce9a3 - [clang-tidy] performance-unnecessary-copy-init: Add a hook... (#73921)

2023-12-06 Thread via cfe-commits
Author: Clement Courbet Date: 2023-12-07T08:31:16+01:00 New Revision: 04ce9a34ea82647a61b4e2a2a3cc5c93cc2f0d7d URL: https://github.com/llvm/llvm-project/commit/04ce9a34ea82647a61b4e2a2a3cc5c93cc2f0d7d DIFF: https://github.com/llvm/llvm-project/commit/04ce9a34ea82647a61b4e2a2a3cc5c93cc2f0d7d.dif

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-init: Add a hook... (PR #73921)

2023-12-06 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle closed https://github.com/llvm/llvm-project/pull/73921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Remove experimental from Vector Crypto extensions (PR #74213)

2023-12-06 Thread Yueh-Ting Chen via cfe-commits
eopXD wrote: The intrinsics for vector crypto is not a formalized version yet. To be safe, I think we should have an experimental tag to guard the intrinsics, while the extension is ratified and do indeed don't need the experimental. https://github.com/llvm/llvm-project/pull/74213

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-06 Thread via cfe-commits
https://github.com/heiher updated https://github.com/llvm/llvm-project/pull/72078 >From e3863873ab817dacf8680763bb42d91f005fe5ea Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 10 Nov 2023 21:07:48 -0600 Subject: [PATCH 1/5] [clang] Add per-global code model attribute This patch adds a per-

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-06 Thread via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -triple aarch64 -verify=expected,aarch64 -fsyntax-only %s +// RUN: %clang_cc1 -triple loongarch64 -verify=expected,loongarch64 -fsyntax-only %s +// RUN: %clang_cc1 -triple mips64 -verify=expected,mips64 -fsyntax-only %s +// RUN: %clang_cc1 -tr

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-06 Thread via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -emit-llvm -triple loongarch64 %s -o - | FileCheck %s + +// CHECK: @normal ={{.*}} global i32 0, code_model "small" +int normal __attribute__((model("normal"))); + +// CHECK: @medium ={{.*}} global i32 0, code_model "medium" +int medium __attri

[clang] [Driver][MachineOutliner] Support -moutline option for aarch64_be (PR #73223)

2023-12-06 Thread dong jianqiang via cfe-commits
https://github.com/dongjianqiang2 updated https://github.com/llvm/llvm-project/pull/73223 >From 438da675d853e0b1bc38670c18361d7d3615f860 Mon Sep 17 00:00:00 2001 From: dong jianqiang Date: Thu, 23 Nov 2023 16:58:11 +0800 Subject: [PATCH] [Driver][MachineOutliner] Support outlining option with L

[clang] [clang][AMDGPU] Update amdgpu_waves_per_eu attr docs (PR #74587)

2023-12-06 Thread Pierre van Houtryve via cfe-commits
@@ -2659,8 +2659,9 @@ An error will be given if: - Specified values violate subtarget specifications; - Specified values are not compatible with values provided through other attributes; - - The AMDGPU target backend is unable to create machine code that can meet the

[clang] [Driver][MachineOutliner] Support -moutline option for aarch64_be (PR #73223)

2023-12-06 Thread dong jianqiang via cfe-commits
@@ -2400,7 +2400,8 @@ void tools::addMachineOutlinerArgs(const Driver &D, // Otherwise, add the proper mllvm flags. if (!(Triple.isARM() || Triple.isThumb() || Triple.getArch() == llvm::Triple::aarch64 || dongjianqiang2 wrote: Updated,

<    1   2   3   4   5