diff options
author | Ben Dunbobbin <bd1976llvm@gmail.com> | 2017-12-19 14:42:38 +0000 |
---|---|---|
committer | Ben Dunbobbin <bd1976llvm@gmail.com> | 2017-12-19 14:42:38 +0000 |
commit | 9ecb8b548c07551574a06ed19ce30b11d858df7a (patch) | |
tree | b1d913b957cc186ed8a3c9b86957ef6af8abda77 /llvm/tools/llvm-lto/llvm-lto.cpp | |
parent | 3feaf2a20748c75b2b055b730571ca26534830ae (diff) | |
download | bcm5719-llvm-9ecb8b548c07551574a06ed19ce30b11d858df7a.tar.gz bcm5719-llvm-9ecb8b548c07551574a06ed19ce30b11d858df7a.zip |
[Support][CachePruning] Disable cache pruning regression fix
borked by: rL284966 (see: https://reviews.llvm.org/D25730).
Previously, Interval was unsigned (see: CachePruning.h), replacing the type with std::chrono::seconds (which is signed) causes a regression in behaviour because the c-api intends negative values to translate to large positive intervals to *effectively* disable the pruning (see comments on: setCachePruningInterval()).
Differential Revision: https://reviews.llvm.org/D41231
llvm-svn: 321077
Diffstat (limited to 'llvm/tools/llvm-lto/llvm-lto.cpp')
-rw-r--r-- | llvm/tools/llvm-lto/llvm-lto.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp index 20c6813968b..7d71a3e8dfe 100644 --- a/llvm/tools/llvm-lto/llvm-lto.cpp +++ b/llvm/tools/llvm-lto/llvm-lto.cpp @@ -156,6 +156,9 @@ static cl::opt<std::string> ThinLTOModuleId( static cl::opt<std::string> ThinLTOCacheDir("thinlto-cache-dir", cl::desc("Enable ThinLTO caching.")); +static cl::opt<int> + ThinLTOCachePruningInterval("thinlto-cache-pruning-interval", cl::desc("Set ThinLTO cache pruning interval.")); + static cl::opt<std::string> ThinLTOSaveTempsPrefix( "thinlto-save-temps", cl::desc("Save ThinLTO temp files using filenames created by adding " @@ -470,6 +473,7 @@ public: ThinGenerator.setCodePICModel(getRelocModel()); ThinGenerator.setTargetOptions(Options); ThinGenerator.setCacheDir(ThinLTOCacheDir); + ThinGenerator.setCachePruningInterval(ThinLTOCachePruningInterval); ThinGenerator.setFreestanding(EnableFreestanding); // Add all the exported symbols to the table of symbols to preserve. |