Ignore:
Timestamp:
Apr 25, 2017, 2:33:31 PM (2 years ago)
Author:
nmedfort
Message:

Changes towards separate compilation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/editd/editd.cpp

    r5418 r5425  
    88#include <iostream>
    99#include <fstream>
    10 #include <kernels/toolchain.h>
     10#include <toolchain/toolchain.h>
    1111#include <pablo/pablo_toolchain.h>
    1212#include <llvm/IR/Function.h>
     
    2525#include <kernels/s2p_kernel.h>
    2626#include <editd/editdscan_kernel.h>
    27 #include <kernels/pipeline.h>
    2827#include <editd/pattern_compiler.h>
    2928#include <sys/stat.h>
     
    324323
    325324preprocessFunctionType preprocessCodeGen() {                           
    326     LLVMContext TheContext;
    327     Module * M = new Module("preprocess", TheContext);
    328     IDISA::IDISA_Builder * idb = IDISA::GetIDISA_Builder(M);
    329     ParabixDriver pxDriver(idb);
     325    ParabixDriver pxDriver("preprocess");
    330326    preprocessPipeline(pxDriver);
    331     auto f = reinterpret_cast<preprocessFunctionType>(pxDriver.getPointerToMain());
    332     delete idb;
    333     return f;
     327    return reinterpret_cast<preprocessFunctionType>(pxDriver.getPointerToMain());
    334328}
    335329
     
    337331
    338332editdFunctionType editdCodeGen(const std::vector<std::string> & patterns) {                           
    339     LLVMContext TheContext;
    340     Module * M = new Module("editd", TheContext);
    341     IDISA::IDISA_Builder * const idb = IDISA::GetIDISA_Builder(M);
    342     ParabixDriver pxDriver(idb);
     333    ParabixDriver pxDriver("editd");
    343334    editdPipeline(pxDriver, patterns);
    344     auto f = reinterpret_cast<editdFunctionType>(pxDriver.getPointerToMain());
    345     delete idb;
    346     return f;
     335    return reinterpret_cast<editdFunctionType>(pxDriver.getPointerToMain());
    347336}
    348337
     
    357346    return st.st_size;
    358347}
    359 
    360348
    361349char * preprocess(preprocessFunctionType fn_ptr) {
Note: See TracChangeset for help on using the changeset viewer.