source: icGREP/icgrep-devel/icgrep/pablo/ps_assign.h @ 5782

Last change on this file since 5782 was 5454, checked in by nmedfort, 2 years ago

Bug fix check in for DumpTrace?, compilation of DoBlock? / DoFinalBlock? functions. Pablo CodeMotionPass? optimized and enabled by default.

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 PS_SETMARKER_H
8#define PS_SETMARKER_H
9
10#include <pablo/pe_string.h>
11
12namespace pablo {
13
14class Assign final : public Statement {
15    friend class PabloBlock;
16public:
17    static inline bool classof(const PabloAST * e) {
18        return e->getClassTypeId() == ClassTypeId::Assign;
19    }
20    static inline bool classof(const void *) {
21        return false;
22    }
23    virtual ~Assign() {
24    }
25    inline PabloAST * getVariable() const {
26        return getOperand(0);
27    }
28    inline PabloAST * getValue() const {
29        return getOperand(1);
30    }
31    inline void setValue(PabloAST * value) {
32        return setOperand(1, value);
33    }
34protected:
35    explicit Assign(PabloAST * variable, PabloAST * expr, Allocator & allocator)
36    : Statement(ClassTypeId::Assign, nullptr, {variable, expr}, nullptr, allocator) {
37
38    }
39};
40
41}
42
43#endif // PS_SETMARKER_H
44
Note: See TracBrowser for help on using the repository browser.