[PATCH] D55080: [ThinLTO] Out-of-process CodeGenerator for legacy C API

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 17 11:03:46 PST 2018


steven_wu added a comment.



> Thanks for the clarifications. Would it be possible to utilize ThinBackendProc for this instead of a new CodeGenManager class? I.e. make a new derived version that does the index file write and spawns the local processes? The advantage is that it would start converging the implementations. And I think this could aid in refactoring suggested below to avoid duplication. Another advantage is that both LTO API's would have access to all backend implementations (in process, write indexes and exit, write indexes and use local processes, etc).

It think that is definitely possible, but as you mentioned above, most of the code duplication is coming from ThinLTOCodeGenerator. Most of the duplication is to help me maintain is downstream so the patch can be able to constantly rebasing it to master. I want to see how much value does this have to upstream for other legacy C API users before I refactor both new and old API to share more interfaces. I will ping Sony linker team offline to see if they have any comments on this.

The other possibility is to refactor the ThinLTOCodegenator to use ThinBackendProc as a starting point. I haven't done any research to see how easy it is to adapt the C APIs to the new ones but I think that should be doable as well.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55080/new/

https://reviews.llvm.org/D55080





More information about the llvm-commits mailing list