source: icGREP/icgrep-devel/icgrep/toolchain/cpudriver.h @ 5493

Last change on this file since 5493 was 5493, checked in by cameron, 2 years ago

Restore check-ins from the last several days

File size: 1.1 KB
Line 
1#ifndef CPUDRIVER_H
2#define CPUDRIVER_H
3#include "driver.h"
4
5namespace llvm { class ExecutionEngine; }
6namespace llvm { class TargetMachine; }
7
8class ParabixObjectCache;
9
10class ParabixDriver final : public Driver {
11    friend class CBuilder;
12public:
13    ParabixDriver(std::string && moduleName);
14
15    ~ParabixDriver();
16
17    void generatePipelineIR() override;
18
19    void makeKernelCall(kernel::Kernel * kb, const std::vector<parabix::StreamSetBuffer *> & inputs, const std::vector<parabix::StreamSetBuffer *> & outputs) override;
20
21    void finalizeObject() override;
22
23    bool hasExternalFunction(const llvm::StringRef functionName) const override;
24
25    void * getMain() override; // "main" exists until the driver is deleted
26
27private:
28
29    llvm::Function * addLinkFunction(llvm::Module * mod, llvm::StringRef name, llvm::FunctionType * type, void * functionPtr) const override;
30
31private:
32    llvm::TargetMachine *                                   mTarget;
33    llvm::ExecutionEngine *                                 mEngine;
34    ParabixObjectCache *                                    mCache;
35};
36
37#endif // CPUDRIVER_H
Note: See TracBrowser for help on using the repository browser.