Ignore:
Timestamp:
Dec 10, 2017, 6:37:08 PM (17 months ago)
Author:
cameron
Message:

Fix a segfault and add -cache-days-limit=N option

Location:
icGREP/icgrep-devel/icgrep/toolchain
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/toolchain/cpudriver.cpp

    r5745 r5773  
    230230
    231231void ParabixDriver::performIncrementalCacheCleanupStep() {
    232     mCache->performIncrementalCacheCleanupStep();
     232    if (mCache) mCache->performIncrementalCacheCleanupStep();
    233233}
    234234
  • icGREP/icgrep-devel/icgrep/toolchain/object_cache.cpp

    r5771 r5773  
    2929
    3030#ifdef NDEBUG
    31 #define CACHE_ENTRY_MAX_HOURS (24 * 15)
     31#define CACHE_ENTRY_MAX_HOURS (24 * codegen::CacheDaysLimit)
    3232#else
    3333#define CACHE_ENTRY_MAX_HOURS (1)
  • icGREP/icgrep-devel/icgrep/toolchain/toolchain.cpp

    r5771 r5773  
    5757
    5858
     59static cl::opt<unsigned, true> CacheLimitOption("cache-days-limit", cl::location(CacheDaysLimit), cl::init(15),
     60                                          cl::desc("number of days a cache entry may be unused before auto deletion may be applied"), cl::cat(CodeGenOptions));
     61
     62
    5963static cl::opt<unsigned, true> BlockSizeOption("BlockSize", cl::location(BlockSize), cl::init(0),
    6064                                          cl::desc("specify a block size (defaults to widest SIMD register width in bits)."), cl::cat(CodeGenOptions));
     
    101105
    102106bool EnableObjectCache;
     107
     108unsigned CacheDaysLimit;
    103109
    104110bool NVPTX = [](const bool nvptx) {
  • icGREP/icgrep-devel/icgrep/toolchain/toolchain.h

    r5771 r5773  
    6565#endif
    6666extern const char * ObjectCacheDir;
     67extern unsigned CacheDaysLimit;  // set from command line
    6768extern llvm::CodeGenOpt::Level OptLevel;  // set from command line
    6869extern unsigned BlockSize;  // set from command line
Note: See TracChangeset for help on using the changeset viewer.