search for: mergeinputsect

Displaying 9 results from an estimated 9 matches for "mergeinputsect".

2017 Jul 11
2
[LLD] Linker Relaxation
Hi, Does lld support linker relaxation that may shrink code size? As far as I see lld seems to assume that the content of input sections to be fixed other than patching up relocations, but I believe some targets may benefit the extra optimization opportunity with relaxation. Specifically, I'm currently working on adding support for RISC-V in lld, and RISC-V heavily relies on linker relaxation
2017 Jul 11
8
[LLD] Linker Relaxation
...s been shortened from 18 bytes to 12 bytes due to the other changes. On Tue, Jul 11, 2017 at 1:59 PM, Peter Smith via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hello, > > To the best of my knowledge I think the closest analogue is something > like the Synthetic EHFrame and MergeInputSections, not strictly code > relaxation, but these do involve changes in size of sections. > > Can I ask you a quick question? In many architectures not all > pc-relative offsets are exposed to the linker as relocations so it > isn't safe to change the sizes of sections in arbitrary...
2020 Nov 06
1
Fragmented DWARF
...one. I haven't experimented with this, but I wouldn't expect it to be costly in terms of code quality or performance, at least in comparison to parsing the DWARF itself. sizeof(InputSection) is 208 (sizeof(Elf64_Shdr)=64) so there is indeed a significant overhead on fragmented segments. A MergeInputSection can be split into SectionPiece, which is indeed lightweight and MarkLive can mark liveness on these pieces. However, in InputFiles.cpp we change MergeInputSection to regular if it has a relocation (toRegularSection). Using more lightweight data structures for .debug_* fragments is still challeng...
2017 Jul 11
4
[LLD] Linker Relaxation
...t;> > >> On Tue, Jul 11, 2017 at 1:59 PM, Peter Smith via llvm-dev < >> llvm-dev at lists.llvm.org> wrote: >> >>> Hello, >>> >>> To the best of my knowledge I think the closest analogue is something >>> like the Synthetic EHFrame and MergeInputSections, not strictly code >>> relaxation, but these do involve changes in size of sections. >>> >>> Can I ask you a quick question? In many architectures not all >>> pc-relative offsets are exposed to the linker as relocations so it >>> isn't safe to c...
2017 Feb 28
4
[lld] We call SymbolBody::getVA redundantly a lot...
tl;dr: it looks like we call SymbolBody::getVA about 5x more times than we need to Should we cache it or something? (careful with threads). Here is a link to a PDF of my Mathematica notebook which has all the details of my investigation: https://drive.google.com/open?id=0B8v10qJ6EXRxVDQ3YnZtUlFtZ1k There seem to be two main regimes that we redundantly call SymbolBody::getVA: 1. most
2020 Nov 05
3
Fragmented DWARF
Hi James, On 05.11.2020 17:59, James Henderson wrote: > (Resending with history trimmed to avoid it getting stuck in moderator > queue). > > Hi Alexey, > > Just an update - I identified the cause of the "Generated debug info > is broken" error message when I tried to build things locally: the > `outStreamer` instance is initialised with the host Triple,
2017 Jul 31
3
[RFC] Profile guided section layout
Hi Rafael, On 07/31/2017 04:20 PM, Rafael Avila de Espindola via llvm-dev wrote: > However, do we need to start with instrumentation? The original paper > uses sampling with good results and current intel cpus can record every > branch in a program. > > I would propose starting with just an lld patch that reads the call > graph from a file. The format would be very similar to
2017 Jun 15
7
[RFC] Profile guided section layout
...eger(10, Count)) + break; + + // Merge duplicate counts by picking the largest. + uint64_t &C = Config->CFGProfile[std::make_pair(From, To)]; + C = std::max(C, Count); + } + + return &InputSection::Discarded; + } + if (shouldMerge(Sec)) return make<MergeInputSection>(this, &Sec, Name); return make<InputSection>(this, &Sec, Name); diff --git a/ELF/Options.td b/ELF/Options.td index 335c7ad..cea9ee1 100644 --- a/ELF/Options.td +++ b/ELF/Options.td @@ -144,6 +144,9 @@ def nostdlib: F<"nostdlib">, def no_as_needed: F<&quot...
2017 Jul 31
2
[RFC] Profile guided section layout
...eger(10, Count)) + break; + + // Merge duplicate counts by picking the largest. + uint64_t &C = Config->CFGProfile[std::make_pair(From, To)]; + C = std::max(C, Count); + } + + return &InputSection::Discarded; + } + if (shouldMerge(Sec)) return make<MergeInputSection>(this, &Sec, Name); return make<InputSection>(this, &Sec, Name); diff --git a/ELF/Options.td b/ELF/Options.td index 0de0d73..000e111 100644 --- a/ELF/Options.td +++ b/ELF/Options.td @@ -162,6 +162,9 @@ def nostdlib: F<"nostdlib">, def no_as_needed: F<&quot...