summaryrefslogtreecommitdiffstats
path: root/yql/essentials/minikql/comp_nodes/mkql_flatmap.cpp
diff options
context:
space:
mode:
authorvvvv <[email protected]>2025-01-15 11:23:27 +0300
committervvvv <[email protected]>2025-01-15 11:46:46 +0300
commit350e1ae88774a5c2d9c9bf63bc4bfedcb9d44b03 (patch)
tree6c99f143a03fb0e45790b74bb951d4b451348b99 /yql/essentials/minikql/comp_nodes/mkql_flatmap.cpp
parent230b2bd8262d16de167b0bd9c761c271182a8582 (diff)
Drop broken windows LLVM support
commit_hash:fc1f44ff256c759953b54e2ccac3277dc66c1165
Diffstat (limited to 'yql/essentials/minikql/comp_nodes/mkql_flatmap.cpp')
-rw-r--r--yql/essentials/minikql/comp_nodes/mkql_flatmap.cpp42
1 files changed, 11 insertions, 31 deletions
diff --git a/yql/essentials/minikql/comp_nodes/mkql_flatmap.cpp b/yql/essentials/minikql/comp_nodes/mkql_flatmap.cpp
index dc1d9a7472f..0e53e650ac6 100644
--- a/yql/essentials/minikql/comp_nodes/mkql_flatmap.cpp
+++ b/yql/essentials/minikql/comp_nodes/mkql_flatmap.cpp
@@ -1170,7 +1170,7 @@ protected:
return f;
const auto valueType = Type::getInt128Ty(context);
- const auto containerType = codegen.GetEffectiveTarget() == NYql::NCodegen::ETarget::Windows ? static_cast<Type*>(PointerType::getUnqual(valueType)) : static_cast<Type*>(valueType);
+ const auto containerType = static_cast<Type*>(valueType);
const auto contextType = GetCompContextType(context);
const auto statusType = IsInputStream ? Type::getInt32Ty(context) : Type::getInt1Ty(context);
const auto funcType = FunctionType::get(statusType, {PointerType::getUnqual(contextType), containerType, PointerType::getUnqual(valueType)}, false);
@@ -1189,8 +1189,7 @@ protected:
const auto main = BasicBlock::Create(context, "main", ctx.Func);
auto block = main;
- const auto container = codegen.GetEffectiveTarget() == NYql::NCodegen::ETarget::Windows ?
- new LoadInst(valueType, containerArg, "load_container", false, block) : static_cast<Value*>(containerArg);
+ const auto container = static_cast<Value*>(containerArg);
const auto loop = BasicBlock::Create(context, "loop", ctx.Func);
const auto good = BasicBlock::Create(context, "good", ctx.Func);
@@ -1242,7 +1241,7 @@ protected:
return f;
const auto valueType = Type::getInt128Ty(context);
- const auto containerType = codegen.GetEffectiveTarget() == NYql::NCodegen::ETarget::Windows ? static_cast<Type*>(PointerType::getUnqual(valueType)) : static_cast<Type*>(valueType);
+ const auto containerType = static_cast<Type*>(valueType);
const auto contextType = GetCompContextType(context);
const auto statusType = IsInputStream ? Type::getInt32Ty(context) : Type::getInt1Ty(context);
const auto stateType = ResultContainerOpt ? Type::getInt32Ty(context) : Type::getInt1Ty(context);
@@ -1263,8 +1262,7 @@ protected:
const auto main = BasicBlock::Create(context, "main", ctx.Func);
auto block = main;
- const auto container = codegen.GetEffectiveTarget() == NYql::NCodegen::ETarget::Windows ?
- new LoadInst(valueType, containerArg, "load_container", false, block) : static_cast<Value*>(containerArg);
+ const auto container = static_cast<Value*>(containerArg);
const auto zero = ConstantInt::get(valueType, 0);
@@ -1578,17 +1576,9 @@ public:
const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::ExtendList<ResultContainerOpt>));
- if (NYql::NCodegen::ETarget::Windows != ctx.Codegen.GetEffectiveTarget()) {
- const auto funType = FunctionType::get(list->getType(), {factory->getType(), vector->getType(), index->getType()}, false);
- const auto funcPtr = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(funType), "function", block);
- res = CallInst::Create(funType, funcPtr, {factory, vector, index}, "res", block);
- } else {
- const auto retPtr = new AllocaInst(list->getType(), 0U, "ret_ptr", block);
- const auto funType = FunctionType::get(Type::getVoidTy(context), {factory->getType(), retPtr->getType(), vector->getType(), index->getType()}, false);
- const auto funcPtr = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(funType), "function", block);
- CallInst::Create(funType, funcPtr, {factory, retPtr, vector, index}, "", block);
- res = new LoadInst(list->getType(), retPtr, "res", block);
- }
+ const auto funType = FunctionType::get(list->getType(), {factory->getType(), vector->getType(), index->getType()}, false);
+ const auto funcPtr = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(funType), "function", block);
+ res = CallInst::Create(funType, funcPtr, {factory, vector, index}, "res", block);
}
map->addIncoming(res, block);
BranchInst::Create(free, done, heap, block);
@@ -1613,20 +1603,10 @@ public:
const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TListFlatMapWrapper::MakeLazyList));
const auto ptrType = PointerType::getUnqual(StructType::get(context));
const auto self = CastInst::Create(Instruction::IntToPtr, ConstantInt::get(Type::getInt64Ty(context), uintptr_t(this)), ptrType, "self", block);
- if (NYql::NCodegen::ETarget::Windows != ctx.Codegen.GetEffectiveTarget()) {
- const auto funType = FunctionType::get(list->getType() , {self->getType(), ctx.Ctx->getType(), list->getType()}, false);
- const auto doFuncPtr = CastInst::Create(Instruction::IntToPtr, doFunc, PointerType::getUnqual(funType), "function", block);
- const auto value = CallInst::Create(funType, doFuncPtr, {self, ctx.Ctx, list}, "value", block);
- map->addIncoming(value, block);
- } else {
- const auto resultPtr = new AllocaInst(list->getType(), 0U, "return", block);
- new StoreInst(list, resultPtr, block);
- const auto funType = FunctionType::get(Type::getVoidTy(context), {self->getType(), resultPtr->getType(), ctx.Ctx->getType(), resultPtr->getType()}, false);
- const auto doFuncPtr = CastInst::Create(Instruction::IntToPtr, doFunc, PointerType::getUnqual(funType), "function", block);
- CallInst::Create(funType, doFuncPtr, {self, resultPtr, ctx.Ctx, resultPtr}, "", block);
- const auto value = new LoadInst(list->getType(), resultPtr, "value", block);
- map->addIncoming(value, block);
- }
+ const auto funType = FunctionType::get(list->getType() , {self->getType(), ctx.Ctx->getType(), list->getType()}, false);
+ const auto doFuncPtr = CastInst::Create(Instruction::IntToPtr, doFunc, PointerType::getUnqual(funType), "function", block);
+ const auto value = CallInst::Create(funType, doFuncPtr, {self, ctx.Ctx, list}, "value", block);
+ map->addIncoming(value, block);
BranchInst::Create(done, block);
}