[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-18 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe678c5117710: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library (authored by noajshu, committed by phosek). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-18 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 380527. noajshu added a comment. Migrate references to Caching.cpp from llvm/utils/gn/secondary/llvm/lib/LTO/BUILD.gn to [...]/Support/BUILD.gn. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-18 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 380498. noajshu added a comment. Update references to LTO/Caching in Gold plugin and Clang docs; rebase against main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/ https://reviews.llvm.org/D111371

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-18 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG92b8cc52bbc8: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library (authored by noajshu, committed by phosek). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-15 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 380039. noajshu marked an inline comment as done. noajshu added a comment. rebase against main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/ https://reviews.llvm.org/D111371 Files:

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-14 Thread Noah Shutty via Phabricator via cfe-commits
noajshu marked an inline comment as done. noajshu added inline comments. Comment at: llvm/include/llvm/Support/Caching.h:1 +//===- Caching.h - LLVM File Cache Handling Configuration -===// +// MaskRay wrote: > There needs to be a `*- C++ -*-`. >

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-14 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 379912. noajshu added a comment. Add *- C++ -*- header indicator to Caching.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/ https://reviews.llvm.org/D111371 Files:

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: llvm/include/llvm/Support/Caching.h:1 +//===- Caching.h - LLVM File Cache Handling Configuration -===// +// There needs to be a `*- C++ -*-`. Can you check whether the

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/ https://reviews.llvm.org/D111371

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-14 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 379787. noajshu added a comment. rebase against main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/ https://reviews.llvm.org/D111371 Files: clang/lib/CodeGen/BackendUtil.cpp lld/COFF/LTO.cpp

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-13 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 379598. noajshu added a comment. Rebase against main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/ https://reviews.llvm.org/D111371 Files: clang/lib/CodeGen/BackendUtil.cpp lld/COFF/LTO.cpp

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-12 Thread Noah Shutty via Phabricator via cfe-commits
noajshu added a comment. @tejohnson Thanks for your comments! From my perspective this patch is done. Please let me know if you have any further changes to suggest before accepting. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-12 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 379104. noajshu added a comment. Make cache dir parameter a Twine and avoid unnecessary copy in conversion to SmallString. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-12 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 379095. noajshu added a comment. rebase against main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/ https://reviews.llvm.org/D111371 Files: clang/lib/CodeGen/BackendUtil.cpp lld/COFF/LTO.cpp

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-11 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 378787. noajshu added a comment. rebase against main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/ https://reviews.llvm.org/D111371 Files: clang/lib/CodeGen/BackendUtil.cpp lld/COFF/LTO.cpp

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-11 Thread Noah Shutty via Phabricator via cfe-commits
noajshu added inline comments. Comment at: llvm/lib/Support/Caching.cpp:36 + SmallString<10> CacheName = CacheNameRef; return [=](unsigned Task, StringRef Key) -> AddStreamFn { tejohnson wrote: > noajshu wrote: > > noajshu wrote: > > > tejohnson wrote: > >

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-11 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 378785. noajshu marked an inline comment as not done. noajshu added a comment. Make copies of string reference parameters outside the returned lambda. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-09 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: llvm/lib/Support/Caching.cpp:36 + SmallString<10> CacheName = CacheNameRef; return [=](unsigned Task, StringRef Key) -> AddStreamFn { noajshu wrote: > noajshu wrote: > > tejohnson wrote: > > > Is this copy

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-08 Thread Noah Shutty via Phabricator via cfe-commits
noajshu marked 3 inline comments as not done. noajshu added inline comments. Comment at: llvm/lib/Support/Caching.cpp:36 + SmallString<10> CacheName = CacheNameRef; return [=](unsigned Task, StringRef Key) -> AddStreamFn { noajshu wrote: > tejohnson wrote:

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-08 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 378328. noajshu marked 2 inline comments as done. noajshu added a comment. Add documentation for new parameters to localCache. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-08 Thread Noah Shutty via Phabricator via cfe-commits
noajshu marked 3 inline comments as done. noajshu added inline comments. Comment at: llvm/lib/Support/Caching.cpp:36 + SmallString<10> CacheName = CacheNameRef; return [=](unsigned Task, StringRef Key) -> AddStreamFn { tejohnson wrote: > Is this copy

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-08 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 378316. noajshu added a comment. Adjust cache name/prefix customization. Move customization arguments to be first. Convert to twines, remove unnecessary copy. Separate customized file prefix from customized cache name (to avoid chaning any behavior from

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-08 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: llvm/include/llvm/Support/Caching.h:68 +/// already exist. +Expected localCache(StringRef CacheDirectoryPath, + AddBufferFn AddBuffer, Nit: document new parameter.

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: llvm/lib/Support/Caching.cpp:32 + AddBufferFn AddBuffer, + StringRef CacheNameRef) { if (std::error_code EC =

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-08 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 378296. noajshu added a comment. Rebase against main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/ https://reviews.llvm.org/D111371 Files: clang/lib/CodeGen/BackendUtil.cpp lld/COFF/LTO.cpp

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-08 Thread Noah Shutty via Phabricator via cfe-commits
noajshu updated this revision to Diff 378289. noajshu added a comment. Make file prefix and error prefix configurable. This sets the prefix for existing use to "Thin" to avoid chaning the behavior. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-08 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. This lgtm but I agree with @phosek 's suggestion to configure the file prefix and keep it as "Thin" for ThinLTO. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111371/new/ https://reviews.llvm.org/D111371

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-07 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: llvm/lib/Support/Caching.cpp:137 + sys::path::append(TempFilenameModel, CacheDirectoryPath, +"Caching-%%.tmp.o"); Expected Temp = sys::fs::TempFile::create( I would make this

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-07 Thread Noah Shutty via Phabricator via cfe-commits
noajshu added a comment. @MaskRay Thank you for pointing this out. I just added this! The use case is a Debuginfod client implementation. The `AssetCache` in the debuginfod client revision will be replaced by the localCache that was implemented for ThinLTO,

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Can you state your intended use case (make that patch a dependent of this one by clicking `Edit Related Revisions` if you have such a patch) so that others can analyze whether code sharing is justified? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D111371: [Support][ThinLTO] Move ThinLTO caching to LLVM Support library.

2021-10-07 Thread Noah Shutty via Phabricator via cfe-commits
noajshu created this revision. Herald added subscribers: ormris, dexonsmith, steven_wu, hiraditya, arichardson, inglorion, sbc100, mgorny, emaste. Herald added a reviewer: MaskRay. Herald added a reviewer: gkm. Herald added a project: lld-macho. Herald added a reviewer: lld-macho. noajshu