source: icGREP/icgrep-devel/icgrep/pablo/pe_next.h @ 4532

Last change on this file since 4532 was 4432, checked in by nmedfort, 5 years ago

Temporary check in.

File size: 898 bytes
Line 
1#ifndef PE_NEXT_H
2#define PE_NEXT_H
3
4#include <pablo/pabloAST.h>
5#include <pablo/ps_assign.h>
6#include <pablo/symbol_generator.h>
7#include <array>
8
9namespace pablo {
10
11class Assign;
12
13class Next : public Statement {
14    friend class PabloBlock;
15public:
16    static inline bool classof(const PabloAST * e) {
17        return e->getClassTypeId() == ClassTypeId::Next;
18    }
19    static inline bool classof(const void *) {
20        return false;
21    }
22    inline const Assign * getInitial() const {
23        return cast<const Assign>(getOperand(0));
24    }
25    inline PabloAST * getExpr() const {
26        return getOperand(1);
27    }
28    virtual ~Next() {}
29protected:
30    Next(PabloAST * initial, PabloAST * expr, PabloBlock * parent)
31    : Statement(ClassTypeId::Next, {cast<Assign>(initial), expr}, cast<Assign>(initial)->getName(), parent) {
32        this->addUser(initial);
33    }
34};
35
36}
37
38
39#endif // PE_NEXT_H
Note: See TracBrowser for help on using the repository browser.