Ignore:
Timestamp:
Aug 7, 2015, 10:04:46 AM (4 years ago)
Author:
cameron
Message:

Mod64Advance, Mod64MatchStar, Mod64ScanThru ops; -mod64-approximate command-line option

File:
1 edited

Legend:

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

    r4716 r4717  
    3737        return localAdvanceIndex;
    3838    }
    39     inline void setMod64() {
    40         isMod64approx = true;
    41     }
    42     inline bool isMod64() const {
    43         return isMod64approx;
    44     }
    4539protected:
    4640    Advance(PabloAST * expr, PabloAST * shiftAmount, String * name)
    4741    : Statement(ClassTypeId::Advance, {expr, shiftAmount}, name)
    48    , isMod64approx(false)
    4942    {
    5043        assert(isa<Integer>(shiftAmount));
    5144    }
    5245private:
    53     bool isMod64approx;
    5446    unsigned localAdvanceIndex;
    5547};
    56    
     48
     49class Mod64Advance : public Statement {
     50    friend class PabloBlock;
     51public:
     52    static inline bool classof(const PabloAST * e) {
     53        return e->getClassTypeId() == ClassTypeId::Mod64Advance;
     54    }
     55    static inline bool classof(const void *) {
     56        return false;
     57    }
     58    virtual ~Mod64Advance() {
     59    }
     60    inline PabloAST * getExpr() const {
     61        return getOperand(0);
     62    }
     63    inline Integer::Type getAdvanceAmount() const {
     64        return cast<Integer>(getOperand(1))->value();
     65    }
     66protected:
     67    Mod64Advance(PabloAST * expr, PabloAST * shiftAmount, String * name)
     68    : Statement(ClassTypeId::Mod64Advance, {expr, shiftAmount}, name)
     69    {
     70        assert(isa<Integer>(shiftAmount));
     71    }
     72};
     73
    5774}
    5875
Note: See TracChangeset for help on using the changeset viewer.