Ignore:
Timestamp:
Oct 5, 2014, 5:27:31 PM (5 years ago)
Author:
nmedfort
Message:

Partial implementation of 'PabloBuilder?'.

File:
1 edited

Legend:

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

    r4209 r4214  
    88#define PE_NOT_H
    99
    10 #include "pe_pabloe.h"
     10#include <pablo/pe_pabloe.h>
    1111
    1212namespace pablo {
    1313
     14struct CodeGenState;
     15
    1416class Not : public PabloE {
    15     friend PabloE * makeNot(PabloE *);
     17    friend struct OptimizeNot;
     18    friend struct CodeGenState;
    1619public:
    1720    static inline bool classof(const PabloE * e) {
     
    2124        return false;
    2225    }
    23 
    24 
    25     ~Not() {
    26         delete mExpr;
     26    virtual ~Not() {
    2727    }
    2828    PabloE * getExpr() const {
     
    3838    PabloE * const mExpr;
    3939};
     40struct OptimizeNot {
     41    inline OptimizeNot(CodeGenState & cg) : cg(cg) {}
     42    PabloE * operator()(PabloE * expr);
     43private:
     44    CodeGenState & cg;
    4045
    41 PabloE * makeNot(PabloE * expr);
    42 
     46};
     47inline PabloE * makeNot(PabloE * expr, CodeGenState & cg) {
     48    OptimizeNot run(cg);
     49    return run(expr);
     50}
    4351}
    4452
Note: See TracChangeset for help on using the changeset viewer.