Ignore:
Timestamp:
Feb 29, 2016, 3:46:35 PM (4 years ago)
Author:
cameron
Message:

Refactor and encapsulate grep codegen/execution in GrepEngine?

File:
1 moved

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/grep_engine.h

    r4945 r4946  
    99#include <string>
    1010#include <stdint.h>
    11 #include <re/re_cc.h>
     11#include <re/re_re.h>
     12#include <llvm/ExecutionEngine/ExecutionEngine.h>
    1213
    1314
     
    1617namespace llvm { class raw_ostream; }
    1718
    18 class GrepExecutor {
     19class GrepEngine {
    1920public:
    2021
    21     GrepExecutor(void * main_fnptr)
    22     : mMainFcn(reinterpret_cast<main_fcn_T>(main_fnptr)) {
    23        
     22    GrepEngine() {};
     23 
     24    void grepCodeGen(std::string moduleName, re::RE * re_ast, bool isNameExpression = false);
     25   
     26    void doGrep(const std::string & fileName);
     27   
     28    re::CC *  grepCodepoints(const std::string & UNameFile);
     29
     30    ~GrepEngine() {
     31      delete mEngine;
    2432    }
    25  
    26     void doGrep(const std::string & fileName);
     33   
    2734private:
    2835   
     
    3441    size_t mFileSize;
    3542    char * mFileBuffer;
     43    llvm::ExecutionEngine * mEngine;
    3644};
    3745
Note: See TracChangeset for help on using the changeset viewer.