source: icGREP/icgrep-devel/icgrep/pablo/pe_ones.h @ 4414

Last change on this file since 4414 was 4410, checked in by nmedfort, 5 years ago

Changes to support 3-operand form for all instructions. CSE disabled but partially redundant now.

File size: 1.1 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_ONES_H
8#define PE_ONES_H
9
10#include "pabloAST.h"
11#include <pablo/pe_var.h>
12
13namespace pablo {
14
15class Ones : public PabloAST {
16    friend class PabloBlock;
17public:
18    static inline bool classof(const PabloAST * e) {
19        return e->getClassTypeId() == ClassTypeId::Ones;
20    }
21    static inline bool classof(const void *) {
22        return false;
23    }
24    virtual ~Ones() {
25    }
26//    virtual PabloAST * getOperand(const unsigned) const {
27//        assert (false);
28//        return nullptr;
29//    }
30//    virtual unsigned getNumOperands() const {
31//        return 0;
32//    }
33//    virtual void setOperand(const unsigned, PabloAST *) {
34//        assert (false);
35//    }
36    inline bool operator==(const Ones & other) const {
37        return true;
38    }
39    virtual bool operator==(const PabloAST & other) const {
40        return isa<Ones>(other);
41    }
42protected:
43    Ones() : PabloAST(ClassTypeId::Ones) { }
44};
45
46}
47
48#endif // PE_ONES_H
49
50
Note: See TracBrowser for help on using the repository browser.