source: icGREP/icgrep-devel/icgrep/pablo/pe_advance.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: 1.0 KB
Line 
1/*
2 *  Copyright (c) 2014 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef PE_ADVANCE_H
8#define PE_ADVANCE_H
9
10#include "pabloAST.h"
11#include <pablo/symbol_generator.h>
12
13namespace pablo {
14
15class Advance : public Statement {
16    friend class PabloBlock;
17public:
18    static inline bool classof(const PabloAST * e) {
19        return e->getClassTypeId() == ClassTypeId::Advance;
20    }
21    static inline bool classof(const void *) {
22        return false;
23    }
24    virtual ~Advance() {
25    }
26    inline PabloAST * getExpr() const {
27        return mOperand[0];
28    }
29    inline int getAdvanceAmount() const {
30        return mShiftAmount;
31    }
32protected:
33    Advance(PabloAST * expr, int shiftAmount, SymbolGenerator * sg, PabloBlock * parent)
34    : Statement(ClassTypeId::Advance, {expr}, sg->make("advance"), parent)
35        , mShiftAmount(shiftAmount) {
36
37    }
38private:
39        int const mShiftAmount;
40};
41
42}
43
44#endif // PE_ADVANCE_H
45
46
47
Note: See TracBrowser for help on using the repository browser.