source: icGREP/icgrep-devel/icgrep/pablo/pe_call.h @ 5239

Last change on this file since 5239 was 5230, checked in by nmedfort, 3 years ago

Multi-threading support for PabloAST / PabloCompiler?. Requires unique LLVM Context / Module for each thread.

File size: 790 bytes
Line 
1#ifndef PE_CALL_H
2#define PE_CALL_H
3
4#include <pablo/pabloAST.h>
5#include <pablo/prototype.h>
6
7namespace pablo {
8
9class Call : public Statement {
10    friend class PabloBlock;
11public:
12    static inline bool classof(const PabloAST * e) {
13        return e->getClassTypeId() == ClassTypeId::Call;
14    }
15    static inline bool classof(const void *) {
16        return false;
17    }
18    virtual ~Call() { }
19
20    inline const Prototype * getPrototype() const {
21        return cast<Prototype>(getOperand(0));
22    }
23    inline const String * getCallee() const {
24        return getPrototype()->getName();
25    }
26protected:
27    Call(PabloAST * prototype, Allocator & allocator)
28    : Statement(ClassTypeId::Call, nullptr, {prototype}, prototype->getName(), allocator) {
29
30    }
31};
32}
33
34#endif // PE_CALL_H
35
36
Note: See TracBrowser for help on using the repository browser.