mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 10:57:35 +03:00
Fix typo
This commit is contained in:
parent
82c841534c
commit
044dd7bc9d
5 changed files with 11 additions and 11 deletions
|
@ -571,9 +571,9 @@ void DtoDeclareFunction(FuncDeclaration *fdecl) {
|
||||||
declareRuntimeCompiledFunction(gIR, irFunc);
|
declareRuntimeCompiledFunction(gIR, irFunc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (irFunc->targetCpuOverriden ||
|
if (irFunc->targetCpuOverridden ||
|
||||||
irFunc->targetFeaturesOverriden) {
|
irFunc->targetFeaturesOverridden) {
|
||||||
gIR->targetCpuOrFeaturesOverriden.push_back(irFunc);
|
gIR->targetCpuOrFeaturesOverridden.push_back(irFunc);
|
||||||
}
|
}
|
||||||
|
|
||||||
// main
|
// main
|
||||||
|
|
|
@ -223,7 +223,7 @@ public:
|
||||||
void replaceGlobals();
|
void replaceGlobals();
|
||||||
|
|
||||||
// List of functions with cpu or features attributes overriden by user
|
// List of functions with cpu or features attributes overriden by user
|
||||||
std::vector<IrFunction *> targetCpuOrFeaturesOverriden;
|
std::vector<IrFunction *> targetCpuOrFeaturesOverridden;
|
||||||
|
|
||||||
struct RtCompiledFuncDesc {
|
struct RtCompiledFuncDesc {
|
||||||
llvm::GlobalVariable *thunkVar;
|
llvm::GlobalVariable *thunkVar;
|
||||||
|
|
|
@ -227,7 +227,7 @@ void removeFunctionsTargets(IRState *irs, llvm::Module &module) {
|
||||||
assert(nullptr != irs);
|
assert(nullptr != irs);
|
||||||
|
|
||||||
std::unordered_map<std::string, IrFunction *> funcMap;
|
std::unordered_map<std::string, IrFunction *> funcMap;
|
||||||
for (auto &&fun : irs->targetCpuOrFeaturesOverriden) {
|
for (auto &&fun : irs->targetCpuOrFeaturesOverridden) {
|
||||||
assert(nullptr != fun);
|
assert(nullptr != fun);
|
||||||
funcMap.insert({fun->getLLVMFunc()->getName(), fun});
|
funcMap.insert({fun->getLLVMFunc()->getName(), fun});
|
||||||
}
|
}
|
||||||
|
@ -239,11 +239,11 @@ void removeFunctionsTargets(IRState *irs, llvm::Module &module) {
|
||||||
auto it = funcMap.find(fun.getName());
|
auto it = funcMap.find(fun.getName());
|
||||||
if (funcMap.end() != it) {
|
if (funcMap.end() != it) {
|
||||||
auto irFunc = it->second;
|
auto irFunc = it->second;
|
||||||
if (!irFunc->targetCpuOverriden) {
|
if (!irFunc->targetCpuOverridden) {
|
||||||
fun.removeFnAttr("target-cpu");
|
fun.removeFnAttr("target-cpu");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!irFunc->targetFeaturesOverriden) {
|
if (!irFunc->targetFeaturesOverridden) {
|
||||||
fun.removeFnAttr("target-features");
|
fun.removeFnAttr("target-features");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -328,7 +328,7 @@ void applyAttrTarget(StructLiteralExp *sle, llvm::Function *func, IrFunction *ir
|
||||||
|
|
||||||
if (!CPU.empty()) {
|
if (!CPU.empty()) {
|
||||||
func->addFnAttr("target-cpu", CPU);
|
func->addFnAttr("target-cpu", CPU);
|
||||||
irFunc->targetCpuOverriden = true;
|
irFunc->targetCpuOverridden = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!features.empty()) {
|
if (!features.empty()) {
|
||||||
|
@ -338,7 +338,7 @@ void applyAttrTarget(StructLiteralExp *sle, llvm::Function *func, IrFunction *ir
|
||||||
sort(features.begin(), features.end());
|
sort(features.begin(), features.end());
|
||||||
func->addFnAttr("target-features",
|
func->addFnAttr("target-features",
|
||||||
llvm::join(features.begin(), features.end(), ","));
|
llvm::join(features.begin(), features.end(), ","));
|
||||||
irFunc->targetFeaturesOverriden = true;
|
irFunc->targetFeaturesOverridden = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,10 +82,10 @@ struct IrFunction {
|
||||||
llvm::FastMathFlags FMF;
|
llvm::FastMathFlags FMF;
|
||||||
|
|
||||||
/// target CPU was overriden by attribute
|
/// target CPU was overriden by attribute
|
||||||
bool targetCpuOverriden = false;
|
bool targetCpuOverridden = false;
|
||||||
|
|
||||||
/// target features was overriden by attributes
|
/// target features was overriden by attributes
|
||||||
bool targetFeaturesOverriden = false;
|
bool targetFeaturesOverridden = false;
|
||||||
|
|
||||||
/// This functions was marked for dynamic compilation
|
/// This functions was marked for dynamic compilation
|
||||||
bool runtimeCompile = false;
|
bool runtimeCompile = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue