[PATCH] D41231: [Support][CachePruning] Fix regression that prevents disabling of pruning

ben via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 18 08:22:37 PST 2017


bd1976llvm updated this revision to Diff 127367.
bd1976llvm added a comment.

Thanks for the great review comments.

@tejohnson: 
I didn't realize that it was easy to write a test for this via llvm-lto (i.e. I hadn't noticed that the c/c++ legacy apis share a backend!) otherwise I would have added a test without prompting.

@labath:
Absolutely correct about the danger of overflow with chrono duration types. In fact on windows we do actually get this overflow occurring. This is because on windows the modification time for files is of type nanoseconds as opposed to seconds on e.g. linux (see: getLastModificationTime). I have attempted to make the code safer at the cost of half a second of precision.


https://reviews.llvm.org/D41231

Files:
  include/llvm/LTO/legacy/ThinLTOCodeGenerator.h
  lib/Support/CachePruning.cpp
  test/ThinLTO/X86/cache.ll
  tools/llvm-lto/llvm-lto.cpp
  tools/lto/lto.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41231.127367.patch
Type: text/x-patch
Size: 5557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171218/8ab190c8/attachment.bin>


More information about the llvm-commits mailing list