Ignore:
Timestamp:
Dec 30, 2015, 9:21:06 AM (3 years ago)
Author:
cameron
Message:

Refactoring progress towards layered kernels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/re/re_parser.cpp

    r4900 r4904  
    2222#include "utf_encoding.h"
    2323#include <llvm/IR/Type.h>
     24#include <IDISA/s2p_gen.h>
    2425#include <pablo/pablo_compiler.h>
    2526#include <do_grep.h>
     
    536537    Module * M = new Module("NamePattern", getGlobalContext());
    537538    IDISA::IDISA_Builder * idb = GetNativeIDISA_Builder(M, VectorType::get(IntegerType::get(getGlobalContext(), 64), BLOCK_SIZE/64));
     539    gen_s2p_function(M, idb);
     540
    538541    pablo::PabloCompiler pablo_compiler(M, idb);
     542
    539543    llvm::Function * const nameSearchIR = pablo_compiler.compile(nameSearchFunction); // <- may throw error if parsing exception occurs.
     544    llvm::Function * s2p_IR = M->getFunction("s2p_block");
    540545
    541546    llvm::ExecutionEngine * engine = JIT_to_ExecutionEngine(M);   
     
    545550    engine->finalizeObject();
    546551       
    547     void * icgrep_MCptr = engine->getPointerToFunction(nameSearchIR);   
     552    void * icgrep_MCptr = engine->getPointerToFunction(nameSearchIR);
     553    void * s2p_MCptr = engine->getPointerToFunction(s2p_IR);
     554
    548555    CC * codepoints = nullptr;
    549556    if (icgrep_MCptr) {
    550557        void * icgrep_init_carry_ptr = engine->getPointerToFunction(nameSearchIR->getParent()->getFunction("process_block_initialize_carries"));
    551         GrepExecutor grepEngine(icgrep_init_carry_ptr, icgrep_MCptr);
     558        GrepExecutor grepEngine(s2p_MCptr, icgrep_init_carry_ptr, icgrep_MCptr);
    552559        grepEngine.setParseCodepointsOption();
    553560        grepEngine.doGrep("../Uname.txt");
Note: See TracChangeset for help on using the changeset viewer.