Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6 |
|
#
dd647e3e |
| 11-Dec-2024 |
Chandler Carruth <chandlerc@gmail.com> |
Rework the `Option` library to reduce dynamic relocations (#119198)
Apologies for the large change, I looked for ways to break this up and
all of the ones I saw added real complexity. This change f
Rework the `Option` library to reduce dynamic relocations (#119198)
Apologies for the large change, I looked for ways to break this up and
all of the ones I saw added real complexity. This change focuses on the
option's prefixed names and the array of prefixes. These are present in
every option and the dominant source of dynamic relocations for PIE or
PIC users of LLVM and Clang tooling. In some cases, 100s or 1000s of
them for the Clang driver which has a huge number of options.
This PR addresses this by building a string table and a prefixes table
that can be referenced with indices rather than pointers that require
dynamic relocations. This removes almost 7k dynmaic relocations from the
`clang` binary, roughly 8% of the remaining dynmaic relocations outside
of vtables. For busy-boxing use cases where many different option tables
are linked into the same binary, the savings add up a bit more.
The string table is a straightforward mechanism, but the prefixes
required some subtlety. They are encoded in a Pascal-string fashion with
a size followed by a sequence of offsets. This works relatively well for
the small realistic prefixes arrays in use.
Lots of code has to change in order to land this though: both all the
option library code has to be updated to use the string table and
prefixes table, and all the users of the options library have to be
updated to correctly instantiate the objects.
Some follow-up patches in the works to provide an abstraction for this
style of code, and to start using the same technique for some of the
other strings here now that the infrastructure is in place.
show more ...
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3 |
|
#
1d77dd50 |
| 09-Aug-2024 |
Jacek Caban <jacek@codeweavers.com> |
[llvm-readobj][COFF] Dump hybrid objects for ARM64X files. (#102245)
|
Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
75bc20ff |
| 06-Jul-2024 |
Kazu Hirata <kazu@google.com> |
[llvm] Remove redundant calls to std::unique_ptr<T>::get (NFC) (#97914)
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5 |
|
#
89c95eff |
| 22-Apr-2024 |
Fangrui Song <i@maskray.me> |
[llvm-readobj] Remove --raw-relr
https://reviews.llvm.org/D47919 dumped RELR relocations as `R_*_RELATIVE` and added --raw-relr (not in GNU) for testing purposes (more readable than `llvm-readelf -x
[llvm-readobj] Remove --raw-relr
https://reviews.llvm.org/D47919 dumped RELR relocations as `R_*_RELATIVE` and added --raw-relr (not in GNU) for testing purposes (more readable than `llvm-readelf -x .relr.dyn`). The option is obsolete after `llvm-readelf -r` output gets improved (#89162).
Since --raw-relr never seems to get more adoption. Let's remove it to avoid some complexity.
Pull Request: https://github.com/llvm/llvm-project/pull/89426
show more ...
|
Revision tags: llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1 |
|
#
9ca8db35 |
| 27-Feb-2024 |
Micah Weston <micahsweston@gmail.com> |
[SHT_LLVM_BB_ADDR_MAP] Adds pretty printing of BFI and BPI for PGO Analysis Map in tools. (#82292)
Primary change is to add a flag `--pretty-pgo-analysis-map` to
llvm-readobj and llvm-objdump that
[SHT_LLVM_BB_ADDR_MAP] Adds pretty printing of BFI and BPI for PGO Analysis Map in tools. (#82292)
Primary change is to add a flag `--pretty-pgo-analysis-map` to
llvm-readobj and llvm-objdump that prints block frequencies and branch
probabilities in the same manner as BFI and BPI respectively. This can
be helpful if you are manually inspecting the outputs from the tools.
In order to print, I moved the `printBlockFreqImpl` function from
Analysis to Support and renamed it to `printRelativeBlockFreq`.
show more ...
|
Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4 |
|
#
26d71d9e |
| 22-Feb-2024 |
Fangrui Song <i@maskray.me> |
[llvm-readobj,ELF] Support --decompress/-z (#82594)
When a section has the SHF_COMPRESSED flag, -p/-x dump the compressed
content by default. In GNU readelf, if --decompress/-z is specified,
-p/-x
[llvm-readobj,ELF] Support --decompress/-z (#82594)
When a section has the SHF_COMPRESSED flag, -p/-x dump the compressed
content by default. In GNU readelf, if --decompress/-z is specified,
-p/-x will dump the decompressed content. This patch implements the
option.
Close #82507
show more ...
|
Revision tags: llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init |
|
#
3c6f47d6 |
| 12-Jan-2024 |
Alexandre Ganea <37383324+aganea@users.noreply.github.com> |
[llvm-driver] Fix usage of `InitLLVM` on Windows (#76306)
Previously, some tools such as `clang` or `lld` which require strict
order for certain command-line options, such as `clang -cc1` or `lld
[llvm-driver] Fix usage of `InitLLVM` on Windows (#76306)
Previously, some tools such as `clang` or `lld` which require strict
order for certain command-line options, such as `clang -cc1` or `lld
-flavor`, would not longer work on Windows, when these tools were linked
as part of `llvm-driver`. This was caused by `InitLLVM` which was part
of the `*_main()` function of these tools, which in turn calls
`windows::GetCommandLineArguments`. That function completly replaces
argc/argv by new UTF-8 contents, so any ajustements to argc/argv made by
`llvm-driver` prior to calling these tools was reset.
`InitLLVM` is now called by the `llvm-driver`. Any tool that
participates in (or is part of) the `llvm-driver` doesn't call
`InitLLVM` anymore.
show more ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0 |
|
#
eb81493e |
| 11-Sep-2023 |
Fangrui Song <i@maskray.me> |
[llvm-readelf] Add --extra-sym-info (#65580)
GNU readelf introduced --extra-sym-info/-X to display the section name
for --syms (https://sourceware.org/PR30684). Port the feature, which is
currentl
[llvm-readelf] Add --extra-sym-info (#65580)
GNU readelf introduced --extra-sym-info/-X to display the section name
for --syms (https://sourceware.org/PR30684). Port the feature, which is
currently llvm-readelf only.
For STO_AARCH64_VARIANT_PCS/STO_RISCV_VARIANT_PCS, the Ndx and Name
columns may not be aligned.
show more ...
|
Revision tags: llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2 |
|
#
3f092f37 |
| 04-Aug-2023 |
Jan Svoboda <jan_svoboda@apple.com> |
[llvm] Extract common `OptTable` bits into macros
All command-line tools using `llvm::opt` create an enum of option IDs and a table of `OptTable::Info` object. Most of the tools use the same ID (`OP
[llvm] Extract common `OptTable` bits into macros
All command-line tools using `llvm::opt` create an enum of option IDs and a table of `OptTable::Info` object. Most of the tools use the same ID (`OPT_##ID`), kind (`Option::KIND##Class`), group ID (`OPT_##GROUP`) and alias ID (`OPT_##ALIAS`). This patch extracts that common code into canonical macros. This results in fewer changes when tweaking the `OPTION` macros emitted by the TableGen backend.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D157028
show more ...
|
Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4 |
|
#
a4d39d4b |
| 01-Mar-2023 |
Mitch Phillips <31459023+hctim@users.noreply.github.com> |
[llvm-readobj] Add --memtag
This adds functionality to readelf/readobj to specifically handle MTE-related bits, like the AARCH64_MEMTAG_* dynamic entries, and a decoder for the Android-specific ELF
[llvm-readobj] Add --memtag
This adds functionality to readelf/readobj to specifically handle MTE-related bits, like the AARCH64_MEMTAG_* dynamic entries, and a decoder for the Android-specific ELF note.
Reviewed By: jhenderson, MaskRay
Differential Revision: https://reviews.llvm.org/D143693
show more ...
|
Revision tags: llvmorg-16.0.0-rc3 |
|
#
1f173a06 |
| 10-Feb-2023 |
Alex Brachet <abrachet@google.com> |
[llvm-driver] Pass extra arguments to tools
Differential Revision: https://reviews.llvm.org/D137799
|
Revision tags: llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
07bb29d8 |
| 30-Dec-2022 |
serge-sans-paille <sguelton@mozilla.com> |
[OptTable] Precompute OptTable prefixes union table through tablegen
This avoid rediscovering this table when reading each options, providing a sensible 2% speedup when processing and empty file, an
[OptTable] Precompute OptTable prefixes union table through tablegen
This avoid rediscovering this table when reading each options, providing a sensible 2% speedup when processing and empty file, and a measurable speedup on typical workloads, see:
This is optional, the legacy, on-the-fly, approach can still be used through the GenericOptTable class, while the new one is used through PrecomputedOptTable.
https://llvm-compile-time-tracker.com/compare.php?from=4da6cb3202817ee2897d6b690e4af950459caea4&to=19a492b704e8f5c1dea120b9c0d3859bd78796be&stat=instructions:u
Differential Revision: https://reviews.llvm.org/D140800
show more ...
|
#
d9ab3e82 |
| 26-Dec-2022 |
serge-sans-paille <sguelton@mozilla.com> |
[clang] Use a StringRef instead of a raw char pointer to store builtin and call information
This avoids recomputing string length that is already known at compile time.
It has a slight impact on pr
[clang] Use a StringRef instead of a raw char pointer to store builtin and call information
This avoids recomputing string length that is already known at compile time.
It has a slight impact on preprocessing / compile time, see
https://llvm-compile-time-tracker.com/compare.php?from=3f36d2d579d8b0e8824d9dd99bfa79f456858f88&to=e49640c507ddc6615b5e503144301c8e41f8f434&stat=instructions:u
This a recommit of e953ae5bbc313fd0cc980ce021d487e5b5199ea4 and the subsequent fixes caa713559bd38f337d7d35de35686775e8fb5175 and 06b90e2e9c991e211fecc97948e533320a825470.
The above patchset caused some version of GCC to take eons to compile clang/lib/Basic/Targets/AArch64.cpp, as spotted in aa171833ab0017d9732e82b8682c9848ab25ff9e. The fix is to make BuiltinInfo tables a compilation unit static variable, instead of a private static variable.
Differential Revision: https://reviews.llvm.org/D139881
show more ...
|
#
aa171833 |
| 26-Dec-2022 |
Vitaly Buka <vitalybuka@google.com> |
Revert "[clang] Use a StringRef instead of a raw char pointer to store builtin and call information" Revert "Fix lldb option handling since e953ae5bbc313fd0cc980ce021d487e5b5199ea4 (part 2)" Revert "
Revert "[clang] Use a StringRef instead of a raw char pointer to store builtin and call information" Revert "Fix lldb option handling since e953ae5bbc313fd0cc980ce021d487e5b5199ea4 (part 2)" Revert "Fix lldb option handling since e953ae5bbc313fd0cc980ce021d487e5b5199ea4"
GCC build hangs on this bot https://lab.llvm.org/buildbot/#/builders/37/builds/19104 compiling CMakeFiles/obj.clangBasic.dir/Targets/AArch64.cpp.d
The bot uses GNU 11.3.0, but I can reproduce locally with gcc (Debian 12.2.0-3) 12.2.0.
This reverts commit caa713559bd38f337d7d35de35686775e8fb5175. This reverts commit 06b90e2e9c991e211fecc97948e533320a825470. This reverts commit e953ae5bbc313fd0cc980ce021d487e5b5199ea4.
show more ...
|
#
e953ae5b |
| 12-Dec-2022 |
serge-sans-paille <sguelton@mozilla.com> |
[clang] Use a StringRef instead of a raw char pointer to store builtin and call information
This avoids recomputing string length that is already known at compile time.
It has a slight impact on pr
[clang] Use a StringRef instead of a raw char pointer to store builtin and call information
This avoids recomputing string length that is already known at compile time.
It has a slight impact on preprocessing / compile time, see
https://llvm-compile-time-tracker.com/compare.php?from=3f36d2d579d8b0e8824d9dd99bfa79f456858f88&to=e49640c507ddc6615b5e503144301c8e41f8f434&stat=instructions:u
This is a recommit of 719d98dfa841c522d8d452f0685e503538415a53 that into account a GGC issue (probably https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92181) when dealing with intiailizer_list and constant expressions.
Workaround this by avoiding initializer list, at the expense of a temporary plain old array.
Differential Revision: https://reviews.llvm.org/D139881
show more ...
|
#
07d9ab9a |
| 23-Dec-2022 |
serge-sans-paille <sguelton@mozilla.com> |
Revert "[clang] Use a StringRef instead of a raw char pointer to store builtin and call information"
There are still remaining issues with GCC 12, see for instance
https://lab.llvm.org/buildbot/#/b
Revert "[clang] Use a StringRef instead of a raw char pointer to store builtin and call information"
There are still remaining issues with GCC 12, see for instance
https://lab.llvm.org/buildbot/#/builders/93/builds/12669
This reverts commit 5ce4e92264102de21760c94db9166afe8f71fcf6.
show more ...
|
#
5ce4e922 |
| 12-Dec-2022 |
serge-sans-paille <sguelton@mozilla.com> |
[clang] Use a StringRef instead of a raw char pointer to store builtin and call information
This avoids recomputing string length that is already known at compile time.
It has a slight impact on pr
[clang] Use a StringRef instead of a raw char pointer to store builtin and call information
This avoids recomputing string length that is already known at compile time.
It has a slight impact on preprocessing / compile time, see
https://llvm-compile-time-tracker.com/compare.php?from=3f36d2d579d8b0e8824d9dd99bfa79f456858f88&to=e49640c507ddc6615b5e503144301c8e41f8f434&stat=instructions:u
This is a recommit of 719d98dfa841c522d8d452f0685e503538415a53 with a change to llvm/utils/TableGen/OptParserEmitter.cpp to cope with GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108158
Differential Revision: https://reviews.llvm.org/D139881
show more ...
|
#
b7065a31 |
| 23-Dec-2022 |
serge-sans-paille <sguelton@mozilla.com> |
Revert "[clang] Use a StringRef instead of a raw char pointer to store builtin and call information"
Failing builds: https://lab.llvm.org/buildbot#builders/9/builds/19030 This is GCC specific and ha
Revert "[clang] Use a StringRef instead of a raw char pointer to store builtin and call information"
Failing builds: https://lab.llvm.org/buildbot#builders/9/builds/19030 This is GCC specific and has been reported upstream: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108158
This reverts commit 719d98dfa841c522d8d452f0685e503538415a53.
show more ...
|
#
719d98df |
| 12-Dec-2022 |
serge-sans-paille <sguelton@mozilla.com> |
[clang] Use a StringRef instead of a raw char pointer to store builtin and call information
This avoids recomputing string length that is already known at compile time.
It has a slight impact on pr
[clang] Use a StringRef instead of a raw char pointer to store builtin and call information
This avoids recomputing string length that is already known at compile time.
It has a slight impact on preprocessing / compile time, see
https://llvm-compile-time-tracker.com/compare.php?from=3f36d2d579d8b0e8824d9dd99bfa79f456858f88&to=e49640c507ddc6615b5e503144301c8e41f8f434&stat=instructions:u
Differential Revision: https://reviews.llvm.org/D139881
show more ...
|
#
6eb0b0a0 |
| 15-Dec-2022 |
Kazu Hirata <kazu@google.com> |
Don't include Optional.h
These files no longer use llvm::Optional.
|
#
a274d62f |
| 14-Dec-2022 |
zhijian <zhijian@ca.ibm.com> |
[XCOFF] Decode the relocation entries of loader section of xcoff for llvm-readobj
Summary:
support decoding the relocation entries of loader section of xcoff for llvm-readobj
https://www.ibm.com/d
[XCOFF] Decode the relocation entries of loader section of xcoff for llvm-readobj
Summary:
support decoding the relocation entries of loader section of xcoff for llvm-readobj
https://www.ibm.com/docs/en/aix/7.2?topic=formats-xcoff-object-file-format#XCOFF__vra3i31ejbau
Reviewers: James Henderson, Esme Yi Differential Revision: https://reviews.llvm.org/D136787
show more ...
|
#
4e58e4a1 |
| 14-Dec-2022 |
Fangrui Song <i@maskray.me> |
[llvm-readobj] llvm::Optional => std::optional
Temporarily add expectedToStdOptional to llvm/Support/Error.h for migration.
|
#
6a35815c |
| 04-Dec-2022 |
serge-sans-paille <sguelton@mozilla.com> |
Store OptTable::Info::Name as a StringRef
This is a recommit of 8ae18303f97d5dcfaecc90b4d87effb2011ed82e, with a few cleanups.
This avoids implicit conversion to StringRef at several points, which
Store OptTable::Info::Name as a StringRef
This is a recommit of 8ae18303f97d5dcfaecc90b4d87effb2011ed82e, with a few cleanups.
This avoids implicit conversion to StringRef at several points, which in turns avoid redundant calls to strlen.
As a side effect, this greatly simplifies the implementation of StrCmpOptionNameIgnoreCase.
It also eventually gives a consistent, humble speedup in compilation time (timing updated since original commit).
https://llvm-compile-time-tracker.com/compare.php?from=de4b6a1bc64db33643f001ad45fae7b92b4a4688&to=c23a93d1292052b4be2fbe8c586fa31143d0c7ed&stat=instructions:u
Differential Revision: https://reviews.llvm.org/D139274
show more ...
|
Revision tags: llvmorg-15.0.6 |
|
#
a56d0e84 |
| 21-Nov-2022 |
zhijian <zhijian@ca.ibm.com> |
[XCOFF] llvm-readobj support display symbol table of loader section of xcoff object file.
Reviewers: James Henderson, Esme Yi
Differential Revision: https://reviews.llvm.org/D135887
|
#
be954243 |
| 19-Nov-2022 |
Vitaly Buka <vitalybuka@google.com> |
Revert "[XCOFF] llvvm-readobj support display symbol table of loader section of xcoff object file."
Use of uninitialized value.
This reverts commit 037f5c283a2278ef156189be48db0738323206bd.
|