aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authora-romanov <Anton.Romanov@ydb.tech>2023-05-19 13:06:28 +0300
committera-romanov <Anton.Romanov@ydb.tech>2023-05-19 13:06:28 +0300
commit2ae222a2b0deedd196778ba7a703e0b27c97ec3c (patch)
tree67a8d3b74dc59871b43863ebececefbbbb4519d3
parent62539a50bcf9bb30844426ccfa6a49ee08bfb3fe (diff)
downloadydb-2ae222a2b0deedd196778ba7a703e0b27c97ec3c.tar.gz
YQL-15941 Prepare KQP runtime for LLVM14.
-rw-r--r--ydb/core/kqp/runtime/kqp_compute.cpp5
-rw-r--r--ydb/core/kqp/runtime/kqp_read_table.cpp8
2 files changed, 7 insertions, 6 deletions
diff --git a/ydb/core/kqp/runtime/kqp_compute.cpp b/ydb/core/kqp/runtime/kqp_compute.cpp
index cad6760c3e9..6645eb42507 100644
--- a/ydb/core/kqp/runtime/kqp_compute.cpp
+++ b/ydb/core/kqp/runtime/kqp_compute.cpp
@@ -53,8 +53,9 @@ public:
block = kill;
const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TKqpEnsureWrapper::Throw));
const auto doFuncArg = ConstantInt::get(Type::getInt64Ty(context), (ui64)this);
- const auto doFuncPtr = CastInst::Create(Instruction::IntToPtr, doFunc, PointerType::getUnqual(FunctionType::get(Type::getVoidTy(context), { Type::getInt64Ty(context), ctx.Ctx->getType() }, false)), "thrower", block);
- CallInst::Create(doFuncPtr, { doFuncArg, ctx.Ctx }, "", block)->setTailCall();
+ const auto doFuncType = FunctionType::get(Type::getVoidTy(context), { Type::getInt64Ty(context), ctx.Ctx->getType() }, false);
+ const auto doFuncPtr = CastInst::Create(Instruction::IntToPtr, doFunc, PointerType::getUnqual(doFuncType), "thrower", block);
+ CallInst::Create(doFuncType, doFuncPtr, { doFuncArg, ctx.Ctx }, "", block)->setTailCall();
new UnreachableInst(context, block);
block = good;
diff --git a/ydb/core/kqp/runtime/kqp_read_table.cpp b/ydb/core/kqp/runtime/kqp_read_table.cpp
index b2dd91853a4..70f87591362 100644
--- a/ydb/core/kqp/runtime/kqp_read_table.cpp
+++ b/ydb/core/kqp/runtime/kqp_read_table.cpp
@@ -266,7 +266,7 @@ public:
{ConstantInt::get(indexType, i)},
(TString("loadPtr_") += ToString(i)).c_str(),
block);
- return new LoadInst(loadPtr, "load", block);
+ return new LoadInst(valueType, loadPtr, "load", block);
};
}
@@ -291,7 +291,7 @@ public:
const auto self = CastInst::Create(Instruction::IntToPtr, ConstantInt::get(Type::getInt64Ty(context), uintptr_t(this)), ptrType, "self", block);
const auto funcType = FunctionType::get(Type::getInt32Ty(context), { self->getType(), ctx.Ctx->getType(), fields->getType() }, false);
const auto funcPtr = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(funcType), "fetch_func", block);
- const auto result = CallInst::Create(funcPtr, { self, ctx.Ctx, fields }, "fetch", block);
+ const auto result = CallInst::Create(funcType, funcPtr, { self, ctx.Ctx, fields }, "fetch", block);
return {result, std::move(getters)};
}
@@ -403,7 +403,7 @@ public:
{ConstantInt::get(indexType, i)},
(TString("loadPtr_") += ToString(i)).c_str(),
block);
- return new LoadInst(loadPtr, "load", block);
+ return new LoadInst(valueType, loadPtr, "load", block);
};
}
@@ -428,7 +428,7 @@ public:
const auto self = CastInst::Create(Instruction::IntToPtr, ConstantInt::get(Type::getInt64Ty(context), uintptr_t(this)), ptrType, "self", block);
const auto funcType = FunctionType::get(Type::getInt32Ty(context), { self->getType(), ctx.Ctx->getType(), fields->getType() }, false);
const auto funcPtr = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(funcType), "fetch_func", block);
- const auto result = CallInst::Create(funcPtr, { self, ctx.Ctx, fields }, "fetch", block);
+ const auto result = CallInst::Create(funcType, funcPtr, { self, ctx.Ctx, fields }, "fetch", block);
return {result, std::move(getters)};
}