D dynamic compilation support

This commit is contained in:
Ivan 2016-12-03 21:14:42 +03:00
parent 1c2271d00d
commit 42f283c221
41 changed files with 2058 additions and 9 deletions

View file

@ -0,0 +1,32 @@
#ifndef OPTIMIZER_HPP
#define OPTIMIZER_HPP
#include <memory>
namespace llvm {
namespace legacy {
class PassManager;
class FunctionPassManager;
}
class TargetMachine;
class Module;
}
struct Context;
struct OptimizerSettings final {
unsigned optLevel = 0;
unsigned sizeLeve = 0;
};
void optimizeModule(const Context &context,
llvm::TargetMachine &targetMachine,
const OptimizerSettings &settings,
llvm::Module &module);
void setRtCompileVar(const Context &context,
llvm::Module& module,
const char* name,
const void* init);
#endif // OPTIMIZER_HPP