Ignore:
Timestamp:
Aug 28, 2017, 4:00:17 PM (21 months ago)
Author:
nmedfort
Message:

Bug fixes for multigrep mode. Optional PabloKernel? branch hit counter added. Minor optimizations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/kernel.cpp

    r5615 r5620  
    191191    // will be able to add instrumentation to cached modules without recompilation.
    192192    addScalar(idb->getInt64Ty(), CYCLECOUNT_SCALAR);
    193    
    194     mKernelStateType = StructType::create(idb->getContext(), mKernelFields, getName());
    195    
     193    // NOTE: StructType::create always creates a new type even if an identical one exists.
     194    mKernelStateType = getModule()->getTypeByName(getName());
     195    if (LLVM_LIKELY(mKernelStateType == nullptr)) {
     196        mKernelStateType = StructType::create(idb->getContext(), mKernelFields, getName());
     197    }
    196198    processingRateAnalysis();
    197199}
     
    11601162        name += "_EA";
    11611163    }
     1164    name += "_O" + std::to_string((int)codegen::OptLevel);
    11621165    return name;
    11631166}
Note: See TracChangeset for help on using the changeset viewer.