[PATCH] D69327: [Clang][ThinLTO] Add a cache for compile phase output.

Steven Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 23 22:57:27 PDT 2019


steven_wu added a comment.

In D69327#1719411 <https://reviews.llvm.org/D69327#1719411>, @ychen wrote:

> Thanks for the inputs @steven_wu @tejohnson. Totally agree with the points you brought up. One last thing I'm not quite sure is the caching of `-fthin-link-bitcode`. It is a `-cc1` option since it is a kind of implementation of ThinLTO, right? I'm a little hesitant to begin writing up patches to teach build system/caching tool (I could think of at least three for our workload) to recognize this option because of that. If there are any changes to the option, the same thing needs to be done again. Do you have any thoughts on that? Is the option in use for your workload and do you think it is stable enough to have build systems caching for it? (Another option is to produce `-fthin-link-bitcode` output post compile time which I assume having total build time impact to some degree).


`-fthin-link-bitcode` option is used to run distributed thin link. The format is not stable but it is deterministic for a fixed compiler version. You should be able to cache the thin-link-bitcode and expected it to be used only by the same compiler version.

For any build system that implements caching, it must take compiler version into consideration because different compiler will produce different output. I don't think the rule to cache thin-link-bitcode is any different from any other output during the build.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69327





More information about the cfe-commits mailing list