aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2021-12-21 09:43:44 -0800
committerFangrui Song <i@maskray.me>2021-12-21 09:43:44 -0800
commit6683099a0d0a17fcde3576733e9c85e3b5f71de5 (patch)
tree7d103d93769c8cdb19802e63c9f3ad8886f33996 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parent008849d7a51e4d7125d5b2eaeba495e4797dd749 (diff)
downloadllvm-6683099a0d0a17fcde3576733e9c85e3b5f71de5.zip
llvm-6683099a0d0a17fcde3576733e9c85e3b5f71de5.tar.gz
llvm-6683099a0d0a17fcde3576733e9c85e3b5f71de5.tar.bz2
[ELF] Optimize RelocationSection<ELFT>::writeTo
When linking a 1.2G output (nearly no debug info, 2846621 dynamic relocations) using `--threads=8`, I measured ``` 9.131462 Total ExecuteLinker 1.449913 Total Write output file 1.445784 Total Write sections 0.657152 Write sections {"detail":".rela.dyn"} ``` This change decreases the .rela.dyn time to 0.25, leading to 4% speed up in the total time. * The parallelSort is slow because of expensive r_sym/r_offset computation. Cache the values. * The iteration is slow. Move r_sym/r_addend computation ahead of time and parallelize it. With the change, the new encodeDynamicReloc is cheap (0.05s). So no need to parallelize it. Reviewed By: ikudrin Differential Revision: https://reviews.llvm.org/D115993
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions