This is an archive of the discontinued LLVM Phabricator instance.

Make dead-striping to handle reverse edges.
ClosedPublic

Authored by ruiu on Jun 2 2014, 1:00 AM.

Details

Summary

Layout-before edges are no longer used for layout, but they are
still there for dead-stripping. If we would just remove them
from code, LLD would wrongly remove live atoms that were
referenced by layout-befores.

This patch fixes the issue. Before dead-stripping, it scans all
atoms to construct a reverse map for layout-after edges. Dead-
stripping pass uses the map to traverse the graph.

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu updated this revision to Diff 10007.Jun 2 2014, 1:00 AM
ruiu retitled this revision from to Make dead-striping to handle reverse edges..
ruiu updated this object.
ruiu edited the test plan for this revision. (Show Details)
ruiu added reviewers: Bigcheese, shankarke, atanasyan.
ruiu added a subscriber: Unknown Object (MLST).
shankar.easwaran requested changes to this revision.Jun 2 2014, 5:48 AM

Did you measure the memory increase for linking large applications like clang for example ?

Check with Nick as well.

Your code LGTM otherwise.

This revision now requires changes to proceed.Jun 2 2014, 5:48 AM
Bigcheese edited edge metadata.Jun 2 2014, 6:16 PM

You should also update documentation.

lib/Core/Resolver.cpp
340–342 ↗(On Diff #10007)

The indentation looks messed up here.

ruiu updated this revision to Diff 10034.Jun 2 2014, 6:40 PM
ruiu edited edge metadata.
  • updated comment
  • fixed indentation
Bigcheese accepted this revision.Jun 2 2014, 7:01 PM
Bigcheese edited edge metadata.

lgtm.

ruiu closed this revision.Jun 2 2014, 7:07 PM
ruiu updated this revision to Diff 10035.

Closed by commit rL210057 (authored by @ruiu).