[PATCH] D20268: [wip] Resolution-based LTO API.

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 19:05:34 PDT 2016


tejohnson added a comment.

In http://reviews.llvm.org/D20268#435137, @joker.eph wrote:

> In http://reviews.llvm.org/D20268#435099, @tejohnson wrote:
>
> > Just started to look through the new patch. A high level question - for the distributed backend case, is the idea that clang would invoke LTOBackend:: runThinLtoBackendThread directly, instead of setting up a pass pipeline itself? Were you able to get this patch to work with the clang side distributed backend path?
>
>
> That was not my understanding, I'd expect *only* the linker to interact with this API.
>
> I'd expect an implementation of ThinLTO distributed backend here to produce and serialize the information needed by the individual clang job (since the linker is not expected to produce a binary at this point, right?).


That was my recommendation in the reviews on the earlier version of this patch, but a comment on the LTOBackend class made me think pcc planned to use this for the distributed backends themselves too (see the comment I noted below).


================
Comment at: include/llvm/LTO/LTO.h:141
@@ +140,3 @@
+
+  /// A combined index hook is called after all module indices have been
+  /// combined. It can be used to implement -save-temps for the combined index.
----------------
joker.eph wrote:
> tejohnson wrote:
> > joker.eph wrote:
> > > pcc wrote:
> > > > joker.eph wrote:
> > > > > Not sure what "indices" mean in this context.
> > > > Plural of "module index", but I think I need "indexes" here, since according to https://en.wiktionary.org/wiki/indices this sense of "index" cannot be pluralised as "indices".
> > > Oh, I see, I don't think we ever named the individual module summaries "index", but only used this term for "combined index". That's why I was confused with what it was referring to.
> > I think we do use the term index but typically refer to them as per-module indexes. We now have 3 types of indexes:
> > 
> > per-module indexes (emitted by the compile step with the rest of the bitcode)
> > combined index
> > individual (combined) indexes (for distributed backends)
> > 
> > Which is admittedly a bit confusing...
> What I'm referring to is that for instance we have `writePerModuleGlobalValueSummary` and not `writePerModuleIndex`.
That's true. There are a few places that talk about a per-module index (and a PerModuleIndex boolean), but for the most part we talk about that as a summary within the normal bitcode file.

================
Comment at: include/llvm/Transforms/IPO/LTOBackend.h:22
@@ +21,3 @@
+/// class. This has been made into a separate class so that it can be used to
+/// implement a distributed ThinLTO backend.
+struct LTOBackend {
----------------
The above comment led me to believe this was intended for the distributed backends themselves as well.


http://reviews.llvm.org/D20268





More information about the llvm-commits mailing list