source: icGREP/icgrep-devel/icgrep/pablo/pe_repeat.h @ 5829

Last change on this file since 5829 was 5829, checked in by nmedfort, 16 months ago

Missing files

File size: 810 bytes
Line 
1#ifndef PE_REPEAT_H
2#define PE_REPEAT_H
3
4#include <pablo/pabloAST.h>
5
6namespace pablo {
7
8class Integer;
9
10class Repeat final : public Statement {
11    friend class PabloBlock;
12public:
13    static bool classof(const PabloAST * e) {
14        return e->getClassTypeId() == ClassTypeId::Fill;
15    }
16    static bool classof(const void *) {
17        return false;
18    }
19    virtual ~Repeat() {
20    }
21    Integer * getFieldWidth() const {
22        return llvm::cast<Integer>(getOperand(0));
23    }
24    PabloAST * getValue() const {
25        return getOperand(1);
26    }
27protected:
28    Repeat(Integer * const fieldWidth, PabloAST * const value, llvm::Type * type, const String * name, Allocator & allocator)
29    : Statement(ClassTypeId::Fill, type, { fieldWidth, value }, name, allocator) {
30
31    }
32};
33
34}
35
36#endif // PE_REPEAT_H
Note: See TracBrowser for help on using the repository browser.