Use LLVM to JIT the code for one of the drawer functions
This commit is contained in:
parent
5ef46d1730
commit
3dd8b593b6
52 changed files with 4705 additions and 0 deletions
30
src/r_compiler/ssa/ssa_function.h
Normal file
30
src/r_compiler/ssa/ssa_function.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace llvm { class Value; }
|
||||
namespace llvm { class Type; }
|
||||
namespace llvm { class Function; }
|
||||
|
||||
class SSAInt;
|
||||
class SSAValue;
|
||||
|
||||
class SSAFunction
|
||||
{
|
||||
public:
|
||||
SSAFunction(const std::string name);
|
||||
void set_return_type(llvm::Type *type);
|
||||
void add_parameter(llvm::Type *type);
|
||||
void create_public();
|
||||
void create_private();
|
||||
SSAValue parameter(int index);
|
||||
|
||||
llvm::Function *func;
|
||||
|
||||
private:
|
||||
std::string name;
|
||||
llvm::Type *return_type;
|
||||
std::vector<llvm::Type *> parameters;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue