[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,

[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
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] 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] [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
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] [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-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-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
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

[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

[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] [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
@@ -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
@@ -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
@@ -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

[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

[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
@@ -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

[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
@@ -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

[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] [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

[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-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

[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-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-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] 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] [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] [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] [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] [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] [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
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

[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

[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
@@ -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

[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. "

[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] [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

[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] [llvm] [clang-tools-extra] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-12-06 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,198 @@ +# RUN: yaml2obj --docnum=1 %s -o %t + +# RUN: not llvm-objcopy --gap-fill 1 %t 2>&1 | FileCheck %s --check-prefix=NOT-BINARY +# NOT-BINARY: error: '--gap-fill' is only supported for binary output + +# RUN: not llvm-objcopy -O binary --gap-fill= %t %t.bin 2>&1 |

[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

[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
@@ -0,0 +1,198 @@ +# RUN: yaml2obj --docnum=1 %s -o %t + +# RUN: not llvm-objcopy --gap-fill 1 %t 2>&1 | FileCheck %s --check-prefix=NOT-BINARY +# NOT-BINARY: error: '--gap-fill' is only supported for binary output + +# RUN: not llvm-objcopy -O binary --gap-fill= %t %t.bin 2>&1 |

[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
@@ -738,6 +739,36 @@ objcopy::parseObjcopyOptions(ArrayRef RawArgsArr, if (auto Arg = InputArgs.getLastArg(OBJCOPY_extract_partition)) Config.ExtractPartition = Arg->getValue(); + if (const auto *A = InputArgs.getLastArg(OBJCOPY_gap_fill)) { +if (Config.OutputForma

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-06 Thread Tobias Hieta via cfe-commits
tru wrote: @rnk @amykhuang might be interested in reviewing as well. https://github.com/llvm/llvm-project/pull/71300 ___ 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

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

2023-12-06 Thread Chen Zheng via cfe-commits
@@ -3412,13 +3416,23 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, return DAG.getNode(PPCISD::ADD_TLS, dl, PtrVT, TLSReg, VariableOffset); } - // Only Local-Exec, Initial-Exec and General-Dynamic TLS models are currently - // supported models. If

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

2023-12-06 Thread Kai Luo 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

[clang] [Clang] Mark WG14 N2939 (Identifier Syntax Fixes) as available in Clang 15 (PR #74666)

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

[clang] [clang] Crash when referencing capture in static lambda (PR #74661)

2023-12-06 Thread via cfe-commits
cor3ntin wrote: Can you add a release note? Otherwise it looks good to me https://github.com/llvm/llvm-project/pull/74661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add separate C++23 extension flag for attrs on lambda (PR #74553)

2023-12-06 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/74553 >From 9be87da42e48895cf23d90a3ed735b7a36b1ccb3 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 6 Dec 2023 04:51:45 +0100 Subject: [PATCH 1/4] [clang] Add separate C++23 extension flag for attrs on lambda

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

2023-12-06 Thread Fangrui Song 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 Fangrui Song 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-tools-extra] [llvm] [clang] [XCOFF][obj2yaml] support parsing auxiliary symbols for XCOFF (PR #70642)

2023-12-06 Thread Kai Luo 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

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

2023-12-06 Thread Matt Arsenault 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

[openmp] [clang] [OpenMP] Fix runtime problem due wrong map size. (PR #74692)

2023-12-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (jyu2-git) Changes Currently we are missing set up-boundary address for FinalArraySection as highests elements in partial struct data. Currently for: \#pragma omp target map(D.a) map(D.b[:2]) The size is: %a = getelementptr

[openmp] [clang] [OpenMP] Fix runtime problem due wrong map size. (PR #74692)

2023-12-06 Thread via cfe-commits
https://github.com/jyu2-git created https://github.com/llvm/llvm-project/pull/74692 Currently we are missing set up-boundary address for FinalArraySection as highests elements in partial struct data. Currently for: \#pragma omp target map(D.a) map(D.b[:2]) The size is: %a = getelementptr inb

[flang] [clang] [flang][driver] Mark -fcommon and -mtune as visible in Flang (PR #68657)

2023-12-06 Thread Fangcao Wang via cfe-commits
https://github.com/LittleMeepo closed https://github.com/llvm/llvm-project/pull/68657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][driver] Mark -fcommon and -mtune as visible in Flang (PR #68657)

2023-12-06 Thread Fangcao Wang via cfe-commits
@@ -5077,6 +5077,7 @@ def module_file_info : Flag<["-"], "module-file-info">, Flags<[NoXarchOption]>, HelpText<"Provide information about a particular module file">; def mthumb : Flag<["-"], "mthumb">, Group; def mtune_EQ : Joined<["-"], "mtune=">, Group, + Flags<[TargetSpe

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

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

[clang] [clang] Crash when referencing capture in static lambda (PR #74661)

2023-12-06 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I think this makes sense but @cor3ntin should look at it. https://github.com/llvm/llvm-project/pull/74661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[llvm] [clang] [clang][RISCV] Change default abi with f extension but without d extension (PR #73489)

2023-12-06 Thread Jianjian Guan via cfe-commits
@@ -1,4 +1,4 @@ -// Check target CPUs are correctly passed. +·// Check target CPUs are correctly passed. jacquesguan wrote: Fixed https://github.com/llvm/llvm-project/pull/73489 ___ cfe-commits mailing list cfe-commits

[llvm] [clang] [clang][RISCV] Change default abi with f extension but without d extension (PR #73489)

2023-12-06 Thread Jianjian Guan via cfe-commits
https://github.com/jacquesguan edited https://github.com/llvm/llvm-project/pull/73489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang][RISCV] Change default abi when only have f extension but no d extension (PR #73489)

2023-12-06 Thread Jianjian Guan via cfe-commits
https://github.com/jacquesguan updated https://github.com/llvm/llvm-project/pull/73489 >From ce22351f42b0a641000d1aa4db86f090f9b4e6c8 Mon Sep 17 00:00:00 2001 From: Jianjian GUAN Date: Mon, 27 Nov 2023 16:14:04 +0800 Subject: [PATCH] [clang][RISCV] Change default abi with f extension but witho

[clang] b683709 - [clang-format] Fix a possible crash in `AlignAfterOpenBracket: BlockIndent`

2023-12-06 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-12-06T17:40:41-08:00 New Revision: b683709ea6eec7d0a388bd50c571774c9b9ffdb7 URL: https://github.com/llvm/llvm-project/commit/b683709ea6eec7d0a388bd50c571774c9b9ffdb7 DIFF: https://github.com/llvm/llvm-project/commit/b683709ea6eec7d0a388bd50c571774c9b9ffdb7.diff LOG:

[clang] [clang-tools-extra] [compiler-rt] [flang] [llvm] [libc] [clang] Exclude non-template classes when checking if constraint refers to containing template arguments (PR #74265)

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

[clang] fed4e3a - [clang] Exclude non-template classes when checking if constraint refers to containing template arguments (#74265)

2023-12-06 Thread via cfe-commits
Author: antangelo Date: 2023-12-06T20:17:59-05:00 New Revision: fed4e3a6eb5d04856169951347892d983695f86a URL: https://github.com/llvm/llvm-project/commit/fed4e3a6eb5d04856169951347892d983695f86a DIFF: https://github.com/llvm/llvm-project/commit/fed4e3a6eb5d04856169951347892d983695f86a.diff LOG

[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)

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

[clang] c281782 - [clang][Sema] Add -Wswitch-default warning option (#73077)

2023-12-06 Thread via cfe-commits
Author: dong jianqiang Date: 2023-12-07T09:03:15+08:00 New Revision: c28178298513f99dc869daa301fc25257df81688 URL: https://github.com/llvm/llvm-project/commit/c28178298513f99dc869daa301fc25257df81688 DIFF: https://github.com/llvm/llvm-project/commit/c28178298513f99dc869daa301fc25257df81688.diff

[clang] [clang-format] Handle merging functions containing only a block comment (PR #74651)

2023-12-06 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e1a4b00 - [clang-format] Handle merging functions containing only a block comment (#74651)

2023-12-06 Thread via cfe-commits
Author: Owen Pan Date: 2023-12-06T16:56:22-08:00 New Revision: e1a4b0032f89355da94a5505bf308ab12668b1b0 URL: https://github.com/llvm/llvm-project/commit/e1a4b0032f89355da94a5505bf308ab12668b1b0 DIFF: https://github.com/llvm/llvm-project/commit/e1a4b0032f89355da94a5505bf308ab12668b1b0.diff LOG:

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

2023-12-06 Thread Björn Svensson via cfe-commits
@@ -133,6 +133,11 @@ UnusedReturnValueCheck::UnusedReturnValueCheck(llvm::StringRef Name, "::boost::system::error_code"))), AllowCastToVoid(Options.get("AllowCastToVoid", false)) {} +UnusedReturnValueCheck::UnusedReturnValueCh

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

2023-12-06 Thread Björn Svensson via cfe-commits
@@ -0,0 +1,17 @@ +.. title:: clang-tidy - hicpp-ignored-remove-result + +hicpp-ignored-remove-result +=== + +Ensure that the result of ``std::remove``, ``std::remove_if`` and ``std::unique`` +are not ignored according to +`rule 17.5.1

[clang-tools-extra] [clang] [llvm] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-06 Thread David Li via cfe-commits
david-xl wrote: > > > > David says the itanium remapper file was only used once during gcc to > > > > llvm transition, so not relevant here. > > > > > > > > > I believe it was actually for the libstdc++ to libc++ transition (see > > > https://reviews.llvm.org/D51247 and https://reviews.llvm.o

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

2023-12-06 Thread Björn Svensson via cfe-commits
@@ -0,0 +1,28 @@ +//===--- IgnoredRemoveResultCheck.cpp - clang-tidy ===// +// +// 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: Apa

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

2023-12-06 Thread Björn Svensson via cfe-commits
https://github.com/bjosv updated https://github.com/llvm/llvm-project/pull/73119 From 91cf412abcfd231ab399c3e44c6a9bc14109537c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Svensson?= Date: Tue, 21 Nov 2023 23:30:07 +0100 Subject: [PATCH 1/4] [clang-tidy] Add check hicpp-ignored-remove-r

[llvm] [clang] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-12-06 Thread Yaxun Liu via cfe-commits
@@ -596,6 +596,7 @@ static bool mustPreserveGV(const GlobalValue &GV) { if (const Function *F = dyn_cast(&GV)) return F->isDeclaration() || F->getName().startswith("__asan_") || F->getName().startswith("__sanitizer_") || + F->getName() == "__divti3" |

[clang] Fix tests clang-offload-bundler-zlib/zstd.c (PR #74504)

2023-12-06 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/74504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 36e4cb7 - Fix tests clang-offload-bundler-zlib/zstd.c (#74504)

2023-12-06 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-12-06T18:38:21-05:00 New Revision: 36e4cb7986da455342dfd535b659640ab0692340 URL: https://github.com/llvm/llvm-project/commit/36e4cb7986da455342dfd535b659640ab0692340 DIFF: https://github.com/llvm/llvm-project/commit/36e4cb7986da455342dfd535b659640ab0692340.dif

[clang] [NFC] Remove unneeded nullptr checks after cast<> (PR #74674)

2023-12-06 Thread Mike Rice via cfe-commits
@@ -6454,8 +6454,7 @@ ConstantAddress CodeGenModule::GetAddrOfGlobalTemporary( !EvalResult.hasSideEffects()) Value = &EvalResult.Val; - LangAS AddrSpace = - VD ? GetGlobalVarAddressSpace(VD) : MaterializedType.getAddressSpace(); mikerice1969 wr

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2023-12-06 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder approved this pull request. https://github.com/llvm/llvm-project/pull/74676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2023-12-06 Thread Ian Anderson via cfe-commits
@@ -0,0 +1,131 @@ +// RUN: %clang -### --target=arm64-apple-darwin %s 2>&1 | FileCheck %s --check-prefix=DEFAULT-OPTION + +// RUN: %clang -dM -E --target=arm64-apple-macos %s 2>&1 \ +// RUN: | FileCheck %s -DMAC=1 \ +// RUN:-DOSX=1 \ +// RUN:

[openmp] [lld] [clang-tools-extra] [llvm] [flang] [clang] [mlir] [HLSL] RWBuffer should not have a default parameter (PR #71265)

2023-12-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/71265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [flang] [clang] [lld] [openmp] [llvm] [clang-tools-extra] [HLSL] RWBuffer should not have a default parameter (PR #71265)

2023-12-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/71265 >From 1779fd08dad4f03ae5e9f1803b8ea3d7dc77c093 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 3 Nov 2023 19:03:00 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?UTF-

[flang] [clang] [mlir] [llvm] [lld] [clang-tools-extra] [openmp] [HLSL] RWBuffer should not have a default parameter (PR #71265)

2023-12-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/71265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 61329bd - [HLSL] RWBuffer should not have a default parameter

2023-12-06 Thread via cfe-commits
Author: Justin Bogner Date: 2023-12-06T15:27:27-08:00 New Revision: 61329b9cb155b4902fd7fa4a2367e796d51a URL: https://github.com/llvm/llvm-project/commit/61329b9cb155b4902fd7fa4a2367e796d51a DIFF: https://github.com/llvm/llvm-project/commit/61329b9cb155b4902fd7fa4a2367e796d51a.diff

[clang] [clang-format] Handle merging functions containing only a block comment (PR #74651)

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

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2023-12-06 Thread Zixu Wang via cfe-commits
https://github.com/zixu-w updated https://github.com/llvm/llvm-project/pull/74676 >From cdc7cf721a7d4a6bf318181ea3f37adf7c571ed1 Mon Sep 17 00:00:00 2001 From: Zixu Wang Date: Thu, 14 Sep 2023 17:06:24 -0700 Subject: [PATCH] [clang][PP] Add extension to predefine target OS macros Add an extens

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-06 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Thanks https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >