mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +03:00
Rename functions
This commit is contained in:
parent
5426ffbd3d
commit
c839e9dfd0
5 changed files with 18 additions and 18 deletions
|
@ -255,7 +255,7 @@ void CodeGenerator::writeAndFreeLLModule(const char *filename) {
|
||||||
ir_->replaceGlobals();
|
ir_->replaceGlobals();
|
||||||
|
|
||||||
ir_->DBuilder.Finalize();
|
ir_->DBuilder.Finalize();
|
||||||
generateBitcodeForRuntimeCompile(ir_);
|
generateBitcodeForDynamicCompile(ir_);
|
||||||
|
|
||||||
emitLLVMUsedArray(*ir_);
|
emitLLVMUsedArray(*ir_);
|
||||||
emitLinkerOptions(*ir_, ir_->module, ir_->context());
|
emitLinkerOptions(*ir_, ir_->module, ir_->context());
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//===-- runtimecompile.cpp ------------------------------------------------===//
|
//===-- dynamiccompile.cpp ------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// LDC – the LLVM D compiler
|
// LDC – the LLVM D compiler
|
||||||
//
|
//
|
||||||
|
@ -727,7 +727,7 @@ void createThunkFunc(llvm::Module &module, const llvm::Function *src,
|
||||||
|
|
||||||
} // anon namespace
|
} // anon namespace
|
||||||
|
|
||||||
void generateBitcodeForRuntimeCompile(IRState *irs) {
|
void generateBitcodeForDynamicCompile(IRState *irs) {
|
||||||
assert(nullptr != irs);
|
assert(nullptr != irs);
|
||||||
if (irs->dynamicCompiledFunctions.empty()) {
|
if (irs->dynamicCompiledFunctions.empty()) {
|
||||||
return;
|
return;
|
||||||
|
@ -751,7 +751,7 @@ void generateBitcodeForRuntimeCompile(IRState *irs) {
|
||||||
setupModuleBitcodeData(*newModule, irs, filter);
|
setupModuleBitcodeData(*newModule, irs, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void declareRuntimeCompiledFunction(IRState *irs, IrFunction *func) {
|
void declareDynamicCompiledFunction(IRState *irs, IrFunction *func) {
|
||||||
assert(nullptr != irs);
|
assert(nullptr != irs);
|
||||||
assert(nullptr != func);
|
assert(nullptr != func);
|
||||||
assert(nullptr != func->getLLVMFunc());
|
assert(nullptr != func->getLLVMFunc());
|
||||||
|
@ -766,7 +766,7 @@ void declareRuntimeCompiledFunction(IRState *irs, IrFunction *func) {
|
||||||
std::make_pair(srcFunc, IRState::RtCompiledFuncDesc{nullptr, thunkFunc}));
|
std::make_pair(srcFunc, IRState::RtCompiledFuncDesc{nullptr, thunkFunc}));
|
||||||
}
|
}
|
||||||
|
|
||||||
void defineRuntimeCompiledFunction(IRState *irs, IrFunction *func) {
|
void defineDynamicCompiledFunction(IRState *irs, IrFunction *func) {
|
||||||
assert(nullptr != irs);
|
assert(nullptr != irs);
|
||||||
assert(nullptr != func);
|
assert(nullptr != func);
|
||||||
assert(nullptr != func->getLLVMFunc());
|
assert(nullptr != func->getLLVMFunc());
|
||||||
|
@ -787,7 +787,7 @@ void defineRuntimeCompiledFunction(IRState *irs, IrFunction *func) {
|
||||||
it->second.thunkVar = thunkVar;
|
it->second.thunkVar = thunkVar;
|
||||||
}
|
}
|
||||||
|
|
||||||
void addRuntimeCompiledVar(IRState *irs, IrGlobal *var) {
|
void addDynamicCompiledVar(IRState *irs, IrGlobal *var) {
|
||||||
assert(nullptr != irs);
|
assert(nullptr != irs);
|
||||||
assert(nullptr != var);
|
assert(nullptr != var);
|
||||||
assert(nullptr != var->value);
|
assert(nullptr != var->value);
|
||||||
|
@ -807,19 +807,19 @@ void addRuntimeCompiledVar(IRState *irs, IrGlobal *var) {
|
||||||
|
|
||||||
#else // defined(LDC_DYNAMIC_COMPILE)
|
#else // defined(LDC_DYNAMIC_COMPILE)
|
||||||
|
|
||||||
void generateBitcodeForRuntimeCompile(IRState *) {
|
void generateBitcodeForDynamicCompile(IRState *) {
|
||||||
// nothing
|
// nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
void declareRuntimeCompiledFunction(IRState *, IrFunction *) {
|
void declareDynamicCompiledFunction(IRState *, IrFunction *) {
|
||||||
// nothing
|
// nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
void defineRuntimeCompiledFunction(IRState *, IrFunction *) {
|
void defineDynamicCompiledFunction(IRState *, IrFunction *) {
|
||||||
// nothing
|
// nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
void addRuntimeCompiledVar(IRState *, IrGlobal *) {
|
void addDynamicCompiledVar(IRState *, IrGlobal *) {
|
||||||
// nothing
|
// nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// Jit routines.
|
// Dynamic compilation routines.
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -18,9 +18,9 @@ struct IRState;
|
||||||
struct IrFunction;
|
struct IrFunction;
|
||||||
struct IrGlobal;
|
struct IrGlobal;
|
||||||
|
|
||||||
void generateBitcodeForRuntimeCompile(IRState *irs);
|
void generateBitcodeForDynamicCompile(IRState *irs);
|
||||||
void declareRuntimeCompiledFunction(IRState *irs, IrFunction *func);
|
void declareDynamicCompiledFunction(IRState *irs, IrFunction *func);
|
||||||
void defineRuntimeCompiledFunction(IRState *irs, IrFunction *func);
|
void defineDynamicCompiledFunction(IRState *irs, IrFunction *func);
|
||||||
void addRuntimeCompiledVar(IRState *irs, IrGlobal *var);
|
void addDynamicCompiledVar(IRState *irs, IrGlobal *var);
|
||||||
|
|
||||||
#endif // LDC_GEN_DYNAMICCOMPILE_H
|
#endif // LDC_GEN_DYNAMICCOMPILE_H
|
||||||
|
|
|
@ -568,7 +568,7 @@ void DtoDeclareFunction(FuncDeclaration *fdecl) {
|
||||||
applyFuncDeclUDAs(fdecl, irFunc);
|
applyFuncDeclUDAs(fdecl, irFunc);
|
||||||
|
|
||||||
if(irFunc->dynamicCompile) {
|
if(irFunc->dynamicCompile) {
|
||||||
declareRuntimeCompiledFunction(gIR, irFunc);
|
declareDynamicCompiledFunction(gIR, irFunc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (irFunc->targetCpuOverridden ||
|
if (irFunc->targetCpuOverridden ||
|
||||||
|
@ -946,7 +946,7 @@ void DtoDefineFunction(FuncDeclaration *fd, bool linkageAvailableExternally) {
|
||||||
|
|
||||||
SCOPE_EXIT {
|
SCOPE_EXIT {
|
||||||
if (irFunc->dynamicCompile) {
|
if (irFunc->dynamicCompile) {
|
||||||
defineRuntimeCompiledFunction(gIR, irFunc);
|
defineDynamicCompiledFunction(gIR, irFunc);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -901,7 +901,7 @@ void DtoResolveVariable(VarDeclaration *vd) {
|
||||||
|
|
||||||
applyVarDeclUDAs(vd, gvar);
|
applyVarDeclUDAs(vd, gvar);
|
||||||
if (varIr->dynamicCompileConst) {
|
if (varIr->dynamicCompileConst) {
|
||||||
addRuntimeCompiledVar(gIR, varIr);
|
addDynamicCompiledVar(gIR, varIr);
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_LOG Logger::cout() << *gvar << '\n';
|
IF_LOG Logger::cout() << *gvar << '\n';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue