- May 23, 2018
-
-
Peter Collingbourne authored
Differential Revision: https://reviews.llvm.org/D47234 llvm-svn: 333040
-
- May 15, 2018
-
-
Peter Smith authored
The --keep-unique <symbol> option is taken from gold. The intention is that <symbol> will be prevented from being folded by ICF. Although not specifically mentioned in the documentation <symbol> only matches global symbols, with a warning if the symbol is not found. The implementation finds the Section defining <symbol> and removes it from the set of sections considered for ICF. Differential Revision: https://reviews.llvm.org/D46755 llvm-svn: 332332
-
- Apr 03, 2018
-
-
Bob Haarman authored
Summary: r328610 fixed a data race in the COFF linker. This change makes a similar fix to the ELF linker. Reviewers: ruiu, pcc, rnk Reviewed By: ruiu Subscribers: emaste, llvm-commits, arichardson Differential Revision: https://reviews.llvm.org/D45192 llvm-svn: 329088
-
- Mar 29, 2018
-
-
Rui Ueyama authored
llvm-svn: 328739
-
- Mar 27, 2018
-
-
Andrew Ng authored
The Data member of synthetic section's is not valid and empty. The Data member is required to be valid by ICF as it is used by ICF to determine the equality of section contents. Therefore, exclude synthetic sections from ICF. Fixes bug PR36910. Differential Revision: https://reviews.llvm.org/D44923 llvm-svn: 328624
-
- Feb 23, 2018
-
-
George Rimar authored
Latest patch version now. Original commit message: [ELF] - Do not crash with --emit-relocs and --icf=all together. Previously we would crash because did not mark .rel[a] sections as dead and they tried to access parent which was not live after ICF and therefore was null. Differential revision: https://reviews.llvm.org/D43241 llvm-svn: 325879
-
- Feb 13, 2018
-
-
Rui Ueyama authored
Differential Revision: https://reviews.llvm.org/D43251 llvm-svn: 325065
-
Rui Ueyama authored
llvm-svn: 325038
-
- Feb 11, 2018
-
-
Galina Kistanova authored
llvm-svn: 324830
-
- Feb 09, 2018
-
-
Rui Ueyama authored
llvm-svn: 324756
-
Rui Ueyama authored
GNU gold doesn't print out ICF sections for -verbose. It only shows them for -print-icf-sections. We printed out them for -verbose because we didn't have -print-icf-sections. Now that we have the option, there's no reason to print out for -verbose. Differential Revision: https://reviews.llvm.org/D43100 llvm-svn: 324755
-
Rui Ueyama authored
llvm-svn: 324684
-
Rui Ueyama authored
Previously, multiple chunks of --print-icf-sections messages were interleaved and didn't make sense. This is because forEachClass is multi-threaded. llvm-svn: 324683
-
- Feb 01, 2018
-
-
James Henderson authored
Currently ICF information is output through stderr if the "--verbose" flag is used. This differs to Gold for example, which uses an explicit flag to output this to stdout. This commit adds the "--print-icf-sections" and "--no-print-icf-sections" flags and changes the output message format for clarity and consistency with "--print-gc-sections". These messages are still output to stderr if using the verbose flag. However to avoid intermingled message output to console, this will not occur when the "--print-icf-sections" flag is used. Existing tests have been modified to expect the new message format from stderr. Patch by Owen Reynolds. Differential Revision: https://reviews.llvm.org/D42375 Reviewers: ruiu, rafael Reviewed by: llvm-svn: 323976
-
- Jan 10, 2018
-
-
Rafael Espindola authored
When we have --icf=safe we should be able to define --icf=all as a shorthand for --icf=safe --ignore-function-address-equality. For now --ignore-function-address-equality is used only to control access to non preemptable symbols in shared libraries. llvm-svn: 322152
-
- Dec 12, 2017
-
-
Rafael Espindola authored
An internal linker has support for merging identical data and in some cases it can be a significant win. This is behind an off by default flag so it has to be requested explicitly. llvm-svn: 320448
-
- Dec 09, 2017
-
-
Rafael Espindola authored
They were not used in InputFiles.h and it was getting too easy to add circular includes. llvm-svn: 320256
-
- Nov 06, 2017
-
-
Peter Collingbourne authored
Now that DefinedRegular is the only remaining derived class of Defined, we can merge the two classes. Differential Revision: https://reviews.llvm.org/D39667 llvm-svn: 317448
-
- Nov 03, 2017
-
-
Rui Ueyama authored
Now that we have only SymbolBody as the symbol class. So, "SymbolBody" is a bit strange name now. This is a mechanical change generated by perl -i -pe s/SymbolBody/Symbol/g $(git grep -l SymbolBody lld/ELF lld/COFF) nd clang-format-diff. Differential Revision: https://reviews.llvm.org/D39459 llvm-svn: 317370
-
- Oct 13, 2017
-
-
Bob Haarman authored
Summary: This will allow using the functionality from other linkers. It is also a prerequisite for sharing the error logging code. Reviewers: ruiu Reviewed By: ruiu Subscribers: emaste, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D38822 llvm-svn: 315725
-
- Oct 02, 2017
-
-
Rui Ueyama authored
Computing section content hashes early seems like a win in terms of performance. It increases a chance that two different sections will get different class IDs from the beginning. Without threads, this patch improves Chromium link time by about 0.3 seconds. With threads, by 0.1 seconds. That's less than 1% time saving but not bad for a small patch. llvm-svn: 314644
-
- Aug 29, 2017
-
-
Rui Ueyama authored
Looks like there's no need to use a higher order function. We can simply use the regular for-loop. llvm-svn: 311942
-
- Jun 12, 2017
-
-
Peter Collingbourne authored
Relocations referring to merge sections are considered equal if they resolve to the same offset in the same output section. Differential Revision: https://reviews.llvm.org/D34094 llvm-svn: 305177
-
- Jun 07, 2017
-
-
Zachary Turner authored
This creates a new library called BinaryFormat that has all of the headers from llvm/Support containing structure and layout definitions for various types of binary formats like dwarf, coff, elf, etc as well as the code for identifying a file from its magic. Differential Revision: https://reviews.llvm.org/D33843 llvm-svn: 304864
-
- May 24, 2017
-
-
Rui Ueyama authored
This is the only place we use threads for ICF. The intention of this code was to split an input vector into 256 shards and process them in parallel. What the code was actually doing was to split an input into 257 shards, process the first 256 shards in parallel, and the remaining one in serial. That means this code takes ceil(256/n)+1 instead of ceil(256/n) where n is the number of available CPU cores. The former converges to 2 while the latter converges to 1. This patches fixes the above issue. llvm-svn: 303797
-
- May 10, 2017
-
-
Rui Ueyama authored
So that it is clear that the function is a wrapper for for_each_n. llvm-svn: 302718
-
- Apr 13, 2017
-
-
Peter Smith authored
ARM Exception Index Table sections .ARM.exidx have an implicit dependency on code sections via SHF_LINK_ORDER. When code sections are folded by ICF we must mark the unique .ARM.exidx table that describes it as not live to prevent an illegal entry in the exception table. Note that we do not try and follow the relocations from the .ARM.exidx section to the .ARM.extab sections to mark these as not live. Leaving these sections is not a correctness problem. In theory these could be removed via an application of garbage collection. Fixes https://bugs.llvm.org/show_bug.cgi?id=32614 Differential Revision: https://reviews.llvm.org/D31932 llvm-svn: 300182
-
- Mar 23, 2017
-
-
Rui Ueyama authored
"Parallel" is the most important aspect of the functions, so we shouldn't omit that. llvm-svn: 298557
-
- Mar 18, 2017
-
-
Rui Ueyama authored
We had a few Config member functions that returns configuration values. For example, we had is64() which returns true if the target is 64-bit. The return values of these functions are constant and never change. This patch is to compute them only once to make it clear that they'll never change. llvm-svn: 298168
-
- Mar 08, 2017
-
-
Rafael Espindola authored
llvm-svn: 297287
-
- Mar 07, 2017
-
-
Rui Ueyama authored
llvm-svn: 297107
-
- Feb 28, 2017
-
-
Rui Ueyama authored
Previously, LLD merged all read-only sections. So the following program prints out "true" if -icf=all is specified. static const int foo = 1; static const int bar = 1; int main() { printf("%s\n", &foo == &bar ? "true" : "false"); } This is somewhat counter-intuitive, and it actually caused nasty issues. One example is https://bugs.chromium.org/p/chromium/issues/detail?id=682773#c24. This patch changes the way how it works. Now ICF merges only functions (i.e. executable sections). Differential Revision: https://reviews.llvm.org/D30365 llvm-svn: 296534
-
Rui Ueyama authored
Differential Revision: https://reviews.llvm.org/D30348 llvm-svn: 296508
-
- Feb 27, 2017
-
-
Rui Ueyama authored
The list of all input sections was defined in SymbolTable class for a historical reason. The list itself is not a template. However, because SymbolTable class is a template, we needed to pass around ELFT to access the list. This patch moves the list out of the class so that it doesn't need ELFT. llvm-svn: 296309
-
- Feb 23, 2017
-
-
Rafael Espindola authored
With the current design an InputSection is basically anything that goes directly in a OutputSection. That includes plain input section but also synthetic sections, so this should probably not be a template. llvm-svn: 295993
-
Rafael Espindola authored
Removing this template is not a big win by itself, but opens the way for removing more templates. llvm-svn: 295923
-
- Jan 20, 2017
-
-
Peter Collingbourne authored
If two sections contained relocations to absolute symbols with the same value we would crash when trying to access their sections. Add a check that both symbols point to sections before accessing their sections, and treat absolute symbols as equal if their values are equal. Differential Revision: https://reviews.llvm.org/D28935 llvm-svn: 292578
-
- Jan 15, 2017
-
-
Rui Ueyama authored
llvm-svn: 292044
-
- Dec 05, 2016
-
-
Rui Ueyama authored
Also add a citation to GNU gold safe ICF paper. Differential Revision: https://reviews.llvm.org/D27398 llvm-svn: 288684
-
Rui Ueyama authored
llvm-svn: 288630
-