llvm-project/lld/ELF
Peter Smith 7ef47dd54e [LLD] Increase thunk pass limit
In issue 61250 https://github.com/llvm/llvm-project/issues/61250 there is
an example of a program that takes 17 passes to converge, which is 2 more
than the current limit of 15. Analysis of the program shows a particular
section that is made up of many roughly thunk sized chunks of code ending
in a call to a symbol that needs a thunk. Due to the positioning of the
section, at each pass a subset of the calls go out of range of their
original thunk, needing a new one created, which then pushes more thunks
out of range. This process eventually stops after 17 passes.

This patch is the simplest fix for the problem, which is to increase
the pass limit. I've chosen to double it which should comfortably
account for future cases like this, while only taking a few more
seconds to reach the limit in case of non-convergence.

As discussed in the issue, there could be some additional work done
to limit thunk reuse, this would potentially increase the number of
thunks in the program but should speed up convergence.

Differential Revision: https://reviews.llvm.org/D145786
2023-03-13 10:04:39 +00:00
..
Arch [lld][RISCV] Avoid error when encountering unrecognised ISA extensions/versions in RISC-V attributes 2023-02-25 06:17:50 +00:00
AArch64ErrataFix.cpp [ELF] Add final to some SyntheticSection derived classes 2022-12-03 18:11:34 +00:00
AArch64ErrataFix.h [lld/elf] Use C++17 nested namespace syntax in most places 2022-08-10 16:47:30 -04:00
ARMErrataFix.cpp [ELF] Add final to some SyntheticSection derived classes 2022-12-03 18:11:34 +00:00
ARMErrataFix.h [lld/elf] Use C++17 nested namespace syntax in most places 2022-08-10 16:47:30 -04:00
CallGraphSort.cpp
CallGraphSort.h [lld/elf] Use C++17 nested namespace syntax in most places 2022-08-10 16:47:30 -04:00
CMakeLists.txt [Support] Move TargetParsers to new component 2022-12-20 11:05:50 +00:00
Config.h [ELF] Add REVERSE input section description keyword 2023-03-07 12:44:02 -05:00
Driver.cpp [lld] [MTE] Add DT_AARCH64_MEMTAG_* dynamic entries, and small cleanup 2023-03-01 11:14:05 -08:00
Driver.h [OptTable] Precompute OptTable prefixes union table through tablegen 2023-01-12 12:08:06 +01:00
DriverUtils.cpp [NFC][TargetParser] Replace uses of llvm/Support/Host.h 2023-02-10 09:59:46 +00:00
DWARF.cpp [DebugInfo] llvm::Optional => std::optional 2022-12-05 00:09:22 +00:00
DWARF.h [lld] Change Optional to std::optional 2022-11-27 17:25:34 -08:00
EhFrame.cpp [ELF] Change rawData to content() and data() to contentMaybeDecompress() 2022-11-20 22:43:22 +00:00
EhFrame.h [lld/elf] Use C++17 nested namespace syntax in most places 2022-08-10 16:47:30 -04:00
ICF.cpp [ELF] --icf: don't fold a section without relocation and a section with relocations for SHT_REL 2023-02-22 23:34:49 -08:00
ICF.h [lld/elf] Use C++17 nested namespace syntax in most places 2022-08-10 16:47:30 -04:00
InputFiles.cpp Use llvm::count{lr}_{zero,one} (NFC) 2023-01-28 12:41:20 -08:00
InputFiles.h [lld][ELF] Remove unused enum value. NFC 2023-03-06 16:06:40 -08:00
InputSection.cpp [lld][RISCV] Introduce handling for R_RISCV_PLT32 relocation 2023-02-23 22:05:52 +00:00
InputSection.h Move from llvm::makeArrayRef to ArrayRef deduction guides - last part 2023-01-10 11:47:43 +01:00
LinkerScript.cpp [ELF] Add REVERSE input section description keyword 2023-03-07 12:44:02 -05:00
LinkerScript.h [ELF] Change most llvm::Optional to std::optional 2022-11-26 19:19:15 -08:00
LTO.cpp [LLD] Add --lto-CGO[0-3] option 2023-02-15 17:34:35 +00:00
LTO.h [lld/elf] Use C++17 nested namespace syntax in most places 2022-08-10 16:47:30 -04:00
MapFile.cpp [NFC] Optimize vector usage in lld 2023-01-26 20:31:42 -05:00
MapFile.h [lld/elf] Use C++17 nested namespace syntax in most places 2022-08-10 16:47:30 -04:00
MarkLive.cpp [ELF] Change rawData to content() and data() to contentMaybeDecompress() 2022-11-20 22:43:22 +00:00
MarkLive.h [lld/elf] Use C++17 nested namespace syntax in most places 2022-08-10 16:47:30 -04:00
Options.td [LLD] Add --lto-CGO[0-3] option 2023-02-15 17:34:35 +00:00
OutputSections.cpp [NFC] Optimize vector usage in lld 2023-01-26 20:31:42 -05:00
OutputSections.h [ELF] Change most llvm::Optional to std::optional 2022-11-26 19:19:15 -08:00
README.md
Relocations.cpp [ELF] Add single quotes around out of range errors 2023-03-03 12:48:16 -08:00
Relocations.h [ELF] Move scanRelocations into Relocations.cpp. NFC 2022-09-04 21:31:18 -07:00
ScriptLexer.cpp
ScriptLexer.h [lld/elf] Use C++17 nested namespace syntax in most places 2022-08-10 16:47:30 -04:00
ScriptParser.cpp [ELF] Add REVERSE input section description keyword 2023-03-07 12:44:02 -05:00
ScriptParser.h [lld/elf] Use C++17 nested namespace syntax in most places 2022-08-10 16:47:30 -04:00
Symbols.cpp [ELF] -r: don't define __global_pointer$ 2022-11-22 12:37:51 -08:00
Symbols.h [ELF] -r: don't define __global_pointer$ 2022-11-22 12:37:51 -08:00
SymbolTable.cpp [lld][nfc] Remove lld::demangle() (partial revert of D116279) 2022-10-14 15:28:47 -04:00
SymbolTable.h [ELF] Reword symMap/symVector comment. NFC 2023-02-08 10:50:44 -08:00
SyntheticSections.cpp [lld] [MTE] Add DT_AARCH64_MEMTAG_* dynamic entries, and small cleanup 2023-03-01 11:14:05 -08:00
SyntheticSections.h Use llvm::count{lr}_{zero,one} (NFC) 2023-01-28 12:41:20 -08:00
Target.cpp [ELF] Add InputSectionBase::{addRelocs,relocs} and GotSection::addConstant to add/access relocations 2022-11-21 04:12:03 +00:00
Target.h [ELF] Merge SHT_RISCV_ATTRIBUTES sections 2022-12-08 09:53:40 +00:00
Thunks.cpp [ELF][PPC64] Actually implement --no-power10-stubs 2023-02-27 16:19:13 -08:00
Thunks.h [ELF][PPC64] Actually implement --no-power10-stubs 2023-02-27 16:19:13 -08:00
Writer.cpp [LLD] Increase thunk pass limit 2023-03-13 10:04:39 +00:00
Writer.h [lld/elf] Use C++17 nested namespace syntax in most places 2022-08-10 16:47:30 -04:00

See docs/NewLLD.rst