Ignore:
Timestamp:
Sep 21, 2017, 3:10:34 PM (20 months ago)
Author:
nmedfort
Message:

Minor clean up. Bug fix for object cache when the same cached kernel is used twice in a single run. Improvement to RE Minimizer.

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

Legend:

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

    r5630 r5646  
    5858
    5959void NVPTXDriver::generatePipelineIR() {
    60     #ifndef NDEBUG
    61     if (LLVM_UNLIKELY(mPipeline.empty())) {
    62         report_fatal_error("Pipeline cannot be empty");
    63     } else {
    64         for (auto i = mPipeline.begin(); i != mPipeline.end(); ++i) {
    65             for (auto j = i; ++j != mPipeline.end(); ) {
    66                 if (LLVM_UNLIKELY(*i == *j)) {
    67                     report_fatal_error("Kernel instances cannot occur twice in the pipeline");
    68                 }
    69             }
    70         }
    71     }
    72     #endif
    73 
    7460    // note: instantiation of all kernels must occur prior to initialization
    7561    for (const auto & k : mPipeline) {
  • icGREP/icgrep-devel/icgrep/toolchain/cpudriver.cpp

    r5630 r5646  
    2020#include <kernels/kernel.h>
    2121#include <llvm/IR/Verifier.h>
     22
    2223#ifndef NDEBUG
    2324#define IN_DEBUG_MODE true
     
    99100
    100101void ParabixDriver::generatePipelineIR() {
    101 
    102     if (LLVM_UNLIKELY(mPipeline.empty())) {
    103         report_fatal_error("Pipeline cannot be empty");
    104     } else {
    105         for (auto i = mPipeline.begin(); i != mPipeline.end(); ++i) {
    106             for (auto j = i; ++j != mPipeline.end(); ) {
    107                 if (LLVM_UNLIKELY(*i == *j)) {
    108                     report_fatal_error("Kernel " + (*i)->getName() + " occurs twice in the pipeline");
    109                 }
    110             }
    111         }
    112     }
    113102
    114103    for (Kernel * const kernel : mUncachedKernel) {
  • icGREP/icgrep-devel/icgrep/toolchain/driver.cpp

    r5620 r5646  
    2929}
    3030
    31 kernel::Kernel * Driver::addKernelInstance(std::unique_ptr<kernel::Kernel> kb) {
     31kernel::Kernel * Driver::addKernelInstance(std::unique_ptr<Kernel> kb) {
    3232    mOwnedKernels.emplace_back(std::move(kb));
    3333    return mOwnedKernels.back().get();
     
    3535
    3636void Driver::deallocateBuffers() {
    37     for (auto &b : mOwnedBuffers) {
     37    for (const auto & b : mOwnedBuffers) {
    3838        b->releaseBuffer(iBuilder);
    3939    }
  • icGREP/icgrep-devel/icgrep/toolchain/object_cache.cpp

    r5630 r5646  
    8484            Module * const m = f->second.first; assert (m);
    8585            kernel->setModule(m);
     86            kernel->prepareCachedKernel(idb);
    8687            return true;
    8788        }
Note: See TracChangeset for help on using the changeset viewer.