- Jun 05, 2016
-
-
Rafael Espindola authored
This remove some EM_386 specific code from InputSection.cpp and opens the way for more relaxations. llvm-svn: 271814
-
Rafael Espindola authored
It will also be used for GT_TO_IE relaxations. llvm-svn: 271813
-
Rafael Espindola authored
It will be used for more than just gots. llvm-svn: 271812
-
- Jun 04, 2016
-
-
Rafael Espindola authored
llvm-svn: 271799
-
Rafael Espindola authored
We were not handling page relative relocations. llvm-svn: 271798
-
- Jun 03, 2016
-
-
Benjamin Kramer authored
No functionality change intended. llvm-svn: 271686
-
Davide Italiano authored
Differential Revision: http://reviews.llvm.org/D20888 llvm-svn: 271605
-
- Jun 02, 2016
-
-
Rafael Espindola authored
This is mostly extracted from http://reviews.llvm.org/D18960. The general idea for tlsdesc is that the two GD got entries are used for a function pointer and its argument. The dynamic linker sets both. In the non-dlopen case the dynamic linker sets the function to the identity and the argument to the offset in the tls block. All that the static linker has to do in the non-dlopen case is relocate the code to point to the got entries and create a dynamic relocation. The dlopen case is more complicated, but can be implemented in another patch. llvm-svn: 271569
-
Rafael Espindola authored
llvm-svn: 271525
-
Rafael Espindola authored
updateAArch64Add takes care of masking. llvm-svn: 271524
-
Rafael Espindola authored
llvm-svn: 271523
-
Rafael Espindola authored
AArch64 uses TLSDESC, so these are dead. llvm-svn: 271517
-
George Rimar authored
Patch adds relaxGotNoPic() method to handle no-PIC path. llvm-svn: 271506
-
- Jun 01, 2016
-
-
George Rimar authored
Patch implements next relaxation from latest ABI: "Convert memory operand of test and binop into immediate operand, where binop is one of adc, add, and, cmp, or, sbb, sub, xor instructions, when position-independent code is disabled." It is described in System V Application Binary Interface AMD64 Architecture Processor Supplement Draft Version 0.99.8 (https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-r249.pdf, B.2 "B.2 Optimize GOTPCRELX Relocations"). Differential revision: http://reviews.llvm.org/D20793 llvm-svn: 271405
-
Davide Italiano authored
When we undefine, we also preserve type of symbol so that we get it right in the combined LTO object. Differential Revision: http://reviews.llvm.org/D20851 llvm-svn: 271403
-
Rafael Espindola authored
We were not reading it or including in the --reproduce archive. llvm-svn: 271367
-
Rafael Espindola authored
This reverts commit r271365. Sorry, wrong branch. llvm-svn: 271366
-
Rafael Espindola authored
llvm-svn: 271365
-
- May 29, 2016
-
-
Davide Italiano authored
Differential Revision: http://reviews.llvm.org/D20777 llvm-svn: 271148
-
- May 28, 2016
-
-
Rui Ueyama authored
llvm-svn: 271133
-
Rafael Espindola authored
It doesn't make mach sense to fetch less than 64 bits from a got entry. llvm-svn: 271116
-
Simon Atanasyan authored
In case of MIPS, GP-relative relocations always resolve to a definition in a regular input file, ignoring the one-definition rule. Such relocations are used to setup GP relative offsets in a function's prologue. So we, for example, should not attempt to create a dynamic relocation even if the target symbol is preemptible. Fixes bug 27880. Differential Revision: http://reviews.llvm.org/D20664 llvm-svn: 271100
-
- May 27, 2016
-
-
Rui Ueyama authored
MergedInputSection::getOffset is the busiest function in LLD if string merging is enabled and input files have lots of mergeable sections. It is usually the case when creating executable with debug info, so it is pretty common. The reason why it is slow is because it has to do faily complex computations. For non-mergeable sections, section contents are contiguous in output, so in order to compute an output offset, we only have to add the output section's base address to an input offset. But for mergeable strings, section contents are split for merging, so they are not contigous. We've got to do some lookups. We used to do binary search on the list of section pieces. It is slow because I think it's hostile to branch prediction. This patch replaces it with hash table lookup. Seems it's working pretty well. Below is "perf stat -r10" output when linking clang with debug info. In this case this patch speeds up about 4%. Before: 6584.153205 task-clock (msec) # 1.001 CPUs utilized ( +- 0.09% ) 238 context-switches # 0.036 K/sec ( +- 6.59% ) 0 cpu-migrations # 0.000 K/sec ( +- 50.92% ) 1,067,675 page-faults # 0.162 M/sec ( +- 0.15% ) 18,369,931,470 cycles # 2.790 GHz ( +- 0.09% ) 9,640,680,143 stalled-cycles-frontend # 52.48% frontend cycles idle ( +- 0.18% ) <not supported> stalled-cycles-backend 21,206,747,787 instructions # 1.15 insns per cycle # 0.45 stalled cycles per insn ( +- 0.04% ) 3,817,398,032 branches # 579.786 M/sec ( +- 0.04% ) 132,787,249 branch-misses # 3.48% of all branches ( +- 0.02% ) 6.579106511 seconds time elapsed ( +- 0.09% ) After: 6312.317533 task-clock (msec) # 1.001 CPUs utilized ( +- 0.19% ) 221 context-switches # 0.035 K/sec ( +- 4.11% ) 1 cpu-migrations # 0.000 K/sec ( +- 45.21% ) 1,280,775 page-faults # 0.203 M/sec ( +- 0.37% ) 17,611,539,150 cycles # 2.790 GHz ( +- 0.19% ) 10,285,148,569 stalled-cycles-frontend # 58.40% frontend cycles idle ( +- 0.30% ) <not supported> stalled-cycles-backend 18,794,779,900 instructions # 1.07 insns per cycle # 0.55 stalled cycles per insn ( +- 0.03% ) 3,287,450,865 branches # 520.799 M/sec ( +- 0.03% ) 72,259,605 branch-misses # 2.20% of all branches ( +- 0.01% ) 6.307411828 seconds time elapsed ( +- 0.19% ) Differential Revision: http://reviews.llvm.org/D20645 llvm-svn: 270999
-
Rafael Espindola authored
llvm-svn: 270986
-
Peter Collingbourne authored
Differential Revision: http://reviews.llvm.org/D20704 llvm-svn: 270968
-
Sean Silva authored
llvm-svn: 270966
-
Sean Silva authored
llvm-svn: 270965
-
Sean Silva authored
llvm-svn: 270964
-
Sean Silva authored
We would previously accept `--threads=4`, but this option just turns on threading and does not specify a number of threads. I ran into this by accident because I was passing `--threads=<n>` but the number didn't seem to affect anything. llvm-svn: 270963
-
- May 26, 2016
-
-
Simon Atanasyan authored
MIPS .reginfo and .MIPS.options sections are consumed by the linker, and the linker produces a single output section. But it is possible that input files contain section symbol points to the corresponding input section. In case of generation a relocatable output we need to write such symbols to the output file. Fixes bug 27878. Differential Revision: http://reviews.llvm.org/D20688 llvm-svn: 270910
-
Rafael Espindola authored
llvm-svn: 270907
-
George Rimar authored
llvm-svn: 270847
-
- May 25, 2016
-
-
George Rimar authored
[ELF] - Added support for jmp/call relaxations when R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX are used. D15779 introduced basic approach to support new relaxations. This patch implements relaxations for jmp and call instructions, described in System V Application Binary Interface AMD64 Architecture Processor Supplement Draft Version 0.99.8 (https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-r249.pdf, B.2 "B.2 Optimize GOTPCRELX Relocations") Differential revision: http://reviews.llvm.org/D20622 llvm-svn: 270721
-
Rui Ueyama authored
This patch makes SectionPiece class 8 bytes smaller on platforms on which pointer size is 8 bytes. Sean suggested in a post commit review for r270340 that this could make a differentce, and it actually is. Time to link clang (with debug info) improved from 6.725 seconds to 6.589 seconds or by about 2%. Differential Revision: http://reviews.llvm.org/D20613 llvm-svn: 270717
-
Rui Ueyama authored
That flag is probably too dangerous to ignore silently. llvm-svn: 270711
-
Ed Maste authored
Add another possible error that may be reported for the same case. The original reproduction case that prompted r270706 produced the error "corrupted CIE" instead of "corrupted or unsupported CIE information". The specific error depends on arbitrary data later in the file so check that neither is emitted in case the input is ever changed. Document the process used to create the input .o and rename the test file to .s, as requested by Rafael. llvm-svn: 270709
-
Ed Maste authored
"A zero length string indicates that no augmentation data is present." The FreeBSD/mips toolchain (GCC 4.2.1) generates .debug_frame sections containing CIE records that have an empty augmentation string. Differential Revision: http://reviews.llvm.org/D19928 llvm-svn: 270706
-
George Rimar authored
System V Application Binary Interface AMD64 Architecture Processor Supplement Draft Version 0.99.8 (https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-r249.pdf, B.2 "B.2 Optimize GOTPCRELX Relocations") introduces possible relaxations for R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX. That patch implements the next relaxation: mov foo@GOTPCREL(%rip), %reg => lea foo(%rip), %reg and also opens door for implementing all other ones. Implementation was suggested by Rafael Ávila de Espíndola with few additions and testcases by myself. Differential revision: http://reviews.llvm.org/D15779 llvm-svn: 270705
-
Rui Ueyama authored
Thanks to Sean for pointing it out. llvm-svn: 270660
-
Rui Ueyama authored
llvm-svn: 270659
-