This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Do not create a temporary data structure for relocations.
ClosedPublic

Authored by ruiu on Feb 19 2018, 3:33 PM.

Details

Summary

This patch removes OutRelocations vector from the InputChunk and
directly consume Relocations vector instead. This should make the linker
faster because we don't create a temporary data structure, and it matches
the lld's design principle that we don't create temporary data structures
for object files but instead directly consume mmap'ed data whenever possible.

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu created this revision.Feb 19 2018, 3:33 PM
ruiu retitled this revision from Do not create a temporary data structure for relocations. to [WebAssembly] Do not create a temporary data structure for relocations..Feb 19 2018, 3:34 PM
ruiu added a reviewer: sbc100.
ruiu added a subscriber: llvm-commits.
ruiu updated this revision to Diff 134983.Feb 19 2018, 3:37 PM
  • remove dead code

This is much better. Thank you. I particularly like the elimination of that random struct.

sbc100 added inline comments.Feb 19 2018, 4:38 PM
lld/wasm/InputChunks.h
54 ↗(On Diff #134983)

I guess we might as well get rid of this pair get/setters now and just expose OutputOffset.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 19 2018, 8:29 PM
This revision was automatically updated to reflect the committed changes.