Ignore:
Timestamp:
Jan 13, 2018, 11:57:43 AM (16 months ago)
Author:
nmedfort
Message:

Pablo support for byte comparisions; LineFeed? kernel processes byte streams directly. Some clean up of PabloBuilder? functionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/codegenstate.h

    r5709 r5828  
    2828namespace pablo { class InFile; }
    2929namespace pablo { class LessThan; }
     30namespace pablo { class Equals; }
    3031namespace pablo { class Lookahead; }
    3132namespace pablo { class MatchStar; }
     
    3435namespace pablo { class Or; }
    3536namespace pablo { class PabloKernel; }
    36 namespace pablo { class Phi; }
     37namespace pablo { class PackH; }
     38namespace pablo { class PackL; }
    3739namespace pablo { class ScanThru; }
    3840namespace pablo { class ScanTo; }
    3941namespace pablo { class Sel; }
     42namespace pablo { class Repeat; }
    4043namespace pablo { class String; }
    4144namespace pablo { class Subtract; }
     
    6871    static PabloBlock * Create(PabloKernel * const parent) noexcept;
    6972
    70     Advance * createAdvance(PabloAST * expr, PabloAST * shiftAmount) {
     73    Advance * createAdvance(PabloAST * expr, Integer * shiftAmount) {
    7174        return createAdvance(expr, shiftAmount, nullptr);
    7275    }
    7376   
    74     Advance * createAdvance(PabloAST * expr, PabloAST * shiftAmount, const llvm::StringRef & prefix) {
     77    Advance * createAdvance(PabloAST * expr, Integer * shiftAmount, const llvm::StringRef & prefix) {
    7578        return createAdvance(expr, shiftAmount, makeName(prefix));
    7679    }
    7780   
    78     Advance * createAdvance(PabloAST * expr, PabloAST * shiftAmount, String * name);
    79    
    80     IndexedAdvance * createIndexedAdvance(PabloAST * expr, PabloAST * indexStream, PabloAST * shiftAmount) {
     81    Advance * createAdvance(PabloAST * expr, Integer * shiftAmount, String * name);
     82   
     83    IndexedAdvance * createIndexedAdvance(PabloAST * expr, PabloAST * indexStream, Integer * shiftAmount) {
    8184        return createIndexedAdvance(expr, indexStream, shiftAmount, nullptr);
    8285    }
    8386   
    84     IndexedAdvance * createIndexedAdvance(PabloAST * expr, PabloAST * indexStream, PabloAST * shiftAmount, const llvm::StringRef & prefix) {
     87    IndexedAdvance * createIndexedAdvance(PabloAST * expr, PabloAST * indexStream, Integer * shiftAmount, const llvm::StringRef & prefix) {
    8588        return createIndexedAdvance(expr, indexStream, shiftAmount, makeName(prefix));
    8689    }
    8790   
    88     IndexedAdvance * createIndexedAdvance(PabloAST * expr, PabloAST * indexStream, PabloAST * shiftAmount, String * name);
    89    
    90     Lookahead * createLookahead(PabloAST * expr, PabloAST * shiftAmount) {
     91    IndexedAdvance * createIndexedAdvance(PabloAST * expr, PabloAST * indexStream, Integer * shiftAmount, String * name);
     92   
     93    Lookahead * createLookahead(PabloAST * expr, Integer * shiftAmount) {
    9194        return createLookahead(expr, shiftAmount, nullptr);
    9295    }
    9396
    94     Lookahead * createLookahead(PabloAST * expr, PabloAST * shiftAmount, const llvm::StringRef & prefix) {
     97    Lookahead * createLookahead(PabloAST * expr, Integer * shiftAmount, const llvm::StringRef & prefix) {
    9598        return createLookahead(expr, shiftAmount, makeName(prefix));
    9699    }
    97100
    98     Lookahead * createLookahead(PabloAST * expr, PabloAST * shiftAmount, String * name);
     101    Lookahead * createLookahead(PabloAST * expr, Integer * shiftAmount, String * name);
    99102
    100103    inline Zeroes * createZeroes(llvm::Type * const type = nullptr) {
     
    148151    AtEOF * createAtEOF(PabloAST * expr, String * name);
    149152
    150     inline Extract * createExtract(PabloAST * array, PabloAST * index) {
    151         return createExtract(array, index, nullptr);
    152     }
    153 
    154     Extract * createExtract(PabloAST * array, PabloAST * index, const llvm::StringRef & prefix) {
    155         return createExtract(array, index, makeName(prefix));
    156     }
    157 
    158     Extract * createExtract(PabloAST * array, const int64_t index) {
    159         return createExtract(array, getInteger(index), nullptr);
    160     }
    161 
    162     Extract * createExtract(PabloAST * array, const int64_t index, const llvm::StringRef & prefix) {
    163         return createExtract(array, getInteger(index), makeName(prefix));
    164     }
    165 
    166     Extract * createExtract(PabloAST * array, PabloAST * index, String * name);
     153    Extract * createExtract(Var * array, Integer * index);
    167154
    168155    Assign * createAssign(PabloAST * const var, PabloAST * const value);
     
    232219    LessThan * createLessThan(PabloAST * expr1, PabloAST * expr2);
    233220
     221    Equals * createEquals(PabloAST * expr1, PabloAST * expr2);
     222
    234223    MatchStar * createMatchStar(PabloAST * marker, PabloAST * charclass) {
    235224        return createMatchStar(marker, charclass, nullptr);
     
    286275    While * createWhile(PabloAST * condition, PabloBlock * body);
    287276
    288     Phi * createPhi(llvm::Type * type);
     277    Repeat * createRepeat(Integer * fieldWidth, PabloAST * value) {
     278        return createRepeat(fieldWidth, value, nullptr);
     279    }
     280
     281    Repeat * createRepeat(Integer * fieldWidth, PabloAST * value, const llvm::StringRef & prefix) {
     282        return createRepeat(fieldWidth, value, makeName(prefix));
     283    }
     284
     285    Repeat * createRepeat(Integer * fieldWidth, PabloAST * value, String * name);
     286
     287    PackH * createPackH(Integer * fieldWidth, PabloAST * value) {
     288        return createPackH(fieldWidth, value, nullptr);
     289    }
     290
     291    PackH * createPackH(Integer * width, PabloAST * value, const llvm::StringRef & prefix) {
     292        return createPackH(width, value, makeName(prefix));
     293    }
     294
     295    PackH * createPackH(Integer * fieldWidth, PabloAST * value, String * name);
     296
     297    PackL * createPackL(Integer * fieldWidth, PabloAST * value) {
     298        return createPackL(fieldWidth, value, nullptr);
     299    }
     300
     301    PackL * createPackL(Integer * fieldWidth, PabloAST * value, const llvm::StringRef & prefix) {
     302        return createPackL(fieldWidth, value, makeName(prefix));
     303    }
     304
     305    PackL * createPackL(Integer * fieldWidth, PabloAST * value, String * name);
    289306
    290307    PabloBlock * getPredecessor() const;
     
    312329    inline Integer * getInteger(const int64_t value) const {
    313330        return mParent->getInteger(value);
     331    }
     332
     333    llvm::LLVMContext & getContext() const {
     334        return mParent->getContext();
    314335    }
    315336
Note: See TracChangeset for help on using the changeset viewer.