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

Yuanfang Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 23 14:14:32 PDT 2019


ychen added a comment.

In D69327#1719109 <https://reviews.llvm.org/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 -flto=thin -c" step? Typically the build system takes care of incremental build handling for these explicit outputs, just as it would for a non-LTO clang compile output. Can you clarify the motivation?


Hi Teresa, thanks for the feedback. I think the motivation is to provide an option that reliably caches thinLTO compile output regardless of the external setup of compiler cache or the platform is used. I'm not sure if compiler cache such as ccache could save `-fthin-link-bitcode` output and if there is a ccache equivalence on windows? Even if such tool exists, having linking phase caching managed by toolchain/linker and the compile phase by an external tool feels awkward and fragile. This patch mostly shares the implementation with linke phase caching.

Additionally, this also has a small benefit of trigging a little bit more caching because it is hashing IR instead of preprocessor output or even literal source file.


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