Skip to content
  1. Jan 12, 2017
  2. Jan 09, 2017
  3. Jan 06, 2017
  4. Dec 23, 2016
  5. Dec 20, 2016
  6. Dec 19, 2016
    • George Rimar's avatar
      [ELF] - Implemented --retain-symbols-file option · 2bb88ab5
      George Rimar authored
      --retain-symbols-file=filename
      Retain only the symbols listed in the file filename, discarding all others. 
      filename is simply a flat file, with one symbol name per line. This option 
      is especially useful in environments (such as VxWorks) where a large global 
      symbol table is accumulated gradually, to conserve run-time memory.
      
      Note: though documentation says "--retain-symbols-file does not discard 
      undefined symbols, or symbols needed for relocations.", both bfd and gold 
      do that, and this patch too, like testcase show.
      
      Differential revision: https://reviews.llvm.org/D27716
      
      llvm-svn: 290122
      2bb88ab5
    • Rui Ueyama's avatar
      Remove inappropriate use of CachedHashStringRef. · 8f687f71
      Rui Ueyama authored
      Use of CachedHashStringRef makes sense only when we reuse hash values.
      Sprinkling it to all DenseMap has no benefits and just complicates data types.
      Basically we shouldn't use CachedHashStringRef unless there is a strong
      reason to to do so.
      
      llvm-svn: 290076
      8f687f71
  7. Dec 18, 2016
    • Rui Ueyama's avatar
      Remove lld/Support/Memory.h. · 9381eb10
      Rui Ueyama authored
      I thought for a while about how to remove it, but it looks like we
      can just copy the file for now. Of course I'm not happy about that,
      but it's just less than 50 lines of code, and we already have
      duplicate code in Error.h and some other places. I want to solve
      them all at once later.
      
      Differential Revision: https://reviews.llvm.org/D27819
      
      llvm-svn: 290062
      9381eb10
  8. Dec 08, 2016
  9. Dec 07, 2016
  10. Dec 04, 2016
  11. Dec 03, 2016
  12. Nov 29, 2016
  13. Nov 28, 2016
  14. Nov 26, 2016
  15. Nov 25, 2016
    • Rui Ueyama's avatar
      Support -color-diagnostics={auto,always,never}. · 8c8818a5
      Rui Ueyama authored
      -color-diagnostics=auto is default because that's the same as
      Clang's default. When color is enabled, error or warning messages
      are colored like this.
      
        error:
        <bold>ld.lld</bold> <red>error:</red> foo.o: no such file
      
        warning:
        <bold>ld.lld</bold> <magenta>warning:</magenta> foo.o: no such file
      
      Differential Revision: https://reviews.llvm.org/D27117
      
      llvm-svn: 287949
      8c8818a5
    • Rui Ueyama's avatar
      We shouldn't call parallle_for_each if -no-thread is given. · 60666414
      Rui Ueyama authored
      llvm-svn: 287948
      60666414
    • Rui Ueyama's avatar
      Parallelize uncompress() and splitIntoPieces(). · 2555952b
      Rui Ueyama authored
      Uncompressing section contents and spliting mergeable section contents
      into smaller chunks are heavy tasks. They scan entire section contents
      and do CPU-intensive tasks such as uncompressing zlib-compressed data
      or computing a hash value for each section piece.
      
      Luckily, these tasks are independent to each other, so we can do that
      in parallel_for_each. The number of input sections is large (as opposed
      to the number of output sections), so there's a large parallelism here.
      
      Actually the current design to call uncompress() and splitIntoPieces()
      in batch was chosen with doing this in mind. Basically what we need to
      do here is to replace `for` with `parallel_for_each`.
      
      It seems this patch improves latency significantly if linked programs
      contain debug info (which in turn contain lots of mergeable strings.)
      For example, the latency to link Clang (debug build) improved by 20% on
      my machine as shown below. Note that ld.gold took 19.2 seconds to do
      the same thing.
      
      Before:
          30801.782712 task-clock (msec)         #    3.652 CPUs utilized            ( +-  2.59% )
               104,084 context-switches          #    0.003 M/sec                    ( +-  1.02% )
                 5,063 cpu-migrations            #    0.164 K/sec                    ( +- 13.66% )
             2,528,130 page-faults               #    0.082 M/sec                    ( +-  0.47% )
        85,317,809,130 cycles                    #    2.770 GHz                      ( +-  2.62% )
        67,352,463,373 stalled-cycles-frontend   #   78.94% frontend cycles idle     ( +-  3.06% )
       <not supported> stalled-cycles-backend
        44,295,945,493 instructions              #    0.52  insns per cycle
                                                 #    1.52  stalled cycles per insn  ( +-  0.44% )
         8,572,384,877 branches                  #  278.308 M/sec                    ( +-  0.66% )
           141,806,726 branch-misses             #    1.65% of all branches          ( +-  0.13% )
      
           8.433424003 seconds time elapsed                                          ( +-  1.20% )
      
      After:
          35523.764575 task-clock (msec)         #    5.265 CPUs utilized            ( +-  2.67% )
               159,107 context-switches          #    0.004 M/sec                    ( +-  0.48% )
                 8,123 cpu-migrations            #    0.229 K/sec                    ( +- 23.34% )
             2,372,483 page-faults               #    0.067 M/sec                    ( +-  0.36% )
        98,395,342,152 cycles                    #    2.770 GHz                      ( +-  2.62% )
        79,294,670,125 stalled-cycles-frontend   #   80.59% frontend cycles idle     ( +-  3.03% )
       <not supported> stalled-cycles-backend
        46,274,151,813 instructions              #    0.47  insns per cycle
                                                 #    1.71  stalled cycles per insn  ( +-  0.47% )
         8,987,621,670 branches                  #  253.003 M/sec                    ( +-  0.60% )
           148,900,624 branch-misses             #    1.66% of all branches          ( +-  0.27% )
      
           6.747548004 seconds time elapsed                                          ( +-  0.40% )
      
      llvm-svn: 287946
      2555952b
  16. Nov 24, 2016
  17. Nov 23, 2016
    • Rui Ueyama's avatar
      Limit default maximum number of errors to 20. · ac95f6bf
      Rui Ueyama authored
      This is in the context of https://llvm.org/bugs/show_bug.cgi?id=31109.
      When LLD prints out errors for relocations, it tends to print out
      extremely large number of errors (like millions) because it would
      print out one error per relocation.
      
      This patch makes LLD bail out if it prints out more than 20 errors.
      You can configure the limitation using -error-limit argument.
      -error-limit=0 means no limit.
      
      I chose the flag name because Clang has the same feature as -ferror-limit.
      "f" doesn't make sense to us, so I omitted it.
      
      Differential Revision: https://reviews.llvm.org/D26981
      
      llvm-svn: 287789
      ac95f6bf
Loading