source: icGREP/icgrep-devel/icgrep/pablo/pe_count.h @ 6155

Last change on this file since 6155 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: 879 bytes
Line 
1/*
2 *  Copyright (c) 2015 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_COUNT_H
8#define PE_COUNT_H
9
10#include <pablo/pabloAST.h>
11
12namespace pablo {
13
14class Count final : public Statement {
15    friend class PabloBlock;
16public:
17    static inline bool classof(const PabloAST * e) {
18        return e->getClassTypeId() == ClassTypeId::Count;
19    }
20    static inline bool classof(const void *) {
21        return false;
22    }
23    virtual ~Count() {
24    }
25    inline PabloAST * getExpr() const {
26        return getOperand(0);
27    }
28protected:
29    explicit Count(PabloAST * expr, const String * name, llvm::Type * type, Allocator & allocator)
30    : Statement(ClassTypeId::Count, type, {expr}, name, allocator) {
31
32    }
33private:
34};
35
36}
37
38#endif // PE_COUNT_H
39
40
41
Note: See TracBrowser for help on using the repository browser.