[PATCH] D69327: [Clang][ThinLTO] Add a cache for compile phase output.
Yuanfang Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 24 00:47:44 PDT 2019
ychen added a comment.
In D69327#1719419 <https://reviews.llvm.org/D69327#1719419>, @steven_wu wrote:
> 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.
I tried ccache, it does not cache `-fthin-link-bitcode` output.
>From this link, it seems ccache only cares about "-o" output.
https://github.com/ccache/ccache/blob/ac9911b47b8a3777d20a3c481f90f877e8f9a81d/src/ccache.cpp#L2616
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