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

Last change on this file since 4695 was 4650, checked in by nmedfort, 4 years ago

Partial roll back of Trie structure. Seemed to introduce the potential of generating a cycle in the AST. More analysis is needed here before mixing together multiple Advance DAG traversals.

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