- Nov 18, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D26834 llvm-svn: 287326
-
Rui Ueyama authored
llvm-svn: 287325
-
Rui Ueyama authored
llvm-svn: 287324
-
Rui Ueyama authored
llvm-svn: 287323
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D26792 llvm-svn: 287322
-
Rui Ueyama authored
readVersionDeclaration was to read anonymous version definition and named version definition. Splitting it into two functions should improve readability as the two cases are different enough. I also changed a few helper functions to return values instead of mutating given references. llvm-svn: 287319
-
Rui Ueyama authored
llvm-svn: 287318
-
Rui Ueyama authored
MergeOutputSection class was a bit hard to use because it provdes a series of finalize functions that have to be called in a right way at a right time. It also intereacted with MergeInputSection, and the logic was somewhat entangled between the two classes. This patch simplifies it by providing only one finalize function. Now, all you have to do is to call MergeOutputSection::finalize when you have added all sections to the output section. Then, it internally merges strings and initliazes StringPiece objects. I think this is much easier to understand. This patch also adds comments. llvm-svn: 287314
-
Davide Italiano authored
llvm-svn: 287297
-
Davide Italiano authored
llvm-svn: 287296
-
Rafael Espindola authored
llvm-svn: 287284
-
Rafael Espindola authored
Since the output has a section table too, it is meaningful to compute the sh_link. In a more practical note, the binutils' strip crashes if sh_link is not set for SHT_ARM_EXIDX. llvm-svn: 287280
-
- Nov 17, 2016
-
-
Simon Atanasyan authored
Also add new comments with MIPS GOT description. llvm-svn: 287264
-
Rafael Espindola authored
I hit an internal linker script that was defining _DYNAMIC instead of letting the linker do it. It turns out that both bfd and gold allow that. This is pretty easy to implement, just make the linker defined symbol weak. This should have no impact in the case where there is no user defined symbol: The visibility is hidden, which causes the output to still be local. llvm-svn: 287260
-
Rui Ueyama authored
Linker script doesn't create a section if it has no content. So the following script doesn't create .norelocs section if it doesn't have any .rel* sections. .norelocs : { *(.rel*) } Later, if you assert that the size of .norelocs is 0, LLD printed out an error message, because it didn't allow calling SIZEOF() on nonexistent sections. This patch allows SIZEOF() on nonexistent sections, so that you can do something like this. ASSERT(SIZEOF(.norelocs), "shouldn't contain .rel sections!") Note that this behavior is compatible with GNU. Differential Revision: https://reviews.llvm.org/D26810 llvm-svn: 287257
-
Rui Ueyama authored
llvm-svn: 287254
-
Rui Ueyama authored
llvm-svn: 287253
-
Rui Ueyama authored
llvm-svn: 287252
-
Rui Ueyama authored
LLD supports multi-threading, and it seems to be working well as you can see in r287140. In short, LLD runs a few percent to 30% faster with -threads and more than 50% faster if you are using -build-id (your mileage may vary depending on your computer). However, I don't think most users even don't know about that because -threads is not a default option. This patch enables it by default. Discussion thread: http://lists.llvm.org/pipermail/llvm-dev/2016-November/107160.html llvm-svn: 287237
-
Rui Ueyama authored
llvm-svn: 287234
-
Rafael Espindola authored
llvm-svn: 287231
-
Rafael Espindola authored
llvm-svn: 287225
-
Eugene Leviant authored
llvm-svn: 287218
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D26740 llvm-svn: 287216
-
Chris Bieneman authored
This patch updates a couple places where add_dependencies was being explicitly called to add dependencies on intrinsics_gen to instead use the DEPENDS named parameter. This cleanup is needed for a patch I'm working on to add a dependency debugging mode to the build system. llvm-svn: 287205
-
Rui Ueyama authored
llvm-svn: 287202
-
Rui Ueyama authored
llvm-svn: 287200
-
Rui Ueyama authored
Because it is uint16_t in the ELF spec. Using size_t was confusing. llvm-svn: 287198
-
Rui Ueyama authored
llvm-svn: 287197
-
Rui Ueyama authored
We used to create a vector contantaining all version definitions with wildcards because doing that was efficient. All patterns were compiled to a regexp and matched against symbol names. Because a regexp can be converted to a DFA, matching against union of patterns is as cheap as matching against one patter. We are no longer converting them to regexp. Our own glob pattern handler doesn't do such optimization. Therefore, creating a vector no longer makes sense. llvm-svn: 287196
-
Rui Ueyama authored
llvm-svn: 287192
-
Rui Ueyama authored
llvm-svn: 287191
-
- Nov 16, 2016
-
-
Simon Atanasyan authored
MIPS GOT handling is very different from other targets so it is better to keep the code in the separatre section class MipsGotSection. This patch introduces the new section and moves all MIPS specific code from GotSection to the new class. I did not rename fields and methods in the MipsGotSection class to reduce the diff and plan to do that by the separate commit. Differential revision: https://reviews.llvm.org/D26733 llvm-svn: 287150
-
Davide Italiano authored
Apparently this is wrong because it's legal to have a filename on UNIX which contains a backslash. Differential Revision: https://reviews.llvm.org/D26734 llvm-svn: 287143
-
Rui Ueyama authored
TaskGroup has a fairly high overhead, so we don't want to partition tasks into too small tasks. This patch partition tasks into up to 1024 tasks. I compared this patch with the original LLD's parallel_for_each. I reverted r287042 locally for comparison. With this patch, time to self-link lld with debug info changed from 6.23 seconds to 4.62 seconds (-25.8%), with -threads and without -build-id. With both -threads and -build-id, it improved from 11.71 seconds to 4.94 seconds (-57.8%). Full results are below. BTW, GNU gold takes 11.65 seconds to link the same binary. NOW --no-threads --build-id=none 6789.847776 task-clock (msec) # 1.000 CPUs utilized ( +- 1.86% ) 685 context-switches # 0.101 K/sec ( +- 2.82% ) 4 cpu-migrations # 0.001 K/sec ( +- 31.18% ) 1,424,690 page-faults # 0.210 M/sec ( +- 1.07% ) 21,339,542,522 cycles # 3.143 GHz ( +- 1.49% ) 13,092,260,230 stalled-cycles-frontend # 61.35% frontend cycles idle ( +- 2.23% ) <not supported> stalled-cycles-backend 21,462,051,828 instructions # 1.01 insns per cycle # 0.61 stalled cycles per insn ( +- 0.41% ) 3,955,296,378 branches # 582.531 M/sec ( +- 0.39% ) 75,699,909 branch-misses # 1.91% of all branches ( +- 0.08% ) 6.787630744 seconds time elapsed ( +- 1.86% ) --threads --build-id=none 14767.148697 task-clock (msec) # 3.196 CPUs utilized ( +- 2.56% ) 28,891 context-switches # 0.002 M/sec ( +- 1.99% ) 905 cpu-migrations # 0.061 K/sec ( +- 5.49% ) 1,262,122 page-faults # 0.085 M/sec ( +- 1.68% ) 43,116,163,217 cycles # 2.920 GHz ( +- 3.07% ) 33,690,171,242 stalled-cycles-frontend # 78.14% frontend cycles idle ( +- 3.67% ) <not supported> stalled-cycles-backend 22,836,731,536 instructions # 0.53 insns per cycle # 1.48 stalled cycles per insn ( +- 1.13% ) 4,382,712,998 branches # 296.788 M/sec ( +- 1.33% ) 78,622,295 branch-misses # 1.79% of all branches ( +- 0.54% ) 4.621228056 seconds time elapsed ( +- 1.90% ) --threads --build-id=sha1 24594.457135 task-clock (msec) # 4.974 CPUs utilized ( +- 1.78% ) 29,902 context-switches # 0.001 M/sec ( +- 2.62% ) 1,097 cpu-migrations # 0.045 K/sec ( +- 6.29% ) 1,313,947 page-faults # 0.053 M/sec ( +- 2.36% ) 70,516,415,741 cycles # 2.867 GHz ( +- 0.78% ) 47,570,262,296 stalled-cycles-frontend # 67.46% frontend cycles idle ( +- 0.86% ) <not supported> stalled-cycles-backend 73,124,599,029 instructions # 1.04 insns per cycle # 0.65 stalled cycles per insn ( +- 0.33% ) 10,495,266,104 branches # 426.733 M/sec ( +- 0.41% ) 91,444,149 branch-misses # 0.87% of all branches ( +- 0.83% ) 4.944291711 seconds time elapsed ( +- 1.72% ) PREVIOUS --threads --build-id=none 7307.437544 task-clock (msec) # 1.160 CPUs utilized ( +- 2.34% ) 3,128 context-switches # 0.428 K/sec ( +- 4.37% ) 352 cpu-migrations # 0.048 K/sec ( +- 5.98% ) 1,354,450 page-faults # 0.185 M/sec ( +- 2.20% ) 22,081,733,098 cycles # 3.022 GHz ( +- 1.46% ) 13,709,991,267 stalled-cycles-frontend # 62.09% frontend cycles idle ( +- 1.77% ) <not supported> stalled-cycles-backend 21,634,468,895 instructions # 0.98 insns per cycle # 0.63 stalled cycles per insn ( +- 0.86% ) 3,993,062,361 branches # 546.438 M/sec ( +- 0.83% ) 76,188,819 branch-misses # 1.91% of all branches ( +- 0.19% ) 6.298101157 seconds time elapsed ( +- 2.03% ) --threads --build-id=sha1 12845.420265 task-clock (msec) # 1.097 CPUs utilized ( +- 1.95% ) 4,020 context-switches # 0.313 K/sec ( +- 2.89% ) 369 cpu-migrations # 0.029 K/sec ( +- 6.26% ) 1,464,822 page-faults # 0.114 M/sec ( +- 1.37% ) 40,668,449,813 cycles # 3.166 GHz ( +- 0.96% ) 18,863,982,388 stalled-cycles-frontend # 46.38% frontend cycles idle ( +- 1.82% ) <not supported> stalled-cycles-backend 71,560,499,058 instructions # 1.76 insns per cycle # 0.26 stalled cycles per insn ( +- 0.14% ) 10,044,152,441 branches # 781.925 M/sec ( +- 0.19% ) 87,835,773 branch-misses # 0.87% of all branches ( +- 0.09% ) 11.711773314 seconds time elapsed ( +- 1.51% ) llvm-svn: 287140
-
Rui Ueyama authored
Also add a comment saying that check() returns a value. llvm-svn: 287136
-
George Rimar authored
This change separates all versioned locals to be a separate list in config, that was suggested by Rafael and simplifies the logic a bit. Differential revision: https://reviews.llvm.org/D26754 llvm-svn: 287132
-
Rafael Espindola authored
Turns out some systems do define it. Not producing an error in this case matches gold and bfd. llvm-svn: 287125
-
George Rimar authored
Previously we did not support them, patch implements this functionality Differential revision: https://reviews.llvm.org/D26604 llvm-svn: 287124
-
George Rimar authored
Forgot about that, I am sorry. llvm-svn: 287123
-