mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 17:43:35 +03:00
D dynamic compilation support
This commit is contained in:
parent
1c2271d00d
commit
42f283c221
41 changed files with 2058 additions and 9 deletions
32
runtime/jit-rt/cpp-so/optimizer.h
Normal file
32
runtime/jit-rt/cpp-so/optimizer.h
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue