Skip to content
  1. Feb 01, 2017
    • Peter Smith's avatar
      [ELF] Use SyntheticSections for Thunks · 3a52eb00
      Peter Smith authored
          
      Thunks are now implemented by redirecting the relocation to the
      symbol S, to a symbol TS in a Thunk. The Thunk will transfer control
      to S. This has the following implications:
      - All the side-effects of Thunks happen within createThunks()
      - Thunks are no longer stored in InputSections and Symbols no longer
        need to hold a pointer to a Thunk
      - The synthetic Thunk sections need to be merged into OutputSections
          
      This implementation is almost a direct conversion of the existing
      Thunks with the following exceptions:
      - Mips LA25 Thunks are placed before the InputSection that defines
        the symbol that needs a Thunk.
      - All ARM Thunks are placed at the end of the OutputSection of the
        first caller to the Thunk.
          
      Range extension Thunks are not supported yet so it is optimistically
      assumed that all Thunks can be reused.
      
      This is a recommit of r293283 with a fixed comparison predicate as
      std::merge requires a strict weak ordering.
      
      Differential revision: https://reviews.llvm.org/D29327
      
      llvm-svn: 293757
      3a52eb00
  2. Jan 28, 2017
  3. Jan 27, 2017
    • Peter Smith's avatar
      [ELF][ARM] Use SyntheticSections for Thunks · 5191c6f9
      Peter Smith authored
          
      Thunks are now implemented by redirecting the relocation to the
      symbol S, to a symbol TS in a Thunk. The Thunk will transfer control
      to S. This has the following implications:
      - All the side-effects of Thunks happen within createThunks()
      - Thunks are no longer stored in InputSections and Symbols no longer
        need to hold a pointer to a Thunk
      - The synthetic Thunk sections need to be merged into OutputSections
          
      This implementation is almost a direct conversion of the existing
      Thunks with the following exceptions:
      - Mips LA25 Thunks are placed before the InputSection that defines
        the symbol that needs a Thunk.
      - All ARM Thunks are placed at the end of the OutputSection of the
        first caller to the Thunk.
          
      Range extension Thunks are not supported yet so it is optimistically
      assumed that all Thunks can be reused.
      
      Differential Revision:  https://reviews.llvm.org/D29129
      
      llvm-svn: 293283
      5191c6f9
  4. Jan 04, 2017
    • Peter Smith's avatar
      [ELF] Add support for thunks to undefined non-weak symbols · 97c6d78f
      Peter Smith authored
          
      In a shared library an undefined symbol is implicitly imported. If the
      symbol is called as a function a PLT entry is generated for it. When the
      caller is a Thumb b.w a thunk to the PLT entry is needed as all PLT
      entries are in ARM state.
          
      This change allows undefined symbols to have thunks in the same way that
      shared symbols may have thunks.
      
      llvm-svn: 290951
      97c6d78f
  5. Nov 26, 2016
  6. Oct 28, 2016
    • Rui Ueyama's avatar
      Consolidate BumpPtrAllocators. · 55518e7d
      Rui Ueyama authored
      Previously, we have a lot of BumpPtrAllocators, but all these
      allocators virtually have the same lifetime because they are
      not freed until the linker finishes its job. This patch aggregates
      them into a single allocator.
      
      Differential revision: https://reviews.llvm.org/D26042
      
      llvm-svn: 285452
      55518e7d
  7. Oct 26, 2016
    • Rafael Espindola's avatar
      Reduce the number of allocators. · 5da1d884
      Rafael Espindola authored
      We used to have one allocator per file, which reduces the advantage of
      using an allocator in the first place.
      
      This is a small speed up is most cases. The largest speedup was in
      1.014X in chromium no-gc. The largest slowdown was scylla at 1.003X.
      
      llvm-svn: 285205
      5da1d884
  8. Sep 30, 2016
  9. Sep 29, 2016
  10. Sep 14, 2016
    • Rui Ueyama's avatar
      Simplify InputFile ownership management. · 38dbd3ee
      Rui Ueyama authored
      Previously, all input files were owned by the symbol table.
      Files were created at various places, such as the Driver, the lazy
      symbols, or the bitcode compiler, and the ownership of new files
      was transferred to the symbol table using std::unique_ptr.
      All input files were then free'd when the symbol table is freed
      which is on program exit.
      
      I think we don't have to transfer ownership just to free all
      instance at once on exit.
      
      In this patch, all instances are automatically collected to a
      vector and freed on exit. In this way, we no longer have to
      use std::unique_ptr.
      
      Differential Revision: https://reviews.llvm.org/D24493
      
      llvm-svn: 281425
      38dbd3ee
  11. Jul 15, 2016
  12. Jun 22, 2016
  13. Apr 28, 2016
    • Rafael Espindola's avatar
      Delete dead variable. · 0de48c39
      Rafael Espindola authored
      llvm-svn: 267935
      0de48c39
    • Rafael Espindola's avatar
      Use a single context for lto. · 156f4ee1
      Rafael Espindola authored
      Using multiple context used to be a really big memory saving because we
      could free memory from each file while the linker proceeded with the
      symbol resolution. We are getting lazier about reading data from the
      bitcode, so I was curious if this was still a good tradeoff.
      
      One thing that is a bit annoying is that we still have to copy the
      symbol names. The problem is that the names are stored in the Module and
      get freed when we move the module bits during linking.
      
      Long term I think the solution is to add a symbol table to the bitcode.
      That way IRObject file will not need to use a Module or a Context and we
      can drop it while still keeping a StringRef to the names.
      
      This patch is still be an interesting medium term improvement.
      
      When linking llvm-as without debug info this patch is a small speedup:
      
      master: 29.861877513 seconds
      patch: 29.814533787 seconds
      
      With debug info the numbers are
      
      master: 34.765181469 seconds
      patch: 34.563351584 seconds
      
      The peak memory usage when linking llvm-as with debug info was
      
      master: 599.10MB
      patch: 600.13MB
      llvm-svn: 267921
      156f4ee1
  14. Apr 22, 2016
  15. Apr 21, 2016
  16. Apr 19, 2016
  17. Apr 18, 2016
  18. Apr 17, 2016
  19. Apr 16, 2016
  20. Apr 12, 2016
  21. Mar 29, 2016
  22. Mar 28, 2016
  23. Mar 23, 2016
  24. Mar 22, 2016
Loading