llvm-project/lld/lib/Passes
Rui Ueyama 8be4ce254a Do not use layout-before to layout atoms.
Currently we use both layout-after and layout-before edges to specify atom
orders in the resulting executable. We have a complex piece of code in
LayoutPass.cpp to deal with both types of layout specifiers.

(In the following description, I denote "Atom A having a layout-after edge
to B" as "A -> B", and A's layout-before to B as "A => B".)

However, that complexity is not really needed for this reason: If there
are atoms such that A => B, B -> A is always satisifed, so using only layout-
after relationships will yield the same result as the current code.

Actually we have a piece of complex code that verifies that, for each A -> B,
B => [ X => Y => ... => Z => ] A is satsified, where X, Y, ... Z are all
zero-size atoms. We can get rid of the code from our codebase because layout-
before is basically redundant.

I think we can simplify the code for layout-after even more than this, but
I want to just remove this pass for now for simplicity.

Layout-before edges are still there for dead-stripping, so this change won't
break it. We will remove layout-before in a followup patch once we fix the
dead-stripping pass.

Differential Revision: http://llvm-reviews.chandlerc.com/D3164

llvm-svn: 204966
2014-03-27 22:08:26 +00:00
..
CMakeLists.txt Whitespace 2013-11-01 19:54:29 +00:00
GOTPass.cpp [lld] Introduce registry and Reference kind tuple 2013-12-19 21:58:00 +00:00
LayoutPass.cpp Do not use layout-before to layout atoms. 2014-03-27 22:08:26 +00:00
RoundTripNativePass.cpp Replace OwningPtr with std::unique_ptr. 2014-03-13 16:20:38 +00:00
RoundTripYAMLPass.cpp Remove safeguard from RoundTripYAML pass. 2014-03-26 00:21:11 +00:00
StubsPass.cpp [lld] Introduce registry and Reference kind tuple 2013-12-19 21:58:00 +00:00