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

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

Pablo Compiler now generates phi nodes created for carry variables. zStarHeight showed 33% improvement. Had to manually merge in last check-in's changes.

File size: 900 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
7namespace pablo {
8
9class Assign;
10
11class Next : public PabloAST {
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 {
21        return mInitial;
22    }
23    inline const String * getName() const {
24        return mInitial->getName();
25    }
26    inline PabloAST * getExpr() const {
27        return mExpr;
28    }
29protected:
30    Next(const PabloAST * initial, PabloAST * expr)
31    : PabloAST(ClassTypeId::Next)
32    , mInitial(cast<Assign>(initial))
33    , mExpr(expr)
34    {
35
36    }
37private:
38    const Assign * const      mInitial;
39    PabloAST * const          mExpr;
40};
41
42}
43
44
45#endif // PE_NEXT_H
Note: See TracBrowser for help on using the repository browser.