source: icGREP/icgrep-devel/icgrep/pablo/pe_or.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: 966 bytes
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_OR_H
8#define PE_OR_H
9
10#include <pablo/pabloAST.h>
11#include <array>
12
13namespace pablo {
14
15class PabloBlock;
16
17class Or : public Statement {
18    friend struct OptimizeOr;
19    friend class PabloBlock;
20public:
21    static inline bool classof(const PabloAST * e) {
22        return e->getClassTypeId() == ClassTypeId::Or;
23    }
24    static inline bool classof(const void *) {
25        return false;
26    }
27    virtual ~Or() {
28    }
29    PabloAST * getExpr1() const {
30        return mOperand[0];
31    }
32    PabloAST * getExpr2() const {
33        return mOperand[1];
34    }
35protected:
36    Or(PabloAST * expr1, PabloAST * expr2, PabloBlock * parent);
37};
38
39struct OptimizeOr {
40    PabloAST * operator()(PabloAST * expr1, PabloAST * expr2, PabloBlock * pb);
41};
42
43}
44
45#endif // PE_OR_H
46
47
48
Note: See TracBrowser for help on using the repository browser.