[PATCH] D153898: [DebugInfo] Enable debug info emission for extern variables in C++

2023-07-06 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa9f5119a78aa: [DebugInfo] Enable debug info emission for extern variables in C++ (authored by chiyuze, committed by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D153229: [llvm] Move StringExtras.h include from Error.h to Error.cpp

2023-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Glad that you landed the first change separately:) The Error.cpp change was reverted by b3c8554f28a95063e406924c25336e0da7efb4fd which was more focused. Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D153229: [llvm] Move StringExtras.h include from Error.h to Error.cpp

2023-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I've used something like `for i in llvm clang clang-tools flang lld lldb bolt mlir; do LIT_OPTS='--filter=xxx --allow-empty-runs' ninja -C /tmp/Rel check-$i` to ensure I have built everything, beside a few projects I run `check-$i`. It's always good to make the last-minu

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D153835#4478700 , @efriedma wrote: > Can you write the complete rule we're trying to follow here? Like, if you > have a free function template, prioritize attributes in the following order > ..., if you have a member functio

[PATCH] D154543: [llvm] Move StringExtras.h include from Error.h to Error.cpp

2023-07-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. I have spot checked a few files and the additional #include looks great! As mentioned in the other patch, it would be better landing the #include adjustment part separately so that the `llvm/

[PATCH] D154543: [llvm] Move StringExtras.h include from Error.h to Error.cpp

2023-07-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > [llvm] Move StringExtras.h include from Error.h to Error.cpp If you land the #include changes separately, I think the tag can be changed to `[Support] `. `Support` is sufficient to refer to llvm-project/llvm/ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1545

[PATCH] D154736: [Driver][ARM] Warn about -mabi= for assembler input with -fno-integrated-as

2023-07-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: michaelplatings, peter.smith, simon_tatham, nathanchance, nickdesaulniers. Herald added a subscriber: kristof.beyls. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscri

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-07-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a subscriber: erichkeane. MaskRay added a comment. In D153835#4481462 , @rjmccall wrote: > We made a decision ten years or so ago to use a slightly different > interpretation of the visibility attributes, so differences from GCC are not >

