[LLVMdev] LLD improvement plan
Sean Silva
chisophugis at gmail.com
Fri May 29 21:06:13 PDT 2015
On Fri, May 29, 2015 at 8:29 PM, James Y Knight <jyknight at google.com> wrote:
>
> On May 29, 2015, at 10:08 PM, Rui Ueyama <ruiu at google.com> wrote:
> > Large part of the difficulties in development of the current LLD comes
> from over-generalizataion to share code between pretty much different file
> formats.
>
> ISTM the problem that's been described isn't that code is shared between
> file formats, but that an internal representation was chosen based on what
> MachO required, which in the end turned out to be unsuitable for
> representing the greater generality allowed by the other two file formats.
>
> You state that the goal is to use this new model for ELF too, assuming it
> proves itself worthy. Will ELF and COFF not share most of the core of the
> code at that point?
>
> And once COFF and ELF are taken care of, do you not think the new model
> will be suitable for MachO, too? It seems to me that it ought to be able to
> handle MachO's needs just fine, with a suitable division of MachO sections
> into "Chunk"s.
>
> Perhaps once everything is said and done, lld can once again have a single
> core model. I think that may be what Sean was trying to get at -- not that
> it's wrong to create a new model as a base, but that the expectation should
> be that new model will be _the_ model used in LLD, not a second model to be
> kept permanently alongside the current "single-symbol-per-atom" model,
> which has been shown insufficient.
>
I couldn't have said it better myself.
Looking at the bigger picture, without some sort of commonality factored
across all 3 formats in LLD, it is very difficult for the LLVM project to
deliver useful innovations consistently across platforms. Without a common
model, we are limited to a patchwork of platform-specific hacks; with a
common model, we can think about new features at a higher level and deliver
them consistently.
The situation is very analogous to the reason why it is a good idea to have
the LLVM IR in the middle-end. The LLVM IR is not target-agnostic; but the
target-specific aspects are managed in more-or-less controlled fashion that
allows thinking about certain things at a higher level.
-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150529/988a0021/attachment.html>
More information about the llvm-dev
mailing list