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

Last change on this file since 5464 was 5464, checked in by nmedfort, 2 years ago

Restructuring work for the Driver classes. Start of work to eliminate the memory leaks with the ExecutionEngine?. Replaced custom AlignedMalloc? with backend call to std::aligned_malloc. Salvaged some work on DistributionPass? for reevaluation.

File size: 985 bytes
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 linkAndFinalize();
22
23    void * getPointerToMain();
24
25private:
26
27    llvm::Function * addLinkFunction(llvm::Module * mod, llvm::StringRef name, llvm::FunctionType * type, void * functionPtr) const override;
28
29private:
30    llvm::TargetMachine *                                   mTarget;
31    llvm::ExecutionEngine *                                 mEngine;
32    ParabixObjectCache *                                    mCache;
33};
34
35#endif // CPUDRIVER_H
Note: See TracBrowser for help on using the repository browser.