[PATCH] D150013: [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-07-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Sorry, but I just realized that updating CommonArgs.cpp is wrong... I have fixed it with commit 681cb54a54bb60dea9034b4b0b45ccc392875b9a . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D154396: [clang] Add support for SerenityOS

2023-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Serenity.cpp:85 + auto linkerIs = [Exec](const char *name) { +return llvm::sys::path::filename(Exec).equals_insensitive(name) || + llvm::sys::path::stem(Exec).equals_insensitive(name); -

[PATCH] D154774: [Sema] Respect instantiated-from template's VisibilityAttr for two implicit/explicit instantiation cases

2023-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: clang, aaron.ballman, efriedma, rjmccall, smeenai. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In CodeGenCXX/visibility.cpp, Match GCC for par

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D153835#4481816 , @rjmccall wrote: > I agree that the change to test51 is the right result, yes. The explicit > visibility attribute on the template declaration should take precedence over > the visibility of the types in th

[PATCH] D154786: [Clang][Driver] Pass through the --be8 endian flag to linker in BareMetal driver For Arm.

2023-07-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/ARM.cpp:48 + case llvm::Triple::thumb: +if (Arg *A = Args.getLastArg(options::OPT_mlittle_endian, + options::OPT_mbig_endian)) We can check the option

[PATCH] D154602: [clang][clangd] Don't crash/assert on -gsplit-dwarf=single without output

2023-07-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. This revision now requires changes to proceed. Thanks for the patch! But I share the concern that the test is added to a wrong layer (https://maskray.me/blog/2021-08-08-toolchain-testing#the-test-checks-at-the-wrong-layer). We

[PATCH] D154736: [Driver][ARM] Warn about -mabi= for assembler input with -fno-integrated-as

2023-07-10 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG26718d931fee: [Driver][ARM] Warn about -mabi= for assembler input with -fno-integrated-as (authored by MaskRay). Repository: rG LLVM Github Monore

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > At Indel, we have been building bare-metal embedded applications that run on > custom PowerPC and ARM systems with Clang and LLD for a couple of years now, > using target triples powerpc-indel-eabi, powerpc-indel-eabi750, > arm-indel-eabi, aarch64-indel-eabi (which I

[PATCH] D154797: [CUDA][HIP] Rename and fix `-fcuda-approx-transcendentals`

2023-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/hip-options.hip:179 +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpuinc -nogpulib -fgpu-approx-transcendentals \ +// RUN: --cuda-gpu-arch=gfx906 %s 2>&1 | FileCheck -check-prefixes=APPROX %s + -

[PATCH] D154797: [CUDA][HIP] Rename and fix `-fcuda-approx-transcendentals`

2023-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7228 + } else { +Args.ClaimAllArgs(options::OPT_fgpu_approx_transcendentals); +Args.ClaimAllArgs(options::OPT_fno_gpu_approx_transcendentals); You can use `Args.claimAllArgs

[PATCH] D154797: [CUDA][HIP] Rename and fix `-fcuda-approx-transcendentals`

2023-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Some nits about testing CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154797/new/ https://reviews.llvm.org/D154797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D154357#4485881 , @jroelofs wrote: > gcc docs seem to indicate that these are valid triples: > > https://gcc.gnu.org/install/specific.html#powerpc-x-eabi Thanks, good to know. `powerpc-*-eabi` indicates that the eabi environme

[PATCH] D151683: [clang] Enable C++11-style attributes in all language modes

2023-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D151683#4486321 , @aaron.ballman wrote: > Aside from the failing precommit CI test case in C, I think this LGTM. I've > added @MaskRay as the code owner for the command line option changes in case > he's got concerns regardi

[PATCH] D154902: [Clang] Default ToolChain::IsIntegratedAssemblerDefault to true

2023-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. `[Driver]` seems more specific than `[Clang]` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154902/new/ https://reviews.llvm.org/D154902 ___ cfe-commits mailing list cfe-commits@

[PATCH] D153906: [clang] Allow disassembly of multi-module bitcode files

2023-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Frontend/split-lto-ir-support.cpp:1 +// RUN: %clang -c -flto=thin %s -o %t0.bc +// RUN: mkdir %t1.d Without -fsanitize=cfi or -fwhole-program-vtables, -fsplit-lto-unit is not the default. You need to specify

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. LGTM. CC1 -mlink-bitcode-file is an interesting option from 2011: f1d76db466b2a50781c0754b86ac994dd07b5041 I wonder what the original use case is... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152391/new/ https://reviews

[PATCH] D153906: [clang] Allow disassembly of multi-module bitcode files

2023-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. This revision now requires changes to proceed. > [clang] Allow disassembly of multi-module bitcode files The subject confused me as I did not recognize what disassembly means :) > Clang currently exits with an error message i

[PATCH] D154923: [CodeGen] Support bitcode input containing multiple modules

2023-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: ormris, efriedma, rjmccall, aaron.ballman. Herald added subscribers: steven_wu, hiraditya. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When usi

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D154357#4487896 , @cwalther wrote: > Thanks for the comments. Yes, `powerpc-*-eabi` should be valid (sorry if I > was unclear about that – my parenthetical was only about AArch64). There is a > PowerPC EABI: https://www.nxp.c

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D154357#4487896 , @cwalther wrote: > [...] There is a PowerPC EABI: > https://www.nxp.com/docs/en/application-note/PPCEABI.pdf . I wouldn’t know if > Clang/LLD obey it, but it works for us… Good to know! I read a newer ABI n

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/baremetal.cpp:348 +// RUN: %clang %s -### --target=powerpc-unknown-eabi 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-PPCEABI %s Without a sysroot, we may pick up powerpc-unknown-eabi-gcc (if ins

[PATCH] D154786: [Clang][Driver] Pass through the --be8 endian flag to linker in BareMetal driver For Arm.

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/ARM.cpp:40 +bool arm::isArmBigEndian(const llvm::Triple &Triple, const ArgList &Args) { + bool IsBigEndian = false; + We do not need this variable. After an early return, we can just `re

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added inline comments. This revision now requires changes to proceed. Comment at: compiler-rt/lib/xray/xray_trampoline_loongarch64.S:20 + .type __xray_FunctionEntry,@function +__xray_FunctionEntry: + .cfi_startproc ---

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/xray/xray_loongarch64.cpp:30 +// are 2RI12-type and 2RI16-type. +inline static uint32_t +encodeInstruction2RIx(uint32_t Opcode, uint32_t Rd, uint32_t Rj, Early xray code unfortunately does not respect the

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The code change looks good but the driver test will cause an issue. I think we need a fake sysroot tree under `Inputs/`. Otherwise if we have a system cross gcc at `/usr/lib/gcc{,-cross}/powerpc64le-unknown-eabi/12`, Clang Driver will pick up these files. This is really

[PATCH] D154602: [clang][clangd] Don't crash/assert on -gsplit-dwarf=single without output

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. https://maskray.me/blog/2021-08-08-toolchain-testing#the-test-checks-at-the-wrong-layer I think there is a minor "The test checks too little" issue as we can utilize the test to check a few

[PATCH] D154602: [clang][clangd] Don't crash/assert on -gsplit-dwarf=single without output

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/unittests/Driver/ToolChainTest.cpp:371 +TEST(CompilerInvocation, SplitSwarfSingleCrash) { + static constexpr const char *Args[] = {"clang", "-gdwarf-4", "-gsplit-dwarf=single", "-c", "foo.cpp"}; + CreateInvocationOptions CIOpts;

[PATCH] D152924: [libLTO][AIX] Respect `-f[no]-integrated-as` on AIX

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/lto-aix.c:76 // CSPGO: "-bplugin_opt:-cs-profile-generate" "-bplugin_opt:-cs-profile-path=default_%m.profraw" +// +// Test integrated assembler options This `^//$` line is not useful. Some tests use t

[PATCH] D152924: [libLTO][AIX] Respect `-f[no]-integrated-as` on AIX

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. We have `TargetOptions::DisableIntegratedAS` (your llc.cpp change). Do you know why it is not feasible for the places you want to check? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152924/new/ https://reviews.llvm.org/D1

[PATCH] D152924: [libLTO][AIX] Respect `-f[no]-integrated-as` on AIX

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Some nits about testing, otherwise LG In D152924#4490950 , @qiongsiwu1 wrote: > In D152924#4490581 , @MaskRay wrote: > >> We have `TargetOptions::DisableI

[PATCH] D154602: [clang][clangd] Don't crash/assert on -gsplit-dwarf=single without output

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: clang/unittests/Driver/ToolChainTest.cpp:371 +TEST(CompilerInvocation, SplitSwarfSingleCrash) { + static constexpr const char *Args[] = {"clang", "-gdwarf-4", "-gsplit-dwarf=single", "-c", "foo.cpp"}; +

[PATCH] D154923: [CodeGen] Support bitcode input containing multiple modules

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D154923#4491411 , @efriedma wrote: > If I follow correctly, this is basically undoing the splitting that was done > by the command that produced the bitcode file? Yes, undoing `llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp

[PATCH] D146777: [clang] Preliminary fat-lto-object support

2023-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:623 +if (Args.hasArg(options::OPT_ffat_lto_objects)) + CmdArgs.push_back("-fat-lto-objects"); } New lld long options only allow `--` form. So use two dashes. Repos

[PATCH] D152604: [Driver] Default -fsanitize-address-globals-dead-stripping to true for ELF

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D152604#4494975 , @rnk wrote: > It sounds like two users have hit this now: Chromium and Rust folks. This is > a flag flip, so it's pretty small and safe to rollback, and IMO we should > consider that while we debug the under

[PATCH] D155123: [Driver] Warn about -mios-version-min instead of erroring out when targeting MachO embedded architectures

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/test/Driver/macho-embedded.c:9 +// RUN: %clang -arch armv7m -target thumbv7-apple-ios -mios-version-min=5 -### -c %s 2>&1 | FileCheck %s --check-

[PATCH] D146777: [clang] Preliminary fat-lto-object support

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D146777#4491842 , @paulkirth wrote: > Rebase and try to accomodate Unified LTO changes. > > Based on the Unified LTO patches, I think this is the correct handling for > FatLTO, but I'd like to get a second opinion before landin

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. One nit about the test. Comment at: llvm/test/CodeGen/LoongArch/xray-attribute-instrumentation.ll:24 +; CHECK-NEXT: .Lxray_sleds_start0: +; CHECK-NEXT: .Ltmp0: +; CHECK-NEX

[PATCH] D146777: [clang] Preliminary fat-lto-object support

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/docs/ReleaseNotes.rst:268 +- ``-ffat-lto-objects`` can now be used to emit object files with both object + code and LLVM bitcode. Previously this flag was ignored for GCC compatibility. + You can insert the https

[PATCH] D155123: [Driver] Warn about -mios-version-min instead of erroring out when targeting MachO embedded architectures

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/macho-embedded.c:16 +// CHECK-MACHO-EMBEDDED-DIAG: clang: warning: argument unused during compilation: '-mios-version-min=5' // CHECK-MACHO-EMBEDDED: "-triple" "{{thumbv[67]e?m}}-apple-unknown-macho" ---

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. In D154357#4492625 , @cwalther wrote: > I am unable to provoke any problem with my tests by putting various things in > `/usr/lib/gcc/`, and I also

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D154357#4496247 , @cwalther wrote: > That summary wasn’t intended to be a commit message at all, but a description > of the problem and start of the discussion. My commit message was part of the > uploaded patch (since I gene

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D154357#4497973 , @cwalther wrote: > Okay. No, I don’t have write access (as far as I know) and would appreciate > if you (or any other maintainer) could land the patch, with any commit > message you deem appropriate. Happy

[PATCH] D155213: [HIP] Add `-fno-hip-uniform-block`

2023-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7226 + } else { +Args.claimAllArgs(options::OPT_fhip_uniform_block, + options::OPT_fno_hip_uniform_block); Why is the -Wunused-command-line-argument warning

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-13 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd986462b5053: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain (authored by cwalther, committed by MaskRay). Repository: rG LLVM

[PATCH] D155213: [HIP] Add `-fno-hip-uniform-block`

2023-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7226 + } else { +Args.claimAllArgs(options::OPT_fhip_uniform_block, + options::OPT_fno_hip_uniform_block); yaxunl wrote: > MaskRay wrote: > > Why is the -Wu

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Changing the default improves GCC compatibility (`Enabled by default under -std=c++14 and above.`) and I think is the right direction. @wangpc You can use your new username to commandeer this revision? To other reviewers, what's still blocked now that the Apple target i

[PATCH] D146777: [clang] Preliminary fat-lto-object support

2023-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thanks for the update. Can you add a comment for the `-funified-lto` combination? It's unclear what it does... `clang -flto=thin -ffat-lto-objects -funified-lto -fuse-ld=lld foo.c` I've left some comments about missing test coverage. Comment at: clan

[PATCH] D146777: [clang] Preliminary fat-lto-object support

2023-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGen/embed-fat-lto-objects.c:3 +// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=full -ffat-lto-objects -emit-llvm < %s | FileCheck %s --check-prefixes=FULL,SPLIT + +// RUN: %clang -cc1 -triple x86_64-unknown-li

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D154357#4500241 , @cwalther wrote: > Thank you! > > So I guess next time I submit a patch here (nothing planned at the moment), I > should put the proposed commit message into the summary field and the > backstory and start o

[PATCH] D155336: [clang][JumpDiagnostics] bring VerifyIndirectOrAsmJumps to C++17

2023-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155336/new/ https://reviews.llvm.org/D155336

[PATCH] D154923: [CodeGen] Support bitcode input containing multiple modules

2023-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D154923#4491673 , @MaskRay wrote: > In D154923#4491411 , @efriedma > wrote: > >> If I follow correctly, this is basically undoing the splitting that was done >> by the command that pr

[PATCH] D155339: Enable zba and zbs for RISCV64 Android

2023-07-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/riscv-features.c:13 +// ANDROID: "-target-feature" "+zba" // ANDROID: "-target-feature" "+zbb" If the features are adjacent, test them on one line. `// ANDROID: "-target-feature" "+zba" "-target-fea

[PATCH] D146777: [clang] Preliminary fat-lto-object support

2023-07-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Thank you for the update. I think this Clang patch is good enough to land even if the lld part is still in review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146777/new/ https://reviews.l

[PATCH] D155490: [clang][docs] Fix tag target name in link

2023-07-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I find that `See patch` is used elsewhere. Does this change fix a sphinx bot? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155490/new/ https://reviews.llvm.org/D155490 ___ cfe-c

[PATCH] D154774: [Sema] Respect instantiated-from template's VisibilityAttr for two implicit/explicit instantiation cases

2023-07-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. ping:) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154774/new/ https://reviews.llvm.org/D154774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D158301: Add back overriding-t-options for -m-version-min diagnostic

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/darwin-version.c:217 // RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV1 %s -// CHECK-VERSION-TNO-OSV1: overriding '-mmacos-version-min=10.6' option with '-target x86_64-apple-macos10.11.2' +// CHECK-VERSION-TNO

[PATCH] D158301: Add back overriding-t-options for -m-version-min diagnostic

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/darwin-version.c:217 // RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV1 %s -// CHECK-VERSION-TNO-OSV1: overriding '-mmacos-version-min=10.6' option with '-target x86_64-apple-macos10.11.2' +// CHECK-VERSION-TNO

[PATCH] D158641: [AArch64][Android][DRAFT] Fix FMV ifunc resolver usage on old Android APIs.

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/aarch64-features.c:10 // Check Function Multi Versioning option and rtlib dependency. -// RUN: %clang --target=aarch64-linux-android -rtlib=compiler-rt \ +// RUN: %clang --target=aarch64-linux-android23 -rtlib=compiler

[PATCH] D158641: [AArch64][Android][DRAFT] Fix FMV ifunc resolver usage on old Android APIs.

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D158641#4611731 , @rprichard wrote: > [...] > > I suspect Bionic ought to apply relocations to libraries in a bottom-up > fashion, so that libc.so is relocated before the executable or shared > objects, but I _think_ it's cur

[PATCH] D158614: [UBSan] Disable the function sanitizer on an execute-only target.

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:326 def err_unsupported_abi_for_opt : Error<"'%0' can only be used with the '%1' ABI">; +def err_unsupported_opt_for_execute_only_target +: Error<"unsupported option '%0' for the e

[PATCH] D152279: [Driver] Default -msmall-data-limit= to 0

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I am still interested in moving this forward. What should be done here? If the decision is to keep the current odd default 8 for `toolchains::RISCVToolChain`, I guess I'll have to take the compromise as making a step forward is better than nothing. Repository: rG LL

[PATCH] D152279: [Driver] Default -msmall-data-limit= to 0

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D152279#4612099 , @craig.topper wrote: > In D152279#4612087 , @MaskRay wrote: > >> I am still interested in moving this forward. What should be done here? If >> the decision is to kee

[PATCH] D158688: [Driver,ARM,AArch64] Ignore -mbranch-protection= diagnostics for assembler input

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: chill, peter.smith, simon_tatham, stuij. Herald added a subscriber: kristof.beyls. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Some options are

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7a41af86041b: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute (authored by MaskRay). Changed prior to commit: https://reviews.

[PATCH] D158461: [Driver] Remove unlikely-working Minix.cpp and Contiki.cpp

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @brad :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158461/new/ https://reviews.llvm.org/D158461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D158706: [Driver] Remove Myriad.cpp

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: brad, jyknight, waltl. Herald added subscribers: jrtc27, fedor.sergeev. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. I am trying to clean up GCC

[PATCH] D158461: [Driver] Remove unlikely-working Minix.cpp and Contiki.cpp

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3515409012fa: [Driver] Remove unlikely-working Minix.cpp and Contiki.cpp (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D158755: Make "-fno-split-machine-functions" a valid flag for all archs.

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thanks for the patch. We need a test. I cleaned up `fsplit-machine-functions.c` a bit. You can rebase and modify the `not %clang -### -c --target=arm-unknown-linux -fsplit-machine-functions -fno-split-machine-functions` RUN line in `clang/test/Driver/fsplit-machine-fun

[PATCH] D158755: Make "-fno-split-machine-functions" a valid flag for all archs.

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions.c:19 +// RUN: not %clang -### -x cuda -S -nocudainc -nocudalib -fsplit-machine-functions %s 2>&1 | FileCheck %s --check-prefix=ERR2 +// ERR2: clang: error: unsupported option '-fsplit-machine-f

[PATCH] D158411: [clang] [MinGW] Pass LTO options to the linker

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158411/new/ https://reviews.llvm.org/D158411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D158755: Make "-fno-split-machine-functions" a valid flag for all archs.

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. With a test nit Comment at: clang/test/Driver/fsplit-machine-functions.c:19 +// RUN: not %clang -### -x cuda -S -nocudainc -nocudalib -fsplit-machine-functions %s 2>&1 | F

[PATCH] D158755: Make "-fno-split-machine-functions" a valid flag for all archs.

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Make "-fno-split-machine-functions" a valid flag for all archs. Driver changes usually are named `[Driver] ...`. The popular convention is to omit the full stop at the end of the subject. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D158641: [AArch64][Android][DRAFT] Fix FMV ifunc resolver usage on old Android APIs.

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/builtins/cpu_model.c:1382 +return; +#if defined(__ANDROID__) + // ifunc resolvers don't have hwcaps in arguments on Android API lower enh wrote: > ilinpv wrote: > > MaskRay wrote: > > > I am unfamili

[PATCH] D158706: [Driver] Remove Myriad.cpp

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2958 default: return getTriple().getVendor() != llvm::Triple::Myriad; } brad wrote: > You might as well remove this. Will do! Rep

[PATCH] D158706: [Driver] Remove Myriad.cpp

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. MaskRay marked an inline comment as done. Closed by commit rGaa9d7d1cd0af: [Driver] Remove Myriad.cpp (authored by MaskRay). Herald added a project: LLVM. Herald added

[PATCH] D158706: [Driver] Remove Myriad.cpp

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2958 default: return getTriple().getVendor() != llvm::Triple::Myriad; } MaskRay wrote: > brad wrote: > > You might as well remove this. > Will do! There is some Myriad remai

[PATCH] D158811: [X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4}

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: FreddyYe, pengfei, RKSimon, skan, erichkeane. Herald added a subscriber: hiraditya. Herald added a reviewer: ctetreau. Herald added a project: All. MaskRay requested review of this revision. Herald added projects: clang, LLVM. Herald added sub

[PATCH] D158385: [tsan] Respect !nosanitize metadata and remove gcov special case

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5624e86ae0fb: [tsan] Respect !nosanitize metadata and remove gcov special case (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D158811: [X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4}

2023-08-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 553524. MaskRay marked 2 inline comments as done. MaskRay added a comment. add assert Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158811/new/ https://reviews.llvm.org/D158811 Files: clang/lib/Basic/Targets

[PATCH] D158614: [UBSan] Disable the function sanitizer on an execute-only target.

2023-08-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:326 def err_unsupported_abi_for_opt : Error<"'%0' can only be used with the '%1' ABI">; +def err_unsupported_opt_for_execute_only_target +: Error<"unsupported option '%0' for the e

[PATCH] D158920: Delete CloudABI support

2023-08-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Thanks for the cleanup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158920/new/ https://reviews.llvm.org/D158920 __

[PATCH] D158811: [X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4}

2023-08-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 553698. MaskRay edited the summary of this revision. MaskRay added a comment. rebase after precommitting `target("x86-64") and cpu_specific(x86_64) attributes` tests add `__builtin_cpu_supports x86-64-v5` test Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D158811: [X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4}

2023-08-25 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG27da15381cbe: [X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4} (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D158811: [X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4}

2023-08-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/TargetParser/X86TargetParser.cpp:718 ; -FeaturesMask |= (1ULL << Feature); +FeatureMask[Feature / 32] |= 1U << (Feature % 32); } pengfei wrote: > Should we use vector for future expansion, or

[PATCH] D158641: [AArch64][Android][DRAFT] Fix FMV ifunc resolver usage on old Android APIs.

2023-08-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/builtins/cpu_model.c:1379 +void init_cpu_features_resolver(unsigned long hwcap, const __ifunc_arg_t *arg) { + if (__aarch64_cpu_features.features) It seems that we don't need the `_constructor` functi

[PATCH] D158963: [CodeGen] Function multi-versioning: don't set comdat for internal linkage resolvers

2023-08-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: erichkeane, ilinpv, pengfei, RKSimon. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For function multi-versioning using the target and target_clo

[PATCH] D158955: [Driver] Improve legibility of ld -z options on Solaris

2023-08-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158955/new/ https://reviews.llvm.org/D158955

[PATCH] D158688: [Driver,ARM,AArch64] Ignore -mbranch-protection= diagnostics for assembler input

2023-08-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping:) This is probably a good candidate for `release/17.x` backporting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158688/new/ https://reviews.llvm.org/D158688 ___ cfe-commit

[PATCH] D157813: [VE][Clang] Change to enable VPU flag by default

2023-08-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/Arch/VE.cpp:22 + std::vector &Features) { + // Defaults. + bool EnableVPU = true;

[PATCH] D157813: [VE][Clang] Change to enable VPU flag by default

2023-08-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > [VE][Clang] Change to enable VPU flag by default For components like llvm/, clang/, we usually use a more specific tag. I'd pick `[Driver]` over `[Clang]`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157813/new/ https

[PATCH] D159010: [Driver,X86] Ignore -mfpmath= for assembler input

2023-08-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: mgorny, thesamesam. Herald added subscribers: pengfei, kristof.beyls. Herald added a reviewer: ctetreau. Herald added a reviewer: ctetreau. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang.

[PATCH] D159010: [Driver,X86] Ignore -mfpmath= for assembler input

2023-08-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/X86.cpp:121 const ArgList &Args, - std::vector &Features) { + std::vector &Features, bool ForAS) { + if (ForAS)

<    22   23   24   25   26   27   28   29   30   31   >