Ignore:
Timestamp:
Dec 26, 2015, 12:09:11 PM (3 years ago)
Author:
cameron
Message:

Dynamic generation of s2p code

File:
1 edited

Legend:

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

    r4860 r4900  
    533533    pablo::PabloFunction * const nameSearchFunction = re2pablo_compiler(encoding, embedded);
    534534    pablo_function_passes(nameSearchFunction);
    535     pablo::PabloCompiler pablo_compiler(VectorType::get(IntegerType::get(getGlobalContext(), 64), BLOCK_SIZE/64));
     535   
     536    Module * M = new Module("NamePattern", getGlobalContext());
     537    IDISA::IDISA_Builder * idb = GetNativeIDISA_Builder(M, VectorType::get(IntegerType::get(getGlobalContext(), 64), BLOCK_SIZE/64));
     538    pablo::PabloCompiler pablo_compiler(M, idb);
    536539    llvm::Function * const nameSearchIR = pablo_compiler.compile(nameSearchFunction); // <- may throw error if parsing exception occurs.
    537540
    538     llvm::ExecutionEngine * engine = JIT_to_ExecutionEngine(nameSearchIR);   
    539     icgrep_Linking(nameSearchIR->getParent(), engine);
     541    llvm::ExecutionEngine * engine = JIT_to_ExecutionEngine(M);   
     542    icgrep_Linking(M, engine);
    540543   
    541544    // Ensure everything is ready to go.
Note: See TracChangeset for help on using the changeset viewer.