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

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

Minor changes towards maintaining UseDef? information.

File size: 846 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>(mOperand[0]);
24    }
25    inline PabloAST * getExpr() const {
26        return mOperand[1];
27    }
28protected:
29    Next(PabloAST * initial, PabloAST * expr, PabloBlock * parent)
30    : Statement(ClassTypeId::Next, {{cast<Assign>(initial), expr}}, cast<Assign>(initial)->getName(), parent)
31    {
32
33    }
34};
35
36}
37
38
39#endif // PE_NEXT_H
Note: See TracBrowser for help on using the repository browser.