This is an archive of the discontinued LLVM Phabricator instance.

Cache modulo values for the .gnu.hash section.
ClosedPublic

Authored by ruiu on Nov 30 2017, 5:28 PM.

Details

Summary

This change actually makes the linker slightly faster. My observation
is that, with this patch, link time of clang without debug is about 1%
faster.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

ruiu created this revision.Nov 30 2017, 5:28 PM
ruiu updated this revision to Diff 125065.Nov 30 2017, 5:29 PM
  • Removed unrelated change.
ruiu updated this revision to Diff 125067.Nov 30 2017, 6:08 PM
  • clang-format

It seems this patch actually makes that test case 2% faster, which
isn't a negligible improvement.

joerg added a subscriber: joerg.Dec 1 2017, 7:34 AM

Instead of computing and storing the modulus directly, it is likely better to precompute the inverse and use that to improve the performance of the operation in first place. Consider using fast_remainder32 and associated functions.

This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.