[PATCH] D37993: [ThinLTO/gold] Implement ThinLTO cache pruning support

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 11:33:14 PST 2018


pcc added a comment.

Ping.



================
Comment at: llvm/trunk/tools/gold/gold-plugin.cpp:980
+  // Prune cache
+  if (!options::cache_policy.empty()) {
+    CachePruningPolicy policy = check(parseCachePruningPolicy(options::cache_policy));
----------------
tejohnson wrote:
> pcc wrote:
> > tejohnson wrote:
> > > pcc wrote:
> > > > I think this should check `cache_dir`, not `cache_policy`.
> > > It seems fine since pruneCache will return immediately if cache_dir is empty. But we could save some work if both were checked. I assume parseCachePruningPolicy will also work if cache_policy is empty, but it seems fine to have the checking.
> > I was more thinking about the behaviour when a cache directory is specified and no cache policy is specified. In that case the behaviour of the other linkers is to prune with the default policy, so it's probably best to be consistent with that.
> Oh, I see what you are saying. Yes, this makes sense.
Please at least address this.


Repository:
  rL LLVM

https://reviews.llvm.org/D37993





More information about the llvm-commits mailing list