aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools
AgeCommit message (Collapse)AuthorFilesLines
13 hours[AMDGPU] Introduce a new generic target `gfx9-4-generic` (#115190)Shilei Tian1-0/+1
This patch introduces a new generic target, `gfx9-4-generic`. Since it doesn’t support FP8 and XF32-related instructions, the patch includes several code reorganizations to accommodate these changes.
23 hours[llvm] Remove redundant control flow statements (NFC) (#115831)Kazu Hirata1-1/+0
Identified with readability-redundant-control-flow.
3 days[ORC] Move absoluteSymbols from Core.h to new AbsoluteSymbols.h header. NFC.Lang Hames2-0/+2
Continuing Core.h clean-up. If you see any errors about a missing absoluteSymbols function you need to include the new AbsoluteSymbols.h header.
3 days[JITLink] Use `rsplit` on `-sectcreate` argument in llvm-jitlink (#115511)Douglas1-1/+1
This accounts for cases where the file path may contain an `@` symbol. In such cases, the split occurs too early causing argument parsing to fail.
4 days[llvm] Add explicit visibility macros to YAMLTraits classes (#111484)Thomas Fransham1-11/+11
These symbols need to be exported for llvm-pdbutil when using windows shared library builds. Exclude the YAML traits declared in llvm-pdbutil so there not declared as dllimported which will causing missing symbol errors for windows shared library builds. This is part of the work to enable LLVM_BUILD_LLVM_DYLIB and plugins on window.
5 days[ObjectYAML][ELF] Allow verdaux entry offset to be user-definedAntonio Frighetto1-0/+8
5 days[llvm-reduce] Reduce samesign flag from icmp (#115492)Yingwei Zheng1-0/+3
6 days[llvm-objdump] Implement decoding auxiliary header for xcoff with ↵zhijian lin1-4/+200
llvm-objdump --private-headers (#105682) Implement decoding auxiliary header of XCOFF object file with llvm-objdump --private-headers
6 days[ORC] Switch to new visibility macros for JIT debug symbols (#113848)Thomas Fransham2-2/+4
Use LLVM_ALWAYS_EXPORT for __jit_debug_descriptor and __jit_debug_register_code so there exported even if LLVM is not built as a shared library. This is part of the work to enable LLVM_BUILD_LLVM_DYLIB and plugins on windows #109483.
6 days[Docs][llvm-exegesis] Clarify AArch64 support (#114989)Sjoerd Meijer1-3/+4
Claiming AArch64 support for llvm-exegesis is a bit of a stretch in my opinion as only a couple of opcodes with GPR64 operands will work for snippet benchmarking, so I propose to clarify that AArch64 support is very experimental. Also added some clarifications about its libpfm4 dependency.
6 daysRevert "TLS loads opimization (hoist)" (#114740)abhishek-kaushik221-1/+0
This reverts commit c31014322c0b5ae596da129cbb844fb2198b4ef4. Based on the discussions in #112772, this pass is not needed after the introduction of `llvm.threadlocal.address` intrinsic. Fixes https://github.com/llvm/llvm-project/issues/112771.
7 days[dsymutil] Add missing newlines in error messages. (#115191)Ryan Mansfield1-2/+2
Errors like "cannot create bundle: Not a directory" or "error: a.out.dSYM: Is a directory" were being emitted without a newline.
8 days[llvm-readobj] Use heterogenous lookups with std::map (NFC) (#114929)Kazu Hirata1-2/+2
Heterogenous lookups allow us to call find with StringRef, avoiding a temporary heap allocation of std::string.
8 daysRemove leftover uses of llvm::Type::getPointerTo() (#114993)Youngsuk Kim1-1/+1
`llvm::Type::getPointerTo()` is to be deprecated. Replace remaining uses of it.
9 days[CGData][llvm-cgdata] Support for stable function map (#112664)Kyungwoo Lee1-12/+36
This introduces a new cgdata format for stable function maps. The raw data is embedded in the __llvm_merge section during compile time. This data can be read and merged using the llvm-cgdata tool, into an indexed cgdata file. Consequently, the tool is now capable of handling either outlined hash trees, stable function maps, or both, as they are orthogonal. Depends on #112662. This is a patch for https://discourse.llvm.org/t/rfc-global-function-merging/82608.
9 days[sancov] Use heterogeneous lookups with std::map (NFC) (#113406)Kazu Hirata1-3/+3
9 days[llvm-exegesis] Use older instructions to load lower vregs (#114768)Aiden Grossman1-4/+8
This patch makes X86 llvm-exegesis unconditionally use older instructions to load the lower vector registers, rather than trying to use AVX512 for everything when available. This fixes a case where we would try and load AVX512 registers using the older instructions if such a snippet was constructed while -mcpu was set to something that did not support AVX512. This would lead to a machine code verification error rather than resulting in incomplete snippet setup, which seems to be the intention of how this should work. Fixes #114691.
10 days[PassBuilder] Add `ThinOrFullLTOPhase` to optimizer pipeline (#114577)Shilei Tian1-2/+2
10 days[PassBuilder] Add `ThinOrFullLTOPhase` to early simplication EP call backs ↵Shilei Tian1-1/+1
(#114547) The early simplication pipeline is used in non-LTO and (Thin/Full)LTO pre-link stage. There are some passes that we want them in non-LTO mode, but not at LTO pre-link stage. The control is missing currently. This PR adds the support. To demonstrate the use, we only enable the internalization pass in non-LTO mode for AMDGPU because having it run in pre-link stage causes some issues.
2024-10-29[MemProf] Support for random hotness when writing profile (#113998)Teresa Johnson1-1/+11
Add support for generating random hotness in the memprof profile writer, to be used for testing. The random seed is printed to stderr, and an additional option enables providing a specific seed in order to reproduce a particular random profile.
2024-10-28Add DILabel functions for LLVM-C (#112840)tf2spi1-2/+19
Addresses #112799
2024-10-28[llvm-objdump] Handle -M for --machoFangrui Song3-1/+6
--macho -d uses the `parseInputMachO` code path, which does not handle -M. Add -M handling for --macho as well. Close #61019 Pull Request: https://github.com/llvm/llvm-project/pull/113795
2024-10-23[llvm-cxxfilt] De-emphasize "function" in llvm-cxxfilt docs and --help (#113309)Edd Dawson1-2/+2
llvm-cxxfilt can demangle names of data symbols, in addition to function names. $ llvm-cxxfilt _ZN6garden5gnomeE garden::gnome And type names too, on request: $ llvm-cxxfilt -t i int Update some overly specific the wording in the --help and documentation that suggests otherwise.
2024-10-23[LLVM][CMake][MSVC] Wrap linker flags for ICX on Windows (#112680)Mészáros Gergely1-1/+1
The Intel C++ Compiler (ICX) passes linker flags through the driver unlike MSVC and clang-cl, and therefore needs them to be prefixed with `/Qoption,link` (the equivalent of `-Wl,` for gcc on *nix). Use `LINKER:` prefix wherever supported by cmake, when that's not possible fall-back to `${CMAKE_CXX_LINKER_WRAPPER_FLAG}`. CMake replaces these with `/Qoption,link` for ICX and with the empty string for MSVC and clang-cl. For `target_link_libraries` neither `LINKER:` (not supported prior to CMake 3.32) nor `${CMAKE_CXX_LINKER_WRAPPER_FLAG}` (does not begin with `-` would be taken as a library name) works, use `-Qoption,link` directly within a conditional generator expression that we're linking with ICX. For MSVC and clang-cl no functional change is intended. Tested by compiling with ICX and setting `CMAKE_(EXE|SHARED|STATIC|MODULE)_LINKER_FLAGS_INIT` to `-Werror=unknown-argument`. RFC: https://discourse.llvm.org/t/rfc-cmake-linker-flags-need-wl-equivalent-for-intel-c-icx-on-windows/82446
2024-10-23[AMDGPU] Add a new target for gfx1153 (#113138)Carl Ritson1-0/+1
2024-10-22[NFC][Fuzzer] Refactor to avoid a false warning from gcc (#112944)Jinsong Ji2-10/+11
This is one of the many PRs to fix errors with LLVM_ENABLE_WERROR=on. Built by GCC 11. Refactor the code to avoid the false warning llvm-project/llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp llvm-project/llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp: In function ‘int LLVMFuzzerInitialize(int*, char***)’: llvm-project/llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp:141:43: error: ISO C++ forbids zero-size array ‘argv’ [-Werror=pedantic] 141 | ExitOnError ExitOnErr(std::string(*argv[0]) + ": error:"); |
2024-10-22[dsymutil] Provide an option to ignore object timestamp mismatches (#113238)Jonas Devlieghere4-22/+42
Provide a option (--no-object-timestamp) to ignore object file timestamp mismatches. We already have a similar option for Swift modules (--no-swiftmodule-timestamp). rdar://123975869
2024-10-22[dsymutil] Share one BinaryHolder between debug map parsing & linking (#113234)Jonas Devlieghere5-42/+34
I (re)discovered that dsymutil was instantiating two BinaryHolders: one for parsing the debug map and one for linking. That really defeats the purpose of the BinaryHolder as it serves as a cache. Fix the issue and remove an old FIXME.
2024-10-22[llvm-jitlink] Use heterogenous lookups with std::map (NFC) (#113245)Kazu Hirata2-2/+2
2024-10-21[tools] Don't call StringRef::str() when calling StringMap::find (NFC) (#113119)Kazu Hirata2-3/+3
StringMap::find takes StringRef. We don't need to create an instance of std::string from StringRef only to convert it right back to StringRef.
2024-10-21[llvm-cxxfilt] Add --quote option to quote demangled function names (#111871)Ronan Keryell2-5/+19
This is useful when looking at LLVM/MLIR assembly produced from C++ sources. For example cir.call @_ZN3aie4tileILi1ELi4EE7programIZ4mainE3$_0EEvOT_(%2, %7) : will be translated to cir.call @"void aie::tile<1, 4>::program<main::$_0>(main::$_0&&)"(%2, %7) : which can be parsed as valid MLIR by the right mlir-lsp-server. If a symbol is already quoted, do not quote it more. --------- Co-authored-by: James Henderson <jh7370@my.bristol.ac.uk>
2024-10-20[sancov] Avoid repeated map lookups (NFC) (#113026)Kazu Hirata1-4/+3
2024-10-20[Coverage] Introduce "partial fold" on BranchRegion (#112694)NAKAMURA Takumi5-55/+71
Currently both True/False counts were folded. It lost the information, "It is True or False before folding." It prevented recalling branch counts in merging template instantiations. In `llvm-cov`, a folded branch is shown as: - `[True: n, Folded]` - `[Folded, False n]` In the case If `n` is zero, a branch is reported as "uncovered". This is distinguished from "folded" branch. When folded branches are merged, `Folded` may be dissolved. In the coverage map, either `Counter` is `Zero`. Currently both were `Zero`. Since "partial fold" has been introduced, either case in `switch` is omitted as `Folded`. Each `case:` in `switch` is reported as `[True: n, Folded]`, since `False` count doesn't show meaningful value. When `switch` doesn't have `default:`, `switch (Cond)` is reported as `[Folded, False: n]`, since `True` count was just the sum of `case`(s). `switch` with `default` can be considered as "the statement that doesn't have any `False`(s)".
2024-10-19[llvm-diff] Avoid repeated hash lookups (NFC) (#113025)Kazu Hirata1-3/+3
2024-10-18[llvm-readtapi] Simplify code with StringMap::operator[] (NFC) (#112824)Kazu Hirata1-2/+2
2024-10-17[LTO] Add function alias as function instead of data (#112599)Shimin Cui1-2/+63
On AIX, for undefined functions, only the dotnamed symbols (the address of the function) are generated after linking (i.e., no named function symbol is generated).   Currently, all alias symbols are added as defined data symbols when parsing symbols in LTOModule (the Link Time Optimization library used by linker to optimization code at link time). On AIX, if the function alias is used in the native object, and only its dotnamed symbol is generated, the linker will have problem to match the dotnamed symbol from the native object and the defined symbol marked as data from the bitcode at LTO linktime.   This patch is to add function alias as function instead of data.
2024-10-16[ORC][llvm-jitlink] Add support for forced loading of archive members.Lang Hames1-6/+26
This patch adds support for forced loading of archive members, similar to the behavior of the -all_load and -ObjC options in ld64. To enable this, the StaticLibraryDefinitionGenerator class constructors are extended with a VisitMember callback that is called on each member file in the archive at generator construction time. This callback can be used to unconditionally add the member file to a JITDylib at that point. To test this the llvm-jitlink utility is extended with -all_load (all platforms) and -ObjC (darwin only) options. Since we can't refer to symbols in the test objects directly (these would always cause the member to be linked in, even without the new flags) we instead test side-effects of force loading: execution of constructors and registration of Objective-C metadata. rdar://134446111
2024-10-16[ORC][COFF] Remove the `ExecutionSession&` argument to `COFFPlatform` ↵Tyler Kenney1-3/+3
factory & constructor (#112419) We can get a reference to the `ExecutionSession` from the `ObjectLinkingLayer` argument, so there's no need to pass it in separately. This mirrors recent changes to `ElfNixPlatform` and `MachOPlatform` by @lhames in https://github.com/llvm/llvm-project/commit/3dba4ca155e0b460ca82917b25d3624eb5825940 and https://github.com/llvm/llvm-project/commit/cc20dd285ab72292a1d383d0779aecbe5e1ccf81.
2024-10-12[ORC] Introduce IRPartitionLayer for common partition functionality.Sunho Kim1-1/+2
2024-10-11[llvm-profdata] Default to MemProf version 3 (#108863)Kazu Hirata1-1/+1
It's very confusing to have support for Verion 3 but not default to it. This patch teaches llvm-profdata to use MemProf version 3 by default.
2024-10-11[NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (#111752)Rahul Joshi1-1/+1
Rename the function to reflect its correct behavior and to be consistent with `Module::getOrInsertFunction`. This is also in preparation of adding a new `Intrinsic::getDeclaration` that will have behavior similar to `Module::getFunction` (i.e, just lookup, no creation).
2024-10-11[ORC][ELF] Remove the ExecutionSession& argument to ELFNixPlatform::Create.Lang Hames1-2/+2
We can get a reference to the ExecutionSession from the ObjectLinkingLayer argument, so there's no need to pass it in separately.
2024-10-10llvm-reduce: Fix assert on invokes with catchswitch (#111838)Matt Arsenault1-2/+11
This is the minimal change to avoid the assert. There's an API flaw in invoke instructions where getLandingPad assumes all invoke unwind blocks have landingpads, when some have catchswitch instead. Fixes #111817
2024-10-09llvm-reduce: Fix not checking shouldKeep in special-globals reduction (#111647)Matt Arsenault1-2/+4
2024-10-08[llvm-profdata] Avoid repeated hash lookups (NFC) (#111629)Kazu Hirata1-5/+3
2024-10-09[ORC][MachO] Remove the ExecutionSession& argument to MachOPlatform::Create.Lang Hames1-2/+2
We can get a reference to the ExecutionSession from the ObjectLinkingLayer argument, so there's no need to pass it in separately.
2024-10-07[llvm-remarkutil] Simplify code with std::map::operator[] (NFC) (#111407)Kazu Hirata1-6/+2
2024-10-07[llvm][gold] Fix syntax error (#111412)Paul Kirth1-1/+1
This seems to have been overlooked in #109847, probably because most bots don't build w/ gold enabled.
2024-10-07Make WriteIndexesThinBackend multi threaded (#109847)Nuri Amari2-2/+3
We've noticed that for large builds executing thin-link can take on the order of 10s of minutes. We are only using a single thread to write the sharded indices and import files for each input bitcode file. While we need to ensure the index file produced lists modules in a deterministic order, that doesn't prevent us from executing the rest of the work in parallel. In this change we use a thread pool to execute as much of the backend's work as possible in parallel. In local testing on a machine with 80 cores, this change makes a thin-link for ~100,000 input files run in ~2 minutes. Without this change it takes upwards of 10 minutes. --------- Co-authored-by: Nuri Amari <nuriamari@fb.com>
2024-10-07[llvm-dis] Fix non-deterministic disassembly across multiple inputs (#110988)Peter Waller1-4/+6
Prior to this patch, the LLVMContext was shared across inputs to llvm-dis. Consequently, NamedStructTypes was shared across inputs, which impacts StructType::setName - if a name was reused across inputs, it would get renamed during construction of the struct type, leading to tricky to diagnose confusion.