source: icGREP/icgrep-devel/icgrep/pablo/pe_sel.h @ 4578

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

Preliminary steps for removal of superfluous Assigns.

File size: 1.0 KB
RevLine 
[3850]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_SEL_H
8#define PE_SEL_H
9
[4244]10#include <pablo/pabloAST.h>
[3850]11
[4199]12namespace pablo {
13
[4410]14class Sel : public Statement {
[4227]15    friend class PabloBlock;
[3850]16public:
[4244]17    static inline bool classof(const PabloAST * e) {
[4200]18        return e->getClassTypeId() == ClassTypeId::Sel;
[4199]19    }
[4200]20    static inline bool classof(const void *) {
21        return false;
22    }
[4199]23    virtual ~Sel() {
24    }
[4244]25    inline PabloAST * getCondition() const {
[4432]26        return getOperand(0);
[4199]27    }
[4244]28    inline PabloAST * getTrueExpr() const {
[4432]29        return getOperand(1);
[4199]30    }
[4244]31    inline PabloAST * getFalseExpr() const {
[4432]32        return getOperand(2);
[4199]33    }
[4200]34protected:
[4438]35    Sel(PabloAST* if_expr, PabloAST* t_expr, PabloAST* f_expr, String * name, PabloBlock * parent)
36    : Statement(ClassTypeId::Sel, {if_expr, t_expr, f_expr}, name, parent)
37    {
38
39    }
[3850]40};
41
[4199]42}
43
[3850]44#endif // PE_SEL_H
45
Note: See TracBrowser for help on using the repository browser.