llvm-capstone/lld/MachO
Daniel Bertalan f546165754
[lld-macho] Don't create entries in isecPriorities during sorting (NFC)
If a value for a given key is not present, `DenseMap::operator[]`
default-constructs one, which is wasteful when we don't do anything with
it afterwards. Fix it by calling `lookup()` instead which only returns
the default value, but does not modify the map.

This speeds up linking a fair bit when only a small portion of all
sections are specified in the order file, like in the case of Chromium
Framework:

      N           Min           Max        Median           Avg        Stddev
  x  25      3.727684     3.8808699      3.753552     3.7702461     0.0397282
  +  25     3.6469049     3.7523289     3.6764321     3.6841622   0.025525047
  Difference at 95.0% confidence
  	-0.0860839 +/- 0.0189924
  	-2.28324% +/- 0.503745%
  	(Student's t, pooled s = 0.0333906)

Differential Revision: https://reviews.llvm.org/D134811
2022-09-28 16:50:18 +02:00
..
Arch [lld-macho] Parallelize linker optimization hint processing 2022-09-16 17:38:46 +02:00
CMakeLists.txt [lld-macho][reland] Initial support for EH Frames 2022-06-13 07:45:16 -04:00
ConcatOutputSection.cpp Replace to_hexString by touhexstr [NFC] 2022-06-16 17:29:50 +02:00
ConcatOutputSection.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
Config.h [lld-macho] Support -dyld_env 2022-09-20 10:16:45 -04:00
Driver.cpp [lld-macho] Support -dyld_env 2022-09-20 10:16:45 -04:00
Driver.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
DriverUtils.cpp [lld/mac] Add support for $ld$previous symbols with explicit symbol name 2022-07-28 20:35:48 -04:00
Dwarf.cpp [lld-macho] Support creating N_SO stab for DWARF5 compile units 2022-07-28 09:58:26 +02:00
Dwarf.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
EhFrame.cpp [lld-macho] Support EH frame pointer encodings that use sdata4 2022-07-31 20:16:33 -04:00
EhFrame.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
ExportTrie.cpp Reland "[lld-macho] Avoid using bump-alloc in TrieBuider"" 2022-03-14 19:33:13 -04:00
ExportTrie.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
ICF.cpp [lld-macho] Have ICF dedup explicitly-defined selrefs 2022-09-14 17:59:22 -04:00
ICF.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
InputFiles.cpp [lld-macho] Parallelize linker optimization hint processing 2022-09-16 17:38:46 +02:00
InputFiles.h [lld-macho] Parallelize linker optimization hint processing 2022-09-16 17:38:46 +02:00
InputSection.cpp [lld-macho] Parallelize linker optimization hint processing 2022-09-16 17:38:46 +02:00
InputSection.h [lld-macho] Parallelize linker optimization hint processing 2022-09-16 17:38:46 +02:00
LTO.cpp [lld-macho] Hardlink -object_path_lto files to cache when possible 2022-09-07 14:27:43 -04:00
LTO.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
MachOStructs.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
MapFile.cpp [lld-macho][nfci] Don't include null terminator in StringRefs 2022-09-13 21:23:48 -04:00
MapFile.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
MarkLive.cpp [lld-macho][nfc] Simplify MarkLive.cpp using if constexpr 2022-08-31 10:40:04 -04:00
MarkLive.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
ObjC.cpp [lld/macho] Fixes the -ObjC flag 2022-05-11 17:00:39 -07:00
ObjC.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
Options.td [lld-macho] Fix -force_symbols_{,not_}weak_list arg type 2022-09-27 10:36:40 -04:00
OutputSection.cpp [lld-macho][nfc] Run clang-format on lld/MachO/*.{h,cpp} 2022-05-24 08:36:20 +07:00
OutputSection.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
OutputSegment.cpp [lld-macho] Set the SG_READ_ONLY flag on __DATA_CONST 2022-08-31 17:04:20 +02:00
OutputSegment.h [lld-macho] Set the SG_READ_ONLY flag on __DATA_CONST 2022-08-31 17:04:20 +02:00
Relocations.cpp [lld-macho] Diagnose unaligned arm64 PAGEOFF12 relocations 2022-09-05 16:58:51 +02:00
Relocations.h [lld-macho] Parallelize linker optimization hint processing 2022-09-16 17:38:46 +02:00
SectionPriorities.cpp Use value instead of getValue (NFC) 2022-07-15 20:03:13 -07:00
SectionPriorities.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
Symbols.cpp [lld-macho] Use source information in duplicate symbol errors 2022-06-23 11:07:15 -04:00
Symbols.h [lld-macho][reland] Add support for N_INDR symbols 2022-09-15 22:57:15 -04:00
SymbolTable.cpp [lld-macho][reland] Add support for N_INDR symbols 2022-09-15 22:57:15 -04:00
SymbolTable.h [lld-macho][reland] Add support for N_INDR symbols 2022-09-15 22:57:15 -04:00
SyntheticSections.cpp [lld-macho] Simplify base address calculation for init offsets (NFC) 2022-09-17 10:23:05 +02:00
SyntheticSections.h [lld-macho] Sort data-in-code entries 2022-09-13 19:08:35 +02:00
Target.cpp [lld-macho][nfc] Create Relocations.{h,cpp} for relocation-specific code 2021-03-11 13:28:09 -05:00
Target.h [lld-macho] Parallelize linker optimization hint processing 2022-09-16 17:38:46 +02:00
UnwindInfoSection.cpp Drop empty string literals from static_assert (NFC) 2022-09-03 11:17:47 -07:00
UnwindInfoSection.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00
Writer.cpp [lld-macho] Don't create entries in isecPriorities during sorting (NFC) 2022-09-28 16:50:18 +02:00
Writer.h [lld/mac] Use C++17 nested namespace syntax in most places 2022-08-08 07:11:17 -04:00