Ignore:
Timestamp:
Apr 18, 2017, 12:51:26 PM (2 years ago)
Author:
nmedfort
Message:

Potential bug fix for 32-bit. Modified MRemap to check for Linux OS support. Added MMapAdvise to CBuilder.

File:
1 edited

Legend:

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

    r5409 r5411  
    1616#ifndef NDEBUG
    1717#include <llvm/IR/Verifier.h>
     18#include <boost/container/flat_set.hpp>
    1819#endif
    1920#include <llvm/PassRegistry.h>                     // for PassRegistry
     
    3132#include <IR_Gen/llvm2ptx.h>
    3233#endif
    33  
    34 
    3534
    3635using namespace llvm;
     
    233232
    234233void ParabixDriver::generatePipelineIR() {
     234    #ifndef NDEBUG
     235    if (LLVM_UNLIKELY(mKernelList.empty())) {
     236        report_fatal_error("Pipeline must contain at least one kernel");
     237    } else {
     238        boost::container::flat_set<kernel::KernelBuilder *> K(mKernelList.begin(), mKernelList.end());
     239        if (LLVM_UNLIKELY(K.size() != mKernelList.size())) {
     240            report_fatal_error("Kernel definitions can only occur once in the pipeline");
     241        }
     242    }
     243    #endif
    235244    // note: instantiation of all kernels must occur prior to initialization
    236245    for (const auto & k : mKernelList) {
     
    250259        codegen::ThreadNum = 1;
    251260        generatePipelineLoop(iBuilder, mKernelList);
     261    }
     262    for (const auto & k : mKernelList) {
     263        k->terminateInstance();
    252264    }
    253265}
Note: See TracChangeset for help on using the changeset viewer.