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

2019-10-24 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Thank you @steven_wu @tejohnson. I created D69406 to promote the flag to the driver. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69327/new/ https://reviews.llvm.org/D69327 _

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

2019-10-24 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. `ccache` does not have the support for this, I am just saying that this can be easily implemented in `ccache` and that would be much better than the proposed solution here. If we need to add a clang driver flag so build system can better support to detect thin bitcod

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

2019-10-24 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. We rely on the minimized bitcode from that option in our builds, so it won't be going away. We could add it as a driver option, but it doesn't sound like that will solve the ccache issue. I'm not very familiar with that cache support, or if there is a way to express o

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

2019-10-24 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Sorry for the confusion @steven_wu. By `stable` I mean the probability that the `-fthin-link-bitcode` option is replaced with some other thinlink mechanism under the distributed build environment. Since at least for ccache, the compilation output caching depends on the se

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

2019-10-24 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D69327#1719419 , @steven_wu wrote: > In D69327#1719411 , @ychen wrote: > > > Thanks for the inputs @steven_wu @tejohnson. Totally agree with the points > > you brought up. One last thing I

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

2019-10-23 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. In 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

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

2019-10-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. 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 beg

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

2019-10-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D69327#1719295 , @tejohnson wrote: > I was just typing up a response similar to @steven_wu 's response... I don't > think clang should be in the business of caching the outputs of a prior clang > invocation, the build system

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

2019-10-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. I was just typing up a response similar to @steven_wu 's response... I don't think clang should be in the business of caching the outputs of a prior clang invocation, the build system should and usually does avoid re-executing if the inputs have not changed. Note that

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

2019-10-23 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. Can you clarify what do you mean by 'waste time optimizing a file that finally hit the object file cache'? No matter what build system to use, it should figure out during an incremental build that the input wasn't changed and not rerun the clang invocation on the sam

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

2019-10-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D69327#1719109 , @tejohnson wrote: > I haven't read through the patch in detail yet, but from the description it > sounds like a cache is being added for the compile step outputs, e.g. the > bitcode output object of the "clang -

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

2019-10-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. I haven't read through the patch in detail yet, but from the description it sounds like a cache is being added for the compile step outputs, e.g. the bitcode output object of the "clang -flto=thin -c" step? Typically the build system takes care of incremental build ha

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

2019-10-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: mehdi_amini, pcc, tejohnson. Herald added subscribers: llvm-commits, cfe-commits, dang, dexonsmith, steven_wu, aheejin, hiraditya, inglorion. Herald added projects: clang, LLVM. Currently the link phase has a object file cache whereas the compil