diff options
author | atarasov5 <atarasov5@yandex-team.com> | 2025-03-24 12:44:03 +0300 |
---|---|---|
committer | atarasov5 <atarasov5@yandex-team.com> | 2025-03-24 12:57:18 +0300 |
commit | 39ea455c99db12684cf4ba10185e6961851231b8 (patch) | |
tree | 612b3077beb5127b48dd91b1ad13f3f0d23ac9b2 | |
parent | 71f6767025c7a8ac0fe7c9c45556faf1d7f7391c (diff) | |
download | ydb-39ea455c99db12684cf4ba10185e6961851231b8.tar.gz |
YQL-19520: msan + codegen = <3
commit_hash:9a814af3b8bd51c53939aa6ffde2e981ad8ea150
74 files changed, 440 insertions, 200 deletions
diff --git a/yql/essentials/minikql/comp_nodes/mkql_append.cpp b/yql/essentials/minikql/comp_nodes/mkql_append.cpp index 82894c6d10..e34d71d4c1 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_append.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_append.cpp @@ -35,7 +35,7 @@ public: const auto factory = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::Append)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::Append>()); const auto left = GetNodeValue(Left, ctx, block); const auto right = GetNodeValue(Right, ctx, block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_block_agg.cpp b/yql/essentials/minikql/comp_nodes/mkql_block_agg.cpp index 266e909b98..6063faaccb 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_block_agg.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_block_agg.cpp @@ -742,8 +742,8 @@ public: #ifndef MKQL_DISABLE_CODEGEN ICodegeneratorInlineWideNode::TGenerateResult DoGenGetValues(const TCodegenContext& ctx, Value* statePtr, BasicBlock*& block) const { return DoGenGetValuesImpl(ctx, statePtr, block, Flow_, Width_, AggsParams_.size(), - GetMethodPtr(&TState::Get), GetMethodPtr(&TBlockCombineAllWrapperFromFlow::MakeState), - GetMethodPtr(&TState::ProcessInput), GetMethodPtr(&TState::MakeOutput)); + GetMethodPtr<&TState::Get>(), GetMethodPtr<&TBlockCombineAllWrapperFromFlow::MakeState>(), + GetMethodPtr<&TState::ProcessInput>(), GetMethodPtr<&TState::MakeOutput>()); } #endif private: @@ -1719,9 +1719,9 @@ public: #ifndef MKQL_DISABLE_CODEGEN ICodegeneratorInlineWideNode::TGenerateResult DoGenGetValues(const TCodegenContext& ctx, Value* statePtr, BasicBlock*& block) const { return DoGenGetValuesImpl(ctx, statePtr, block, Flow_, Width_, OutputWidth_, - GetMethodPtr(&TState::Get), GetMethodPtr(&THashedWrapperBaseFromFlow::MakeState), - GetMethodPtr(&TState::ProcessInput), GetMethodPtr(&TState::Finish), - GetMethodPtr(&TState::FillOutput), GetMethodPtr(&TState::Slice)); + GetMethodPtr<&TState::Get>(), GetMethodPtr<&THashedWrapperBaseFromFlow::MakeState>(), + GetMethodPtr<&TState::ProcessInput>(), GetMethodPtr<&TState::Finish>(), + GetMethodPtr<&TState::FillOutput>(), GetMethodPtr<&TState::Slice>()); } #endif private: diff --git a/yql/essentials/minikql/comp_nodes/mkql_block_compress.cpp b/yql/essentials/minikql/comp_nodes/mkql_block_compress.cpp index 74e0dca0d1..f9bf1dc376 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_block_compress.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_block_compress.cpp @@ -195,7 +195,7 @@ public: block = fill; - const auto makeCountFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&MakeBlockCount)); + const auto makeCountFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&MakeBlockCount>()); const auto makeCountType = FunctionType::get(valueType, {ctx.GetFactory()->getType(), pops->getType()}, false); const auto makeCountPtr = CastInst::Create(Instruction::IntToPtr, makeCountFunc, PointerType::getUnqual(makeCountType), "make_count_func", block); const auto slice = CallInst::Create(makeCountType, makeCountPtr, {ctx.GetFactory(), pops}, "slice", block); @@ -320,7 +320,7 @@ public: const auto atTop = &ctx.Func->getEntryBlock().back(); - const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Get)); + const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Get>()); const auto getType = FunctionType::get(valueType, {statePtrType, indexType, ctx.GetFactory()->getType(), indexType}, false); const auto getPtr = CastInst::Create(Instruction::IntToPtr, getFunc, PointerType::getUnqual(getType), "get", atTop); @@ -349,7 +349,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TCompressBlocks::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TCompressBlocks::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -383,7 +383,7 @@ public: block = read; - const auto clearFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::ClearValues)); + const auto clearFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::ClearValues>()); const auto clearType = FunctionType::get(Type::getVoidTy(context), {statePtrType}, false); const auto clearPtr = CastInst::Create(Instruction::IntToPtr, clearFunc, PointerType::getUnqual(clearType), "clear", block); CallInst::Create(clearType, clearPtr, {stateArg}, "", block); @@ -410,7 +410,7 @@ public: const auto bitmapArg = bitmap; const auto stepType = Type::getInt8Ty(context); - const auto checkFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Check)); + const auto checkFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Check>()); const auto checkType = FunctionType::get(stepType, {statePtrType, bitmapArg->getType()}, false); const auto checkPtr = CastInst::Create(Instruction::IntToPtr, checkFunc, PointerType::getUnqual(checkType), "check_func", block); const auto check = CallInst::Create(checkType, checkPtr, {stateArg, bitmapArg}, "check", block); @@ -438,7 +438,7 @@ public: block = work; - const auto sparseFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Sparse)); + const auto sparseFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Sparse>()); const auto sparseType = FunctionType::get(Type::getInt1Ty(context), {statePtrType}, false); const auto sparsePtr = CastInst::Create(Instruction::IntToPtr, sparseFunc, PointerType::getUnqual(sparseType), "sparse_func", block); const auto sparse = CallInst::Create(sparseType, sparsePtr, {stateArg}, "sparse", block); @@ -457,7 +457,7 @@ public: block = done; - const auto flushFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::FlushBuffers)); + const auto flushFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::FlushBuffers>()); const auto flushType = FunctionType::get(Type::getVoidTy(context), {statePtrType, ctx.GetFactory()->getType()}, false); const auto flushPtr = CastInst::Create(Instruction::IntToPtr, flushFunc, PointerType::getUnqual(flushType), "flush_func", block); CallInst::Create(flushType, flushPtr, {stateArg, ctx.GetFactory()}, "", block); @@ -466,7 +466,7 @@ public: block = fill; - const auto sliceFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Slice)); + const auto sliceFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Slice>()); const auto sliceType = FunctionType::get(indexType, {statePtrType}, false); const auto slicePtr = CastInst::Create(Instruction::IntToPtr, sliceFunc, PointerType::getUnqual(sliceType), "slice_func", block); const auto slice = CallInst::Create(sliceType, slicePtr, {stateArg}, "slice", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_block_skiptake.cpp b/yql/essentials/minikql/comp_nodes/mkql_block_skiptake.cpp index 2496b75ca6..0a6eb2758d 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_block_skiptake.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_block_skiptake.cpp @@ -57,7 +57,7 @@ public: const auto offsetPtr = new AllocaInst(indexType, 0U, "offset_ptr", atTop); const auto sizePtr = new AllocaInst(indexType, 0U, "size_ptr", atTop); - const auto sliceFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TWideSkipBlocksWrapper::SliceBlock)); + const auto sliceFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TWideSkipBlocksWrapper::SliceBlock>()); const auto sliceType = FunctionType::get(valueType, {ctx.GetFactory()->getType(), valueType, indexType}, false); const auto slicePtr = CastInst::Create(Instruction::IntToPtr, sliceFunc, PointerType::getUnqual(sliceType), "slice", atTop); @@ -165,7 +165,7 @@ public: block = calc; - const auto makeCountFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&MakeBlockCount)); + const auto makeCountFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&MakeBlockCount>()); const auto makeCountType = FunctionType::get(valueType, {ctx.GetFactory()->getType(), indexType}, false); const auto makeCountPtr = CastInst::Create(Instruction::IntToPtr, makeCountFunc, PointerType::getUnqual(makeCountType), "make_count_func", block); const auto slice = CallInst::Create(makeCountType, makeCountPtr, {ctx.GetFactory(), count}, "slice", block); @@ -275,7 +275,7 @@ public: const auto sizePtr = new AllocaInst(indexType, 0U, "size_ptr", atTop); new StoreInst(ConstantInt::get(indexType, 0), sizePtr, atTop); - const auto sliceFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TWideTakeBlocksWrapper::SliceBlock)); + const auto sliceFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TWideTakeBlocksWrapper::SliceBlock>()); const auto sliceType = FunctionType::get(valueType, {ctx.GetFactory()->getType(), valueType, indexType}, false); const auto slicePtr = CastInst::Create(Instruction::IntToPtr, sliceFunc, PointerType::getUnqual(sliceType), "slice", atTop); @@ -361,7 +361,7 @@ public: block = calc; - const auto makeCountFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&MakeBlockCount)); + const auto makeCountFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&MakeBlockCount>()); const auto makeCountType = FunctionType::get(valueType, {ctx.GetFactory()->getType(), indexType}, false); const auto makeCountPtr = CastInst::Create(Instruction::IntToPtr, makeCountFunc, PointerType::getUnqual(makeCountType), "make_count_func", block); const auto slice = CallInst::Create(makeCountType, makeCountPtr, {ctx.GetFactory(), count}, "slice", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_block_top.cpp b/yql/essentials/minikql/comp_nodes/mkql_block_top.cpp index cab35a232e..7da4e7c491 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_block_top.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_block_top.cpp @@ -95,7 +95,7 @@ public: const auto atTop = &ctx.Func->getEntryBlock().back(); - const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Get)); + const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Get>()); const auto getType = FunctionType::get(valueType, {statePtrType, indexType, ctx.GetFactory()->getType(), indexType}, false); const auto getPtr = CastInst::Create(Instruction::IntToPtr, getFunc, PointerType::getUnqual(getType), "get", atTop); @@ -137,7 +137,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TTopOrSortBlocksWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TTopOrSortBlocksWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType(), dirs->getType(), trunc->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr, dirs, trunc}, "", block); @@ -195,7 +195,7 @@ public: } new StoreInst(array, values, block); - const auto processBlockFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::ProcessInput)); + const auto processBlockFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::ProcessInput>()); const auto processBlockType = FunctionType::get(Type::getVoidTy(context), {statePtrType}, false); const auto processBlockPtr = CastInst::Create(Instruction::IntToPtr, processBlockFunc, PointerType::getUnqual(processBlockType), "process_inputs_func", block); CallInst::Create(processBlockType, processBlockPtr, {stateArg}, "", block); @@ -204,7 +204,7 @@ public: block = work; - const auto fillBlockFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::FillOutput)); + const auto fillBlockFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::FillOutput>()); const auto fillBlockType = FunctionType::get(flagType, {statePtrType, ctx.GetFactory()->getType()}, false); const auto fillBlockPtr = CastInst::Create(Instruction::IntToPtr, fillBlockFunc, PointerType::getUnqual(fillBlockType), "fill_output_func", block); const auto hasData = CallInst::Create(fillBlockType, fillBlockPtr, {stateArg, ctx.GetFactory()}, "fill_output", block); @@ -215,7 +215,7 @@ public: block = fill; - const auto sliceFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Slice)); + const auto sliceFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Slice>()); const auto sliceType = FunctionType::get(indexType, {statePtrType}, false); const auto slicePtr = CastInst::Create(Instruction::IntToPtr, sliceFunc, PointerType::getUnqual(sliceType), "slice_func", block); const auto slice = CallInst::Create(sliceType, slicePtr, {stateArg}, "slice", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_blocks.cpp b/yql/essentials/minikql/comp_nodes/mkql_blocks.cpp index 354b0237ed..a0ae63138c 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_blocks.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_blocks.cpp @@ -161,11 +161,11 @@ public: const auto atTop = &ctx.Func->getEntryBlock().back(); - const auto addFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Add)); + const auto addFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Add>()); const auto addType = FunctionType::get(Type::getVoidTy(context), {statePtrType, valueType, indexType}, false); const auto addPtr = CastInst::Create(Instruction::IntToPtr, addFunc, PointerType::getUnqual(addType), "add", atTop); - const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Get)); + const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Get>()); const auto getType = FunctionType::get(valueType, {statePtrType, indexType, ctx.GetFactory()->getType(), indexType}, false); const auto getPtr = CastInst::Create(Instruction::IntToPtr, getFunc, PointerType::getUnqual(getType), "get", atTop); @@ -192,7 +192,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TWideToBlocksFlowWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TWideToBlocksFlowWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -268,7 +268,7 @@ public: block = work; - const auto makeBlockFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::MakeBlocks)); + const auto makeBlockFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::MakeBlocks>()); const auto makeBlockType = FunctionType::get(indexType, {statePtrType, ctx.GetFactory()->getType()}, false); const auto makeBlockPtr = CastInst::Create(Instruction::IntToPtr, makeBlockFunc, PointerType::getUnqual(makeBlockType), "make_blocks_func", block); CallInst::Create(makeBlockType, makeBlockPtr, {stateArg, ctx.GetFactory()}, "", block); @@ -277,7 +277,7 @@ public: block = fill; - const auto sliceFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Slice)); + const auto sliceFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Slice>()); const auto sliceType = FunctionType::get(indexType, {statePtrType}, false); const auto slicePtr = CastInst::Create(Instruction::IntToPtr, sliceFunc, PointerType::getUnqual(sliceType), "slice_func", block); const auto slice = CallInst::Create(sliceType, slicePtr, {stateArg}, "slice", block); @@ -500,7 +500,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TFromBlocksWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TFromBlocksWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -512,7 +512,7 @@ public: const auto half = CastInst::Create(Instruction::Trunc, state, Type::getInt64Ty(context), "half", block); const auto stateArg = CastInst::Create(Instruction::IntToPtr, half, statePtrType, "state_arg", block); - const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::GetValue)); + const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::GetValue>()); const auto getType = FunctionType::get(valueType, {statePtrType, ctx.GetFactory()->getType()}, false); const auto getPtr = CastInst::Create(Instruction::IntToPtr, getFunc, PointerType::getUnqual(getType), "get", block); const auto value = CallInst::Create(getType, getPtr, {stateArg, ctx.GetFactory() }, "value", block); @@ -531,7 +531,7 @@ public: block = init; - const auto setFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Reset)); + const auto setFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Reset>()); const auto setType = FunctionType::get(valueType, {statePtrType, valueType}, false); const auto setPtr = CastInst::Create(Instruction::IntToPtr, setFunc, PointerType::getUnqual(setType), "set", block); CallInst::Create(setType, setPtr, {stateArg, input }, "", block); @@ -703,7 +703,7 @@ public: const auto stateType = StructType::get(context, stateFields.GetFieldsArray()); const auto statePtrType = PointerType::getUnqual(stateType); - const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Get)); + const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Get>()); const auto getType = FunctionType::get(valueType, {statePtrType, ctx.GetFactory()->getType(), indexType}, false); const auto getPtr = CastInst::Create(Instruction::IntToPtr, getFunc, PointerType::getUnqual(getType), "get", &ctx.Func->getEntryBlock().back()); const auto stateOnStack = new AllocaInst(statePtrType, 0U, "state_on_stack", &ctx.Func->getEntryBlock().back()); @@ -726,7 +726,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TWideFromBlocksFlowWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TWideFromBlocksFlowWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -750,7 +750,7 @@ public: block = more; - const auto clearFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::ClearValues)); + const auto clearFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::ClearValues>()); const auto clearType = FunctionType::get(Type::getVoidTy(context), {statePtrType}, false); const auto clearPtr = CastInst::Create(Instruction::IntToPtr, clearFunc, PointerType::getUnqual(clearType), "clear", block); CallInst::Create(clearType, clearPtr, {stateArg}, "", block); @@ -1025,7 +1025,7 @@ public: 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); - const auto asScalarFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TAsScalarWrapper::AsScalar)); + const auto asScalarFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TAsScalarWrapper::AsScalar>()); const auto asScalarType = FunctionType::get(Type::getInt128Ty(context), {self->getType(), value->getType(), ctx.Ctx->getType()}, false); const auto asScalarFuncPtr = CastInst::Create(Instruction::IntToPtr, asScalarFunc, PointerType::getUnqual(asScalarType), "function", block); @@ -1081,7 +1081,7 @@ public: 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); - const auto replicateFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TReplicateScalarWrapper::Replicate)); + const auto replicateFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TReplicateScalarWrapper::Replicate>()); const auto replicateType = FunctionType::get(Type::getInt128Ty(context), {self->getType(), value->getType(), count->getType(), ctx.Ctx->getType()}, false); const auto replicateFuncPtr = CastInst::Create(Instruction::IntToPtr, replicateFunc, PointerType::getUnqual(replicateType), "function", block); @@ -1166,7 +1166,7 @@ public: const auto atTop = &ctx.Func->getEntryBlock().back(); - const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TBlockState::Get)); + const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TBlockState::Get>()); const auto getType = FunctionType::get(valueType, {statePtrType, indexType, ctx.GetFactory()->getType(), indexType}, false); const auto getPtr = CastInst::Create(Instruction::IntToPtr, getFunc, PointerType::getUnqual(getType), "get", atTop); @@ -1188,7 +1188,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TBlockExpandChunkedWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TBlockExpandChunkedWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -1209,7 +1209,7 @@ public: block = read; - const auto clearFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TBlockState::ClearValues)); + const auto clearFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TBlockState::ClearValues>()); const auto clearType = FunctionType::get(Type::getVoidTy(context), {statePtrType}, false); const auto clearPtr = CastInst::Create(Instruction::IntToPtr, clearFunc, PointerType::getUnqual(clearType), "clear", block); CallInst::Create(clearType, clearPtr, {stateArg}, "", block); @@ -1235,7 +1235,7 @@ public: } new StoreInst(array, values, block); - const auto fillArraysFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TBlockState::FillArrays)); + const auto fillArraysFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TBlockState::FillArrays>()); const auto fillArraysType = FunctionType::get(Type::getVoidTy(context), {statePtrType}, false); const auto fillArraysPtr = CastInst::Create(Instruction::IntToPtr, fillArraysFunc, PointerType::getUnqual(fillArraysType), "fill_arrays_func", block); CallInst::Create(fillArraysType, fillArraysPtr, {stateArg}, "", block); @@ -1244,7 +1244,7 @@ public: block = fill; - const auto sliceFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TBlockState::Slice)); + const auto sliceFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TBlockState::Slice>()); const auto sliceType = FunctionType::get(indexType, {statePtrType}, false); const auto slicePtr = CastInst::Create(Instruction::IntToPtr, sliceFunc, PointerType::getUnqual(sliceType), "slice_func", block); const auto slice = CallInst::Create(sliceType, slicePtr, {stateArg}, "slice", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_chain1_map.cpp b/yql/essentials/minikql/comp_nodes/mkql_chain1_map.cpp index 56c4b8c9ac..0afe3ad37f 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_chain1_map.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_chain1_map.cpp @@ -469,7 +469,7 @@ public: { block = lazy; - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TListChain1MapWrapper::MakeLazyList)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TListChain1MapWrapper::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); const auto funType = FunctionType::get(list->getType() , {self->getType(), ctx.Ctx->getType(), list->getType()}, false); diff --git a/yql/essentials/minikql/comp_nodes/mkql_chain_map.cpp b/yql/essentials/minikql/comp_nodes/mkql_chain_map.cpp index 0003878380..c3ea1e97fd 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_chain_map.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_chain_map.cpp @@ -452,7 +452,7 @@ public: { block = lazy; - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TListChainMapWrapper::MakeLazyList)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TListChainMapWrapper::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); const auto funType = FunctionType::get(list->getType() , {self->getType(), ctx.Ctx->getType(), list->getType(), init->getType()}, false); diff --git a/yql/essentials/minikql/comp_nodes/mkql_collect.cpp b/yql/essentials/minikql/comp_nodes/mkql_collect.cpp index ad23aeb449..99e6c00557 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_collect.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_collect.cpp @@ -32,8 +32,8 @@ public: const auto valueType = Type::getInt128Ty(context); - const auto empty = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::GetEmptyContainerLazy)); - const auto append = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::Append)); + const auto empty = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::GetEmptyContainerLazy>()); + const auto append = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::Append>()); const auto work = BasicBlock::Create(context, "work", ctx.Func); const auto good = BasicBlock::Create(context, "good", ctx.Func); @@ -69,7 +69,7 @@ public: { block = burn; - const auto thrower = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TCollectFlowWrapper::Throw)); + const auto thrower = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TCollectFlowWrapper::Throw>()); const auto throwerType = FunctionType::get(Type::getVoidTy(context), {}, false); const auto throwerPtr = CastInst::Create(Instruction::IntToPtr, thrower, PointerType::getUnqual(throwerType), "thrower", block); CallInst::Create(throwerType, throwerPtr, {}, "", block); @@ -115,7 +115,7 @@ public: const auto factory = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::Collect<!IsList>)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::Collect<!IsList>>()); const auto seq = GetNodeValue(Seq, ctx, block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_combine.cpp b/yql/essentials/minikql/comp_nodes/mkql_combine.cpp index cc618593bc..bfca72d8ab 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_combine.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_combine.cpp @@ -277,7 +277,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TCombineCoreFlowWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TCombineCoreFlowWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -295,7 +295,7 @@ public: const auto over = BasicBlock::Create(context, "over", ctx.Func); const auto result = PHINode::Create(valueType, 3U, "result", over); - const auto isEmptyFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::IsEmpty)); + const auto isEmptyFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::IsEmpty>()); const auto isEmptyFuncType = FunctionType::get(Type::getInt1Ty(context), { statePtrType }, false); const auto isEmptyFuncPtr = CastInst::Create(Instruction::IntToPtr, isEmptyFunc, PointerType::getUnqual(isEmptyFuncType), "cast", block); const auto empty = CallInst::Create(isEmptyFuncType, isEmptyFuncPtr, { stateArg }, "empty", block); @@ -356,7 +356,7 @@ public: const auto keyParam = key; - const auto atFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::At)); + const auto atFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::At>()); const auto atType = FunctionType::get(ptrValueType, {stateArg->getType(), keyParam->getType()}, false); const auto atPtr = CastInst::Create(Instruction::IntToPtr, atFunc, PointerType::getUnqual(atType), "function", block); const auto place = CallInst::Create(atType, atPtr, {stateArg, keyParam}, "place", block); @@ -384,7 +384,7 @@ public: block = done; const auto stat = ctx.GetStat(); - const auto statFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::PushStat)); + const auto statFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::PushStat>()); const auto statType = FunctionType::get(Type::getVoidTy(context), {stateArg->getType(), stat->getType()}, false); const auto statPtr = CastInst::Create(Instruction::IntToPtr, statFunc, PointerType::getUnqual(statType), "stat", block); CallInst::Create(statType, statPtr, {stateArg, stat}, "", block); @@ -397,7 +397,7 @@ public: const auto good = BasicBlock::Create(context, "good", ctx.Func); - const auto extractFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Extract)); + const auto extractFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Extract>()); const auto extractType = FunctionType::get(Type::getInt1Ty(context), {stateArg->getType(), onePtr->getType(), twoPtr->getType()}, false); const auto extractPtr = CastInst::Create(Instruction::IntToPtr, extractFunc, PointerType::getUnqual(extractType), "extract", block); const auto has = CallInst::Create(extractType, extractPtr, {stateArg, onePtr, twoPtr}, "has", block); @@ -786,7 +786,7 @@ private: block = skip; } - const auto isEmptyFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::IsEmpty)); + const auto isEmptyFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::IsEmpty>()); const auto isEmptyFuncType = FunctionType::get(Type::getInt1Ty(context), { statePtrType }, false); const auto isEmptyFuncPtr = CastInst::Create(Instruction::IntToPtr, isEmptyFunc, PointerType::getUnqual(isEmptyFuncType), "cast", block); const auto empty = CallInst::Create(isEmptyFuncType, isEmptyFuncPtr, { stateArg }, "empty", block); @@ -846,7 +846,7 @@ private: const auto keyParam = key; - const auto atFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::At)); + const auto atFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::At>()); const auto atType = FunctionType::get(ptrValueType, {stateArg->getType(), keyParam->getType()}, false); const auto atPtr = CastInst::Create(Instruction::IntToPtr, atFunc, PointerType::getUnqual(atType), "function", block); const auto place = CallInst::Create(atType, atPtr, {stateArg, keyParam}, "place", block); @@ -874,7 +874,7 @@ private: block = done; const auto stat = ctx.GetStat(); - const auto statFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::PushStat)); + const auto statFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::PushStat>()); const auto statType = FunctionType::get(Type::getVoidTy(context), {stateArg->getType(), stat->getType()}, false); const auto statPtr = CastInst::Create(Instruction::IntToPtr, statFunc, PointerType::getUnqual(statType), "stat", block); CallInst::Create(statType, statPtr, {stateArg, stat}, "", block); @@ -887,7 +887,7 @@ private: const auto good = BasicBlock::Create(context, "good", ctx.Func); - const auto extractFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Extract)); + const auto extractFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Extract>()); const auto extractType = FunctionType::get(Type::getInt1Ty(context), {stateArg->getType(), onePtr->getType(), twoPtr->getType()}, false); const auto extractPtr = CastInst::Create(Instruction::IntToPtr, extractFunc, PointerType::getUnqual(extractType), "extract", block); const auto has = CallInst::Create(extractType, extractPtr, {stateArg, onePtr, twoPtr}, "has", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_condense.cpp b/yql/essentials/minikql/comp_nodes/mkql_condense.cpp index ff729dbbed..ced3a95d5a 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_condense.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_condense.cpp @@ -110,7 +110,7 @@ public: block = next; if constexpr (UseCtx) { - const auto cleanup = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&CleanupCurrentContext)); + const auto cleanup = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&CleanupCurrentContext>()); const auto cleanupType = FunctionType::get(Type::getVoidTy(context), {}, false); const auto cleanupPtr = CastInst::Create(Instruction::IntToPtr, cleanup, PointerType::getUnqual(cleanupType), "cleanup_ctx", block); CallInst::Create(cleanupType, cleanupPtr, {}, "", block); @@ -399,7 +399,7 @@ private: block = next; if constexpr (UseCtx) { - const auto cleanup = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&CleanupCurrentContext)); + const auto cleanup = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&CleanupCurrentContext>()); const auto cleanupType = FunctionType::get(Type::getVoidTy(context), {}, false); const auto cleanupPtr = CastInst::Create(Instruction::IntToPtr, cleanup, PointerType::getUnqual(cleanupType), "cleanup_ctx", block); CallInst::Create(cleanupType, cleanupPtr, {}, "", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_condense1.cpp b/yql/essentials/minikql/comp_nodes/mkql_condense1.cpp index a573b48072..850a7bff04 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_condense1.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_condense1.cpp @@ -105,7 +105,7 @@ public: block = step; if constexpr (UseCtx) { - const auto cleanup = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&CleanupCurrentContext)); + const auto cleanup = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&CleanupCurrentContext>()); const auto cleanupType = FunctionType::get(Type::getVoidTy(context), {}, false); const auto cleanupPtr = CastInst::Create(Instruction::IntToPtr, cleanup, PointerType::getUnqual(cleanupType), "cleanup_ctx", block); CallInst::Create(cleanupType, cleanupPtr, {}, "", block); @@ -409,7 +409,7 @@ private: block = step; if constexpr (UseCtx) { - const auto cleanup = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&CleanupCurrentContext)); + const auto cleanup = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&CleanupCurrentContext>()); const auto cleanupType = FunctionType::get(Type::getVoidTy(context), {}, false); const auto cleanupPtr = CastInst::Create(Instruction::IntToPtr, cleanup, PointerType::getUnqual(cleanupType), "cleanup_ctx", block); CallInst::Create(cleanupType, cleanupPtr, {}, "", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_ensure.cpp b/yql/essentials/minikql/comp_nodes/mkql_ensure.cpp index be60a60a9f..227422048b 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_ensure.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_ensure.cpp @@ -45,7 +45,7 @@ public: BranchInst::Create(good, kill, pass, block); block = kill; - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TEnsureWrapper::Throw)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TEnsureWrapper::Throw>()); const auto doFuncArg = ConstantInt::get(Type::getInt64Ty(context), (ui64)this); 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); diff --git a/yql/essentials/minikql/comp_nodes/mkql_enumerate.cpp b/yql/essentials/minikql/comp_nodes/mkql_enumerate.cpp index 61887fe000..31ef5761c6 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_enumerate.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_enumerate.cpp @@ -129,7 +129,7 @@ public: const auto start = GetterFor<ui64>(startv, context, block); const auto step = GetterFor<ui64>(stepv, context, block); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TEnumerateWrapper::WrapList)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TEnumerateWrapper::WrapList>()); 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); diff --git a/yql/essentials/minikql/comp_nodes/mkql_extend.cpp b/yql/essentials/minikql/comp_nodes/mkql_extend.cpp index 1be59576c0..fa77bbfd40 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_extend.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_extend.cpp @@ -118,7 +118,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TExtendWideFlowWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TExtendWideFlowWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -170,7 +170,7 @@ public: block = next; - const auto nextFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::NextFlow)); + const auto nextFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::NextFlow>()); const auto nextPtr = CastInst::Create(Instruction::IntToPtr, nextFunc, PointerType::getUnqual(funcType), "next_ptr", block); CallInst::Create(funcType, nextPtr, {stateArg}, "", block); result->addIncoming(ConstantInt::get(statusType, static_cast<i32>(EFetchResult::Yield)), block); @@ -179,7 +179,7 @@ public: block = over; - const auto overFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::FlowOver)); + const auto overFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::FlowOver>()); const auto overPtr = CastInst::Create(Instruction::IntToPtr, overFunc, PointerType::getUnqual(funcType), "over_ptr", block); CallInst::Create(funcType, overPtr, {stateArg}, "", block); @@ -264,7 +264,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TExtendFlowWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TExtendFlowWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -302,7 +302,7 @@ public: block = next; - const auto nextFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::NextFlow)); + const auto nextFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::NextFlow>()); const auto nextPtr = CastInst::Create(Instruction::IntToPtr, nextFunc, PointerType::getUnqual(funcType), "next_ptr", block); CallInst::Create(funcType, nextPtr, {stateArg}, "", block); result->addIncoming(GetYield(context), block); @@ -311,7 +311,7 @@ public: block = over; - const auto overFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::FlowOver)); + const auto overFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::FlowOver>()); const auto overPtr = CastInst::Create(Instruction::IntToPtr, overFunc, PointerType::getUnqual(funcType), "over_ptr", block); CallInst::Create(funcType, overPtr, {stateArg}, "", block); @@ -564,7 +564,7 @@ public: } const auto factory = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(IsStream ? &THolderFactory::ExtendStream : &THolderFactory::ExtendList<false>)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), IsStream ? GetMethodPtr<&THolderFactory::ExtendStream>() : GetMethodPtr<&THolderFactory::ExtendList<false>>()); const auto funType = FunctionType::get(valueType, {factory->getType(), array->getType(), size->getType()}, false); const auto funcPtr = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(funType), "function", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_filter.cpp b/yql/essentials/minikql/comp_nodes/mkql_filter.cpp index 55edc59f3f..3afd228845 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_filter.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_filter.cpp @@ -966,7 +966,7 @@ public: { block = lazy; - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TListFilterWrapper::MakeLazyList)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TListFilterWrapper::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); const auto funType = FunctionType::get(list->getType() , {self->getType(), ctx.Ctx->getType(), list->getType()}, false); @@ -1325,7 +1325,7 @@ public: { block = lazy; - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TListFilterWithLimitWrapper::MakeLazyList)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TListFilterWithLimitWrapper::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); const auto funType = FunctionType::get(list->getType() , {self->getType(), ctx.Ctx->getType(), list->getType(), limit->getType()}, false); diff --git a/yql/essentials/minikql/comp_nodes/mkql_flatmap.cpp b/yql/essentials/minikql/comp_nodes/mkql_flatmap.cpp index 0e53e650ac..923974e9e7 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_flatmap.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_flatmap.cpp @@ -1574,7 +1574,7 @@ public: } else { const auto factory = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::ExtendList<ResultContainerOpt>)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::ExtendList<ResultContainerOpt>>()); 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); @@ -1600,7 +1600,7 @@ public: { block = lazy; - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TListFlatMapWrapper::MakeLazyList)); + 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); const auto funType = FunctionType::get(list->getType() , {self->getType(), ctx.Ctx->getType(), list->getType()}, false); diff --git a/yql/essentials/minikql/comp_nodes/mkql_flow.cpp b/yql/essentials/minikql/comp_nodes/mkql_flow.cpp index 761e5f5510..f61c20faf1 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_flow.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_flow.cpp @@ -538,7 +538,7 @@ private: block = fail; - const auto throwFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TFromWideFlowWrapper::Throw)); + const auto throwFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TFromWideFlowWrapper::Throw>()); const auto throwFuncType = FunctionType::get(Type::getVoidTy(context), { indexType, indexType }, false); const auto throwFuncPtr = CastInst::Create(Instruction::IntToPtr, throwFunc, PointerType::getUnqual(throwFuncType), "thrower", block); CallInst::Create(throwFuncType, throwFuncPtr, { width, ConstantInt::get(width->getType(), Representations.size()) }, "", block)->setTailCall(); diff --git a/yql/essentials/minikql/comp_nodes/mkql_fromstring.cpp b/yql/essentials/minikql/comp_nodes/mkql_fromstring.cpp index 7b8c0fe0a6..7a81fc64bb 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_fromstring.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_fromstring.cpp @@ -117,7 +117,7 @@ public: { block = fail; if constexpr (IsStrict) { - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TDecimalFromStringWrapper::Throw)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TDecimalFromStringWrapper::Throw>()); const auto doFuncType = FunctionType::get(Type::getVoidTy(context), {valType, psType, psType}, false); const auto doFuncPtr = CastInst::Create(Instruction::IntToPtr, doFunc, PointerType::getUnqual(doFuncType), "thrower", block); CallInst::Create(doFuncType, doFuncPtr, { value, precision, scale }, "", block); @@ -226,7 +226,7 @@ public: BranchInst::Create(fail, last, test, block); block = fail; - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TFromStringWrapper::Throw)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TFromStringWrapper::Throw>()); const auto doFuncType = FunctionType::get(Type::getVoidTy(context), {valType, slotType}, false); const auto doFuncPtr = CastInst::Create(Instruction::IntToPtr, doFunc, PointerType::getUnqual(doFuncType), "thrower", block); CallInst::Create(doFuncType, doFuncPtr, { value, slot }, "", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_grace_join.cpp b/yql/essentials/minikql/comp_nodes/mkql_grace_join.cpp index 0a511e61ad..ac5e5108e3 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_grace_join.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_grace_join.cpp @@ -1131,7 +1131,7 @@ class TGraceJoinWrapper : public TStatefulWideFlowCodegeneratorNode<TGraceJoinWr 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TGraceJoinWrapper::MakeSpillingSupportState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TGraceJoinWrapper::MakeSpillingSupportState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -1149,7 +1149,7 @@ class TGraceJoinWrapper : public TStatefulWideFlowCodegeneratorNode<TGraceJoinWr const auto half = CastInst::Create(Instruction::Trunc, state, Type::getInt64Ty(context), "half", block); const auto stateArg = CastInst::Create(Instruction::IntToPtr, half, statePtrType, "state_arg", block); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TGraceJoinSpillingSupportState::FetchValues)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TGraceJoinSpillingSupportState::FetchValues>()); const auto funcType = FunctionType::get(Type::getInt32Ty(context), { statePtrType, 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(funcType, funcPtr, { stateArg, ctx.Ctx, fields }, "fetch", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_heap.cpp b/yql/essentials/minikql/comp_nodes/mkql_heap.cpp index 260223a0f3..e01d4d449f 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_heap.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_heap.cpp @@ -58,7 +58,7 @@ public: const auto fact = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::CloneArray));// TODO: Generate code instead of call CloneArray. + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::CloneArray>());// TODO: Generate code instead of call CloneArray. const auto list = GetNodeValue(List, ctx, block); @@ -90,8 +90,8 @@ public: result->addIncoming(array, block); - const auto algo = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THeapWrapper::Do)); - const auto self = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(this)); + const auto algo = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THeapWrapper::Do>()); + const auto self = ConstantInt::get(Type::getInt64Ty(context), (uintptr_t)(this)); const auto items = new LoadInst(itemsType, itemsPtr, "items", block); const auto zero = ConstantInt::get(idxType, 0); @@ -226,7 +226,7 @@ public: const auto fact = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::CloneArray));// TODO: Generate code instead of call CloneArray. + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::CloneArray>());// TODO: Generate code instead of call CloneArray. const auto list = GetNodeValue(List, ctx, block); const auto midv = GetNodeValue(Middle, ctx, block); @@ -266,8 +266,8 @@ public: result->addIncoming(array, block); - const auto algo = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TNthWrapper::Do)); - const auto self = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(this)); + const auto algo = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TNthWrapper::Do>()); + const auto self = ConstantInt::get(Type::getInt64Ty(context), (uintptr_t)(this)); const auto items = new LoadInst(itemsType, itemsPtr, "items", block); const auto zero = ConstantInt::get(idxType, 0); diff --git a/yql/essentials/minikql/comp_nodes/mkql_iterator.cpp b/yql/essentials/minikql/comp_nodes/mkql_iterator.cpp index b413d1cbca..831dfd05bb 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_iterator.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_iterator.cpp @@ -28,7 +28,7 @@ public: const auto value = GetNodeValue(List, ctx, block); const auto factory = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::CreateIteratorOverList)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::CreateIteratorOverList>()); const auto signature = FunctionType::get(value->getType(), {factory->getType(), value->getType()}, false); const auto creator = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(signature), "creator", block); @@ -64,7 +64,7 @@ public: const auto value = GetNodeValue(Stream, ctx, block); const auto factory = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::CreateForwardList)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::CreateForwardList>()); const auto signature = FunctionType::get(value->getType(), {factory->getType(), value->getType()}, false); const auto creator = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(signature), "creator", block); @@ -210,7 +210,7 @@ private: BranchInst::Create(kill, good, IsYield(value, block, context), block); block = kill; - const auto doThrow = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TFlowForwardListWrapper::Throw)); + const auto doThrow = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TFlowForwardListWrapper::Throw>()); const auto doThrowType = FunctionType::get(Type::getVoidTy(context), {}, false); const auto doThrowPtr = CastInst::Create(Instruction::IntToPtr, doThrow, PointerType::getUnqual(doThrowType), "thrower", block); CallInst::Create(doThrowType, doThrowPtr, {}, "", block)->setTailCall(); diff --git a/yql/essentials/minikql/comp_nodes/mkql_join.cpp b/yql/essentials/minikql/comp_nodes/mkql_join.cpp index 9ef61dcdb1..cb44e820d7 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_join.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_join.cpp @@ -1220,7 +1220,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TWideCommonJoinCoreWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TWideCommonJoinCoreWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -1238,7 +1238,7 @@ public: const auto half = CastInst::Create(Instruction::Trunc, state, Type::getInt64Ty(context), "half", block); const auto stateArg = CastInst::Create(Instruction::IntToPtr, half, statePtrType, "state_arg", block); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TValue::FetchValues)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TValue::FetchValues>()); const auto funcType = FunctionType::get(Type::getInt32Ty(context), { statePtrType, 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(funcType, funcPtr, { stateArg, ctx.Ctx, fields }, "fetch", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_join_dict.cpp b/yql/essentials/minikql/comp_nodes/mkql_join_dict.cpp index 127e32a0eb..661dbde78a 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_join_dict.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_join_dict.cpp @@ -43,7 +43,7 @@ public: void DoGenerateGetValue(const TCodegenContext& ctx, Value* pointer, BasicBlock*& block) const { auto& context = ctx.Codegen.GetContext(); - const auto joinFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TJoinDictWrapper::JoinDicts)); + const auto joinFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TJoinDictWrapper::JoinDicts>()); const auto joinFuncArg = ConstantInt::get(Type::getInt64Ty(context), (ui64)this); const auto one = GetNodeValue(Dict1, ctx, block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_lazy_list.cpp b/yql/essentials/minikql/comp_nodes/mkql_lazy_list.cpp index f19ac809a4..460acad61b 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_lazy_list.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_lazy_list.cpp @@ -35,7 +35,7 @@ public: Value* DoGenerateGetValue(const TCodegenContext& ctx, BasicBlock*& block) const { auto& context = ctx.Codegen.GetContext(); const auto factory = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::LazyList)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::LazyList>()); const auto list = GetNodeValue(List, ctx, block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_listfromrange.cpp b/yql/essentials/minikql/comp_nodes/mkql_listfromrange.cpp index fab157dafb..3b58f2c304 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_listfromrange.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_listfromrange.cpp @@ -278,7 +278,7 @@ public: const auto timezone = TzDate ? GetterForTimezone(context, startv, block) : ConstantInt::get(Type::getInt16Ty(context), 0); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TListFromRangeWrapper::MakeList)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TListFromRangeWrapper::MakeList>()); const auto signature = FunctionType::get(valueType, {ctx.Ctx->getType(), start->getType(), end->getType(), step->getType(), timezone->getType()}, false); const auto creator = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(signature), "creator", block); const auto output = CallInst::Create(signature, creator, {ctx.Ctx, start, end, step, timezone}, "output", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_map.cpp b/yql/essentials/minikql/comp_nodes/mkql_map.cpp index ff014286e8..defa36147b 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_map.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_map.cpp @@ -388,7 +388,7 @@ public: { block = lazy; - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TListMapWrapper::MakeLazyList)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TListMapWrapper::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); const auto funType = FunctionType::get(list->getType() , {self->getType(), ctx.Ctx->getType(), list->getType()}, false); diff --git a/yql/essentials/minikql/comp_nodes/mkql_multimap.cpp b/yql/essentials/minikql/comp_nodes/mkql_multimap.cpp index 3a3f24e374..1a0639b9e9 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_multimap.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_multimap.cpp @@ -279,7 +279,7 @@ public: { block = lazy; - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TListMultiMapWrapper::MakeLazyList)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TListMultiMapWrapper::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); const auto funType = FunctionType::get(list->getType() , {self->getType(), ctx.Ctx->getType(), list->getType()}, false); diff --git a/yql/essentials/minikql/comp_nodes/mkql_prepend.cpp b/yql/essentials/minikql/comp_nodes/mkql_prepend.cpp index 0b29d724f3..f2b560c52f 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_prepend.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_prepend.cpp @@ -35,7 +35,7 @@ public: const auto factory = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::Prepend)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::Prepend>()); const auto left = GetNodeValue(Left, ctx, block); const auto right = GetNodeValue(Right, ctx, block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_reverse.cpp b/yql/essentials/minikql/comp_nodes/mkql_reverse.cpp index 692595f3a4..add639d82d 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_reverse.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_reverse.cpp @@ -34,7 +34,7 @@ public: const auto factory = new LoadInst(structPtrType, first, "factory", block); const auto builder = new LoadInst(structPtrType, fourth, "builder", block); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::ReverseList)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::ReverseList>()); const auto list = GetNodeValue(List, ctx, block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_skip.cpp b/yql/essentials/minikql/comp_nodes/mkql_skip.cpp index 9f33a1ae15..f29fcc0051 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_skip.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_skip.cpp @@ -256,7 +256,7 @@ public: const auto factory = ctx.GetFactory(); const auto builder = ctx.GetBuilder(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::SkipList)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::SkipList>()); const auto list = GetNodeValue(List, ctx, block); const auto cnt = GetNodeValue(Count, ctx, block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_squeeze_to_list.cpp b/yql/essentials/minikql/comp_nodes/mkql_squeeze_to_list.cpp index ca5e0cf547..548eb0937d 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_squeeze_to_list.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_squeeze_to_list.cpp @@ -104,7 +104,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSqueezeToListWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSqueezeToListWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), limit->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, limit, statePtr}, "", block); @@ -138,7 +138,7 @@ public: block = plus; - const auto push = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Put)); + const auto push = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Put>()); const auto arg = item; @@ -150,7 +150,7 @@ public: block = done; - const auto pull = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Pull)); + const auto pull = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Pull>()); const auto pullType = FunctionType::get(valueType, {stateArg->getType(), ctx.Ctx->getType()}, false); const auto pullPtr = CastInst::Create(Instruction::IntToPtr, pull, PointerType::getUnqual(pullType), "pull", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_switch.cpp b/yql/essentials/minikql/comp_nodes/mkql_switch.cpp index f8c9c2e460..10c7c29c34 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_switch.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_switch.cpp @@ -321,7 +321,7 @@ private: const auto pos = new LoadInst(indexType, posPtr, "pos", block); - const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TFlowState::Get)); + const auto getFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TFlowState::Get>()); const auto getType = FunctionType::get(valueType, {stateArg->getType(), pos->getType()}, false); const auto getPtr = CastInst::Create(Instruction::IntToPtr, getFunc, PointerType::getUnqual(getType), "get", block); @@ -386,7 +386,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSwitchFlowWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSwitchFlowWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -457,7 +457,7 @@ public: block = good; - const auto addFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TFlowState::Add)); + const auto addFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TFlowState::Add>()); const auto addArg = item; const auto addType = FunctionType::get(Type::getVoidTy(context), {stateArg->getType(), addArg->getType()}, false); const auto addPtr = CastInst::Create(Instruction::IntToPtr, addFunc, PointerType::getUnqual(addType), "add", block); @@ -470,7 +470,7 @@ public: new StoreInst(ConstantInt::get(indexType, 0), indexPtr, block); const auto stat = ctx.GetStat(); - const auto statFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TFlowState::PushStat)); + const auto statFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TFlowState::PushStat>()); const auto statType = FunctionType::get(Type::getVoidTy(context), {stateArg->getType(), stat->getType()}, false); const auto statPtr = CastInst::Create(Instruction::IntToPtr, statFunc, PointerType::getUnqual(statType), "stat", block); CallInst::Create(statType, statPtr, {stateArg, stat}, "", block); @@ -526,7 +526,7 @@ public: block = drop; - const auto clearFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TFlowState::Clear)); + const auto clearFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TFlowState::Clear>()); const auto clearType = FunctionType::get(Type::getInt1Ty(context), {stateArg->getType()}, false); const auto clearPtr = CastInst::Create(Instruction::IntToPtr, clearFunc, PointerType::getUnqual(clearType), "clear", block); CallInst::Create(clearType, clearPtr, {stateArg}, "", block); @@ -887,7 +887,7 @@ private: block = good; - const auto addFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TValueBase::Add)); + const auto addFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TValueBase::Add>()); const auto addType = FunctionType::get(Type::getVoidTy(context), {stateArg->getType(), itemPtr->getType()}, false); const auto addPtr = CastInst::Create(Instruction::IntToPtr, addFunc, PointerType::getUnqual(addType), "add", block); CallInst::Create(addType, addPtr, {stateArg, itemPtr}, "", block); @@ -897,7 +897,7 @@ private: block = done; - const auto resetFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TValueBase::Reset)); + const auto resetFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TValueBase::Reset>()); const auto resetType = FunctionType::get(Type::getVoidTy(context), {stateArg->getType()}, false); const auto resetPtr = CastInst::Create(Instruction::IntToPtr, resetFunc, PointerType::getUnqual(resetType), "reset", block); CallInst::Create(resetType, resetPtr, {stateArg}, "", block); @@ -915,7 +915,7 @@ private: ReturnInst::Create(context, ConstantInt::get(statusType, static_cast<ui32>(NUdf::EFetchStatus::Ok)), exit); new UnreachableInst(context, stub); - const auto nextFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TValueBase::Get)); + const auto nextFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TValueBase::Get>()); const auto nextType = FunctionType::get(Type::getInt1Ty(context), {stateArg->getType(), valuePtr->getType()}, false); const auto nextPtr = CastInst::Create(Instruction::IntToPtr, nextFunc, PointerType::getUnqual(nextType), "next", block); const auto has = CallInst::Create(nextType, nextPtr, {stateArg, valuePtr}, "has", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_take.cpp b/yql/essentials/minikql/comp_nodes/mkql_take.cpp index f2e9bc7023..cf5bf5c7e6 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_take.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_take.cpp @@ -259,7 +259,7 @@ public: const auto factory = ctx.GetFactory(); const auto builder = ctx.GetBuilder(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::TakeList)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::TakeList>()); const auto list = GetNodeValue(List, ctx, block); const auto cnt = GetNodeValue(Count, ctx, block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_todict.cpp b/yql/essentials/minikql/comp_nodes/mkql_todict.cpp index 10d0b4609c..738f88232a 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_todict.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_todict.cpp @@ -1026,7 +1026,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSqueezeSetFlowWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSqueezeSetFlowWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -1063,7 +1063,7 @@ public: codegenItemArg->CreateSetValue(ctx, block, item); const auto key = GetNodeValue(Key, ctx, block); - const auto insert = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Insert)); + const auto insert = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Insert>()); const auto keyArg = key; @@ -1075,7 +1075,7 @@ public: block = done; - const auto build = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Build)); + const auto build = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Build>()); const auto funType = FunctionType::get(valueType, {stateArg->getType()}, false); const auto funcPtr = CastInst::Create(Instruction::IntToPtr, build, PointerType::getUnqual(funType), "build", block); @@ -1207,7 +1207,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSqueezeSetWideWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSqueezeSetWideWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -1250,7 +1250,7 @@ public: const auto key = PasstroughKey ? getres.second[*PasstroughKey](ctx, block) : GetNodeValue(Key, ctx, block); - const auto insert = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Insert)); + const auto insert = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Insert>()); const auto keyArg = key; @@ -1262,7 +1262,7 @@ public: block = done; - const auto build = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Build)); + const auto build = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Build>()); const auto funType = FunctionType::get(valueType, {stateArg->getType()}, false); const auto funcPtr = CastInst::Create(Instruction::IntToPtr, build, PointerType::getUnqual(funType), "build", block); @@ -1520,7 +1520,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSqueezeMapFlowWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSqueezeMapFlowWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -1558,7 +1558,7 @@ public: const auto key = GetNodeValue(Key, ctx, block); const auto payload = GetNodeValue(Payload, ctx, block); - const auto insert = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Insert)); + const auto insert = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Insert>()); const auto keyArg = key; const auto payloadArg = payload; @@ -1571,7 +1571,7 @@ public: block = done; - const auto build = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Build)); + const auto build = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Build>()); const auto funType = FunctionType::get(valueType, {stateArg->getType()}, false); const auto funcPtr = CastInst::Create(Instruction::IntToPtr, build, PointerType::getUnqual(funType), "build", block); @@ -1709,7 +1709,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSqueezeMapWideWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSqueezeMapWideWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -1753,7 +1753,7 @@ public: const auto key = PasstroughKey ? getres.second[*PasstroughKey](ctx, block) : GetNodeValue(Key, ctx, block); const auto payload = PasstroughPayload ? getres.second[*PasstroughPayload](ctx, block) : GetNodeValue(Payload, ctx, block); - const auto insert = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Insert)); + const auto insert = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Insert>()); const auto keyArg = key; const auto payloadArg = payload; @@ -1766,7 +1766,7 @@ public: block = done; - const auto build = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Build)); + const auto build = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Build>()); const auto funType = FunctionType::get(valueType, {stateArg->getType()}, false); const auto funcPtr = CastInst::Create(Instruction::IntToPtr, build, PointerType::getUnqual(funType), "build", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_toindexdict.cpp b/yql/essentials/minikql/comp_nodes/mkql_toindexdict.cpp index 2bf6be6705..e17c87c45b 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_toindexdict.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_toindexdict.cpp @@ -34,7 +34,7 @@ public: const auto factory = new LoadInst(structPtrType, first, "factory", block); const auto builder = new LoadInst(structPtrType, fourth, "builder", block); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::ToIndexDict)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::ToIndexDict>()); const auto list = GetNodeValue(List, ctx, block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_tostring.cpp b/yql/essentials/minikql/comp_nodes/mkql_tostring.cpp index 130aaf00c5..8b294975b8 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_tostring.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_tostring.cpp @@ -105,7 +105,7 @@ public: } block = fail; - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TDecimalToStringWrapper::Throw)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TDecimalToStringWrapper::Throw>()); const auto doFuncType = FunctionType::get(Type::getVoidTy(context), {}, false); const auto doFuncPtr = CastInst::Create(Instruction::IntToPtr, doFunc, PointerType::getUnqual(doFuncType), "thrower", block); CallInst::Create(doFuncType, doFuncPtr, {}, "", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_udf.cpp b/yql/essentials/minikql/comp_nodes/mkql_udf.cpp index 2fd866b56f..c74c282d27 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_udf.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_udf.cpp @@ -177,7 +177,7 @@ public: block = make; - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TUdfWrapper::MakeUdf)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TUdfWrapper::MakeUdf>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), udfPtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, udfPtr}, "", block); @@ -193,7 +193,7 @@ public: ValueUnRef(RunConfigNode->GetRepresentation(), conf, ctx, block); - const auto wrap = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TUdfWrapper::Wrap)); + const auto wrap = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TUdfWrapper::Wrap>()); const auto funType = FunctionType::get(Type::getVoidTy(context), {self->getType(), pointer->getType()}, false); const auto doFuncPtr = CastInst::Create(Instruction::IntToPtr, wrap, PointerType::getUnqual(funType), "function", block); CallInst::Create(funType, doFuncPtr, {self, pointer}, "", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_unwrap.cpp b/yql/essentials/minikql/comp_nodes/mkql_unwrap.cpp index 87d0d776b0..307609aa08 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_unwrap.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_unwrap.cpp @@ -39,7 +39,7 @@ public: BranchInst::Create(kill, good, IsEmpty(value, block, context), block); block = kill; - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TUnwrapWrapper::Throw)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TUnwrapWrapper::Throw>()); const auto doFuncArg = ConstantInt::get(Type::getInt64Ty(context), (ui64)this); 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); diff --git a/yql/essentials/minikql/comp_nodes/mkql_while.cpp b/yql/essentials/minikql/comp_nodes/mkql_while.cpp index 233abf7e89..441d386fc8 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_while.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_while.cpp @@ -606,7 +606,7 @@ public: { block = lazy; - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TListWhileWrapper::MakeLazyList)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TListWhileWrapper::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); const auto funType = FunctionType::get(list->getType() , {self->getType(), ctx.Ctx->getType(), list->getType()}, false); diff --git a/yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp b/yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp index 85b4151d18..8a3052faa1 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp @@ -1097,7 +1097,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TWideCombinerWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TWideCombinerWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -1115,7 +1115,7 @@ public: const auto over = BasicBlock::Create(context, "over", ctx.Func); const auto result = PHINode::Create(statusType, 3U, "result", over); - const auto readMoreFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::ReadMore<SkipYields>)); + const auto readMoreFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::ReadMore<SkipYields>>()); const auto readMoreFuncType = FunctionType::get(Type::getInt1Ty(context), { statePtrType }, false); const auto readMoreFuncPtr = CastInst::Create(Instruction::IntToPtr, readMoreFunc, PointerType::getUnqual(readMoreFuncType), "read_more_func", block); const auto readMore = CallInst::Create(readMoreFuncType, readMoreFuncPtr, { stateArg }, "read_more", block); @@ -1238,7 +1238,7 @@ public: new StoreInst(key, keyPtr, block); } - const auto atFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::TasteIt)); + const auto atFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::TasteIt>()); const auto atType = FunctionType::get(Type::getInt1Ty(context), {stateArg->getType()}, false); const auto atPtr = CastInst::Create(Instruction::IntToPtr, atFunc, PointerType::getUnqual(atType), "function", block); const auto newKey = CallInst::Create(atType, atPtr, {stateArg}, "new_key", block); @@ -1355,7 +1355,7 @@ public: new StoreInst(getres.first, statusPtr, block); const auto stat = ctx.GetStat(); - const auto statFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::PushStat)); + const auto statFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::PushStat>()); const auto statType = FunctionType::get(Type::getVoidTy(context), {stateArg->getType(), stat->getType()}, false); const auto statPtr = CastInst::Create(Instruction::IntToPtr, statFunc, PointerType::getUnqual(statType), "stat", block); CallInst::Create(statType, statPtr, {stateArg, stat}, "", block); @@ -1368,7 +1368,7 @@ public: const auto good = BasicBlock::Create(context, "good", ctx.Func); - const auto extractFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Extract)); + const auto extractFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Extract>()); const auto extractType = FunctionType::get(ptrValueType, {stateArg->getType()}, false); const auto extractPtr = CastInst::Create(Instruction::IntToPtr, extractFunc, PointerType::getUnqual(extractType), "extract", block); const auto out = CallInst::Create(extractType, extractPtr, {stateArg}, "out", block); @@ -1567,7 +1567,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TWideLastCombinerWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TWideLastCombinerWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -1604,7 +1604,7 @@ public: block = more; - const auto updateFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSpillingSupportState::Update)); + const auto updateFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSpillingSupportState::Update>()); const auto updateType = FunctionType::get(wayType, {stateArg->getType()}, false); const auto updateFuncPtr = CastInst::Create(Instruction::IntToPtr, updateFunc, PointerType::getUnqual(updateType), "update_func", block); const auto update = CallInst::Create(updateType, updateFuncPtr, { stateArg }, "update", block); @@ -1693,7 +1693,7 @@ public: new StoreInst(key, keyPtr, block); } - const auto atFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSpillingSupportState::TasteIt)); + const auto atFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSpillingSupportState::TasteIt>()); const auto atType = FunctionType::get(wayType, {stateArg->getType()}, false); const auto atPtr = CastInst::Create(Instruction::IntToPtr, atFunc, PointerType::getUnqual(atType), "function", block); const auto taste= CallInst::Create(atType, atPtr, {stateArg}, "taste", block); @@ -1793,7 +1793,7 @@ public: block = fill; - const auto extractFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSpillingSupportState::Extract)); + const auto extractFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSpillingSupportState::Extract>()); const auto extractType = FunctionType::get(ptrValueType, {stateArg->getType()}, false); const auto extractPtr = CastInst::Create(Instruction::IntToPtr, extractFunc, PointerType::getUnqual(extractType), "extract", block); const auto out = CallInst::Create(extractType, extractPtr, {stateArg}, "out", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_wide_condense.cpp b/yql/essentials/minikql/comp_nodes/mkql_wide_condense.cpp index 621ac45fce..8aaee23fcf 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_wide_condense.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_wide_condense.cpp @@ -132,7 +132,7 @@ public: block = init; if constexpr (UseCtx) { - const auto cleanup = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&CleanupCurrentContext)); + const auto cleanup = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&CleanupCurrentContext>()); const auto cleanupType = FunctionType::get(Type::getVoidTy(context), {}, false); const auto cleanupPtr = CastInst::Create(Instruction::IntToPtr, cleanup, PointerType::getUnqual(cleanupType), "cleanup_ctx", block); CallInst::Create(cleanupType, cleanupPtr, {}, "", block); diff --git a/yql/essentials/minikql/comp_nodes/mkql_wide_top_sort.cpp b/yql/essentials/minikql/comp_nodes/mkql_wide_top_sort.cpp index ada394d9c7..def9de2b96 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_wide_top_sort.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_wide_top_sort.cpp @@ -453,7 +453,7 @@ public: const auto ptrType = PointerType::getUnqual(StructType::get(context)); const auto self = annotate(CastInst::Create(Instruction::IntToPtr, ConstantInt::get(Type::getInt64Ty(context), uintptr_t(this)), ptrType, "self", block)); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TWideTopWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TWideTopWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType(), trunc->getType(), dirs->getType()}, false); const auto makeFuncPtr = annotate(CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block)); annotate(CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr, trunc, dirs}, "", block)); @@ -496,7 +496,7 @@ public: block = rest; annotate(new StoreInst(ConstantInt::get(last->getType(), static_cast<i32>(EFetchResult::Finish)), statusPtr, block)); - const auto sealFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState<Sort>::Seal)); + const auto sealFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState<Sort>::Seal>()); const auto sealType = FunctionType::get(Type::getVoidTy(context), {stateArg->getType()}, false); const auto sealPtr = annotate(CastInst::Create(Instruction::IntToPtr, sealFunc, PointerType::getUnqual(sealType), "seal", block)); annotate(CallInst::Create(sealType, sealPtr, {stateArg}, "", block)); @@ -518,7 +518,7 @@ public: annotate(new StoreInst(item, placeholders[i], block)); } - const auto pushFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState<Sort>::Put)); + const auto pushFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState<Sort>::Put>()); const auto pushType = FunctionType::get(Type::getInt1Ty(context), {stateArg->getType()}, false); const auto pushPtr = annotate(CastInst::Create(Instruction::IntToPtr, pushFunc, PointerType::getUnqual(pushType), "function", block)); const auto accepted = annotate(CallInst::Create(pushType, pushPtr, {stateArg}, "accepted", block)); @@ -557,7 +557,7 @@ public: const auto good = BasicBlock::Create(context, "good", ctx.Func); - const auto extractFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState<Sort>::Extract)); + const auto extractFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState<Sort>::Extract>()); const auto extractType = FunctionType::get(outputPtrType, {stateArg->getType()}, false); const auto extractPtr = annotate(CastInst::Create(Instruction::IntToPtr, extractFunc, PointerType::getUnqual(extractType), "extract", block)); const auto out = annotate(CallInst::Create(extractType, extractPtr, {stateArg}, "out", block)); @@ -973,7 +973,7 @@ public: const auto ptrType = PointerType::getUnqual(StructType::get(context)); const auto self = annotate(CastInst::Create(Instruction::IntToPtr, ConstantInt::get(Type::getInt64Ty(context), uintptr_t(this)), ptrType, "self", block)); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TWideSortWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TWideSortWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType(), dirs->getType()}, false); const auto makeFuncPtr = annotate(CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block)); annotate(CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr, dirs}, "", block)); @@ -1007,7 +1007,7 @@ public: block = loop; - const auto readyFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSpillingSupportState::IsReadyToContinue)); + const auto readyFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSpillingSupportState::IsReadyToContinue>()); const auto readyPtr = annotate(CastInst::Create(Instruction::IntToPtr, readyFunc, PointerType::getUnqual(boolFuncType), "ready", block)); const auto process = annotate(CallInst::Create(boolFuncType, readyPtr, {stateArg}, "process", block)); @@ -1028,7 +1028,7 @@ public: block = rest; annotate(new StoreInst(ConstantInt::get(last->getType(), static_cast<i32>(EFetchResult::Finish)), statusPtr, block)); - const auto sealFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSpillingSupportState::Seal)); + const auto sealFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSpillingSupportState::Seal>()); const auto sealPtr = annotate(CastInst::Create(Instruction::IntToPtr, sealFunc, PointerType::getUnqual(boolFuncType), "seal", block)); const auto stop = annotate(CallInst::Create(boolFuncType, sealPtr, {stateArg}, "stop", block)); @@ -1052,7 +1052,7 @@ public: annotate(new StoreInst(item, placeholders[i], block)); } - const auto pushFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSpillingSupportState::Put)); + const auto pushFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSpillingSupportState::Put>()); const auto pushType = FunctionType::get(Type::getVoidTy(context), {stateArg->getType()}, false); const auto pushPtr = annotate(CastInst::Create(Instruction::IntToPtr, pushFunc, PointerType::getUnqual(pushType), "function", block)); annotate(CallInst::Create(pushType, pushPtr, {stateArg}, "", block)); @@ -1066,7 +1066,7 @@ public: const auto good = BasicBlock::Create(context, "good", ctx.Func); const auto last = BasicBlock::Create(context, "last", ctx.Func); - const auto extractFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSpillingSupportState::Extract)); + const auto extractFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSpillingSupportState::Extract>()); const auto extractType = FunctionType::get(outputPtrType, {stateArg->getType()}, false); const auto extractPtr = annotate(CastInst::Create(Instruction::IntToPtr, extractFunc, PointerType::getUnqual(extractType), "extract", block)); const auto out = annotate(CallInst::Create(extractType, extractPtr, {stateArg}, "out", block)); @@ -1083,7 +1083,7 @@ public: block = last; - const auto finishedFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TSpillingSupportState::IsFinished)); + const auto finishedFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TSpillingSupportState::IsFinished>()); const auto finishedPtr = annotate(CastInst::Create(Instruction::IntToPtr, finishedFunc, PointerType::getUnqual(boolFuncType), "finished_ptr", block)); const auto finished = annotate(CallInst::Create(boolFuncType, finishedPtr, {stateArg}, "finished", block)); const auto output = SelectInst::Create(finished, diff --git a/yql/essentials/minikql/comp_nodes/mkql_withcontext.cpp b/yql/essentials/minikql/comp_nodes/mkql_withcontext.cpp index 163f76e38c..f5c3884603 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_withcontext.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_withcontext.cpp @@ -121,7 +121,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TWithContextFlowWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TWithContextFlowWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -133,7 +133,7 @@ public: const auto half = CastInst::Create(Instruction::Trunc, state, Type::getInt64Ty(context), "half", block); const auto stateArg = CastInst::Create(Instruction::IntToPtr, half, statePtrType, "state_arg", block); - const auto attachFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Attach)); + const auto attachFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Attach>()); const auto attachFuncType = FunctionType::get(Type::getVoidTy(context), { statePtrType }, false); const auto attachFuncPtr = CastInst::Create(Instruction::IntToPtr, attachFunc, PointerType::getUnqual(attachFuncType), "attach", block); CallInst::Create(attachFuncType, attachFuncPtr, { stateArg }, "", block); @@ -141,7 +141,7 @@ public: const auto value = GetNodeValue(Flow, ctx, block); const auto finish = IsFinish(value, block, context); - const auto detachFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Detach)); + const auto detachFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Detach>()); const auto detachFuncType = FunctionType::get(Type::getVoidTy(context), { statePtrType, finish->getType() }, false); const auto detachFuncPtr = CastInst::Create(Instruction::IntToPtr, detachFunc, PointerType::getUnqual(detachFuncType), "detach", block); CallInst::Create(detachFuncType, detachFuncPtr, { stateArg, finish }, "", block); @@ -203,7 +203,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TWithContextWideFlowWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TWithContextWideFlowWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -215,7 +215,7 @@ public: const auto half = CastInst::Create(Instruction::Trunc, state, Type::getInt64Ty(context), "half", block); const auto stateArg = CastInst::Create(Instruction::IntToPtr, half, statePtrType, "state_arg", block); - const auto attachFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Attach)); + const auto attachFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Attach>()); const auto attachFuncType = FunctionType::get(Type::getVoidTy(context), { statePtrType }, false); const auto attachFuncPtr = CastInst::Create(Instruction::IntToPtr, attachFunc, PointerType::getUnqual(attachFuncType), "attach", block); CallInst::Create(attachFuncType, attachFuncPtr, { stateArg }, "", block); @@ -243,7 +243,7 @@ public: const auto finish = CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_EQ, getres.first, ConstantInt::get(getres.first->getType(), static_cast<i32>(EFetchResult::Finish)), "finish", block); - const auto detachFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TState::Detach)); + const auto detachFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TState::Detach>()); const auto detachFuncType = FunctionType::get(Type::getVoidTy(context), { statePtrType, finish->getType() }, false); const auto detachFuncPtr = CastInst::Create(Instruction::IntToPtr, detachFunc, PointerType::getUnqual(detachFuncType), "detach", block); CallInst::Create(detachFuncType, detachFuncPtr, { stateArg, finish }, "", block); diff --git a/yql/essentials/minikql/comp_nodes/ut/mkql_block_skiptake_ut.cpp b/yql/essentials/minikql/comp_nodes/ut/mkql_block_skiptake_ut.cpp index 0f4e6a0681..62054672f6 100644 --- a/yql/essentials/minikql/comp_nodes/ut/mkql_block_skiptake_ut.cpp +++ b/yql/essentials/minikql/comp_nodes/ut/mkql_block_skiptake_ut.cpp @@ -43,7 +43,7 @@ public: 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", atTop); - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TTestBlockFlowWrapper::DoCalculateImpl)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TTestBlockFlowWrapper::DoCalculateImpl>()); const auto doType = FunctionType::get(statusType, {self->getType(), ptrValueType, ctx.Ctx->getType(), ptrValueType, ptrValueType, ptrValueType}, false); const auto doFuncPtr = CastInst::Create(Instruction::IntToPtr, doFunc, PointerType::getUnqual(doType), "function", atTop); diff --git a/yql/essentials/minikql/computation/mkql_computation_node_codegen.cpp b/yql/essentials/minikql/computation/mkql_computation_node_codegen.cpp index 1b4984d1dc..72d1c5abfe 100644 --- a/yql/essentials/minikql/computation/mkql_computation_node_codegen.cpp +++ b/yql/essentials/minikql/computation/mkql_computation_node_codegen.cpp @@ -259,7 +259,7 @@ Value* GenEqualsFunction<false>(NUdf::EDataSlot slot, Value* lv, Value* rv, TCod const auto& info = NUdf::GetDataTypeInfo(slot); if ((info.Features & NUdf::EDataTypeFeatures::CommonType) && (info.Features & NUdf::EDataTypeFeatures::StringType || NUdf::EDataSlot::Uuid == slot || NUdf::EDataSlot::DyNumber == slot)) { - return CallBinaryUnboxedValueFunction(&MyEquteStrings, Type::getInt1Ty(context), lv, rv, ctx.Codegen, block); + return CallBinaryUnboxedValueFunction<&MyEquteStrings>(Type::getInt1Ty(context), lv, rv, ctx.Codegen, block); } const auto lhs = GetterFor(slot, lv, context, block); @@ -338,7 +338,7 @@ Value* GenCompareFunction<false>(NUdf::EDataSlot slot, Value* lv, Value* rv, TCo const auto& info = NUdf::GetDataTypeInfo(slot); if ((info.Features & NUdf::EDataTypeFeatures::CommonType) && (info.Features & NUdf::EDataTypeFeatures::StringType || NUdf::EDataSlot::Uuid == slot || NUdf::EDataSlot::DyNumber == slot)) { - return CallBinaryUnboxedValueFunction(&MyCompareStrings, Type::getInt32Ty(context), lv, rv, ctx.Codegen, block); + return CallBinaryUnboxedValueFunction<&MyCompareStrings>(Type::getInt32Ty(context), lv, rv, ctx.Codegen, block); } const bool extra = info.Features & (NUdf::EDataTypeFeatures::FloatType | NUdf::EDataTypeFeatures::TzDateType); @@ -507,7 +507,7 @@ Value* GenHashFunction<false>(NUdf::EDataSlot slot, Value* value, TCodegenContex const auto& info = NUdf::GetDataTypeInfo(slot); if ((info.Features & NUdf::EDataTypeFeatures::CommonType) && (info.Features & NUdf::EDataTypeFeatures::StringType || NUdf::EDataSlot::Uuid == slot || NUdf::EDataSlot::DyNumber == slot)) { - return CallUnaryUnboxedValueFunction(&MyHashString, Type::getInt64Ty(context), value, ctx.Codegen, block); + return CallUnaryUnboxedValueFunction<&MyHashString>(Type::getInt64Ty(context), value, ctx.Codegen, block); } const auto val = GetterFor(slot, value, context, block); @@ -1865,7 +1865,7 @@ Value* MakeVariant(Value* item, Value* variant, const TCodegenContext& ctx, Basi block = boxed; const auto factory = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::CreateBoxedVariantHolder)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::CreateBoxedVariantHolder>()); const auto signature = FunctionType::get(item->getType(), {factory->getType(), item->getType(), variant->getType()}, false); const auto creator = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(signature), "creator", block); @@ -1943,7 +1943,7 @@ ICodegeneratorInlineWideNode::TGenerateResult GetNodeValues(IComputationWideFlow Value* GenNewArray(const TCodegenContext& ctx, Value* size, Value* items, BasicBlock* block) { auto& context = ctx.Codegen.GetContext(); const auto fact = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::CreateDirectArrayHolder)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::CreateDirectArrayHolder>()); const auto valueType = Type::getInt128Ty(context); const auto funType = FunctionType::get(valueType, {fact->getType(), size->getType(), items->getType()}, false); const auto funcPtr = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(funType), "function", block); @@ -1957,7 +1957,7 @@ Value* GetMemoryUsed(ui64 limit, const TCodegenContext& ctx, BasicBlock* block) auto& context = ctx.Codegen.GetContext(); const auto fact = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::GetMemoryUsed)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::GetMemoryUsed>()); const auto funType = FunctionType::get(Type::getInt64Ty(context), {fact->getType()}, false); const auto funcPtr = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(funType), "get_used", block); return CallInst::Create(funType, funcPtr, {fact}, "mem_used", block); @@ -1987,7 +1987,7 @@ Value* CheckAdjustedMemLimit(ui64 limit, Value* init, const TCodegenContext& ctx BranchInst::Create(call, skip, now, block); block = call; - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TComputationContext::UpdateUsageAdjustor)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TComputationContext::UpdateUsageAdjustor>()); const auto funType = FunctionType::get(Type::getVoidTy(context), {ctx.Ctx->getType(), Type::getInt64Ty(context)}, false); const auto funcPtr = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(funType), "update", block); CallInst::Create(funType, funcPtr, {ctx.Ctx, ConstantInt::get(init->getType(), limit)}, "", block); diff --git a/yql/essentials/minikql/computation/mkql_computation_node_codegen.h.txt b/yql/essentials/minikql/computation/mkql_computation_node_codegen.h.txt index 8835b3b651..8baf51d82c 100644 --- a/yql/essentials/minikql/computation/mkql_computation_node_codegen.h.txt +++ b/yql/essentials/minikql/computation/mkql_computation_node_codegen.h.txt @@ -217,16 +217,16 @@ Value* CallBoxedValueVirtualMethod(Type* returnType, Value* value, NYql::NCodege Value* CallUnaryUnboxedValueFunctionImpl(uintptr_t methodPtr, Type* result, Value* arg, NYql::NCodegen::ICodegen& codegen, BasicBlock* block); -template<typename Method> -Value* CallUnaryUnboxedValueFunction(Method method, Type* result, Value* arg, NYql::NCodegen::ICodegen& codegen, BasicBlock* block) { - return CallUnaryUnboxedValueFunctionImpl(GetMethodPtr(method), result, arg, codegen, block); +template<auto Method> +Value* CallUnaryUnboxedValueFunction(Type* result, Value* arg, NYql::NCodegen::ICodegen& codegen, BasicBlock* block) { + return CallUnaryUnboxedValueFunctionImpl(GetMethodPtr<Method>(), result, arg, codegen, block); } Value* CallBinaryUnboxedValueFunctionImpl(uintptr_t methodPtr, Type* result, Value* left, Value* right, NYql::NCodegen::ICodegen& codegen, BasicBlock* block); -template<typename Method> -Value* CallBinaryUnboxedValueFunction(Method method, Type* result, Value* left, Value* right, NYql::NCodegen::ICodegen& codegen, BasicBlock* block) { - return CallBinaryUnboxedValueFunctionImpl(GetMethodPtr(method), result, left, right, codegen, block); +template<auto Method> +Value* CallBinaryUnboxedValueFunction(Type* result, Value* left, Value* right, NYql::NCodegen::ICodegen& codegen, BasicBlock* block) { + return CallBinaryUnboxedValueFunctionImpl(GetMethodPtr<Method>(), result, left, right, codegen, block); } void AddRefBoxed(Value* value, const TCodegenContext& ctx, BasicBlock*& block); @@ -589,10 +589,11 @@ protected: : TBase(mutables, kind) {} + public: Value* DoGenerateGetValue(const TCodegenContext& ctx, BasicBlock*& block) const { static_assert(std::is_same<std::invoke_result_t<decltype(&TDerived::DoCalculate), TDerived, TComputationContext&>, NUdf::TUnboxedValuePod>(), "DoCalculate must return pod!"); - return DoGenerateGetValueImpl(GetMethodPtr(&TDerived::DoCalculate), uintptr_t(this), ctx, block); + return DoGenerateGetValueImpl(GetMethodPtr<&TDerived::DoCalculate>(), uintptr_t(this), ctx, block); } }; diff --git a/yql/essentials/minikql/computation/mkql_computation_node_codegen_common.h b/yql/essentials/minikql/computation/mkql_computation_node_codegen_common.h index c6dd729eac..ab58cdf89d 100644 --- a/yql/essentials/minikql/computation/mkql_computation_node_codegen_common.h +++ b/yql/essentials/minikql/computation/mkql_computation_node_codegen_common.h @@ -5,4 +5,6 @@ #include <yql/essentials/minikql/codegen/codegen.h> #include <yql/essentials/utils/method_index.h> +#include <yql/essentials/minikql/computation/mkql_method_address_helper.h> + #include <type_traits> diff --git a/yql/essentials/minikql/computation/mkql_computation_node_holders_codegen.cpp b/yql/essentials/minikql/computation/mkql_computation_node_holders_codegen.cpp index cead70dec0..72f21b0c0a 100644 --- a/yql/essentials/minikql/computation/mkql_computation_node_holders_codegen.cpp +++ b/yql/essentials/minikql/computation/mkql_computation_node_holders_codegen.cpp @@ -123,7 +123,7 @@ Value* TContainerCacheOnContext::GenNewArray(ui64 sz, Value* items, const TCodeg const auto fact = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::CreateDirectArrayHolder)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::CreateDirectArrayHolder>()); const auto size = ConstantInt::get(Type::getInt64Ty(context), sz); const auto funType = FunctionType::get(valueType, {fact->getType(), size->getType(), items->getType()}, false); @@ -178,7 +178,7 @@ public: auto& context = ctx.Codegen.GetContext(); const auto valueType = Type::getInt128Ty(context); const auto factory = ctx.GetFactory(); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&THolderFactory::GetEmptyContainerLazy)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&THolderFactory::GetEmptyContainerLazy>()); const auto funType = FunctionType::get(valueType, {factory->getType()}, false); const auto funcPtr = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(funType), "function", block); diff --git a/yql/essentials/minikql/computation/mkql_method_address_helper.h b/yql/essentials/minikql/computation/mkql_method_address_helper.h new file mode 100644 index 0000000000..058e409897 --- /dev/null +++ b/yql/essentials/minikql/computation/mkql_method_address_helper.h @@ -0,0 +1,165 @@ +#include <yql/essentials/public/udf/udf_value.h> + +#if defined(_msan_enabled_) && defined(__linux__) + #define SHOULD_WRAP_ALL_UNBOXED_VALUES_FOR_CODEGEN 1 +#else + #define SHOULD_WRAP_ALL_UNBOXED_VALUES_FOR_CODEGEN 0 +#endif + +namespace NYql { + +// Concept that checks if a type is a free function. +template <typename T> +concept FunctionPointer = std::is_pointer_v<T> && + std::is_function_v<std::remove_pointer_t<T>>; + +// Concept that checks if a type is a pointer-to-member function. +template <typename T> +concept MethodPointer = std::is_member_function_pointer_v<T>; + +// When compling with msan you have to replace all NUdf::TUnboxedValuePod with __int128_t. +// See YQL-19520#67da4c599dd9e93523567aff for details. +// This helpers help to solve the problem by converting each NUdf::TUnboxedValuePod with __int128_t for passed method. +// For example: +// 1. You have a function +// NUdf::TUnboxedValuePod Func(OtherType a, NUdf::TUnboxedValuePod b) { +// ... +// } +// 2. You call GetMethodPtr<&Func>() +// 3. You recieve pointer to function that do something like this: +// __int128_t FuncWrapper(OtherType a, __int128_t b) { +// NUdf::TUnboxedValuePod realB; +// memcpy(&realB, &b, sizeof(b)); +// NUdf::TUnboxedValuePod result = Func(std::move(a), NUdf::TUnboxedValuePod(std::move(b))); +// __int128_t fakeResult; +// memcpy(&fakeResult, &result, sizeof(fakeResult)); +// return fakeResult; +// } + +#if SHOULD_WRAP_ALL_UNBOXED_VALUES_FOR_CODEGEN +template <FunctionPointer Method> +inline uintptr_t GetMethodPtrNumber(Method method) { + uintptr_t ptr; + std::memcpy(&ptr, &method, sizeof(uintptr_t)); + return ptr; +} + +template <typename T> +struct TReplaceUnboxedValuePodWithUInt128 { + using TType = T; +}; + +template <> +struct TReplaceUnboxedValuePodWithUInt128<NUdf::TUnboxedValuePod> { + using TType = __int128_t; +}; + +template <typename T> +using TReplaceUnboxedValuePodWithUInt128_t = + typename TReplaceUnboxedValuePodWithUInt128<T>::TType; + +template <typename TR, typename... TArgs> +struct TFunctionWrapper { + template <FunctionPointer auto function> + static TReplaceUnboxedValuePodWithUInt128_t<TR> Wrapper(TReplaceUnboxedValuePodWithUInt128_t<TArgs>... wargs) { + // Call the original function with converted parameters. + if constexpr (std::is_same_v<TR, void>) { + function(ConvertArg<TArgs>(TReplaceUnboxedValuePodWithUInt128_t<TArgs>(std::move(wargs)))...); + return; + } else { + return ConvertReturn<TR>(function(ConvertArg<TArgs>(TReplaceUnboxedValuePodWithUInt128_t<TArgs>(std::move(wargs)))...)); + } + } + +private: + template <typename T> + static T ConvertArg(TReplaceUnboxedValuePodWithUInt128_t<T> arg Y_LIFETIME_BOUND) { + if constexpr (std::is_same_v<std::remove_const_t<T>, NUdf::TUnboxedValuePod>) { + NUdf::TUnboxedValuePod tmp; + std::memcpy(&tmp, &arg, sizeof(T)); + return tmp; + } else { + return std::forward<TReplaceUnboxedValuePodWithUInt128_t<T>>(arg); + } + } + + template <typename T> + static TReplaceUnboxedValuePodWithUInt128_t<T> ConvertReturn(T arg Y_LIFETIME_BOUND) { + if constexpr (std::is_same_v<std::remove_const_t<T>, NUdf::TUnboxedValuePod>) { + __int128_t tmp; + std::memcpy(&tmp, &arg, sizeof(T)); + return tmp; + } else { + return std::forward<T>(arg); + } + } +}; + +template <FunctionPointer auto func, typename TR, typename... TArgs> +inline auto DoGetFreeFunctionPtrInternal() { + return &(TFunctionWrapper<TR, TArgs...>::template Wrapper<func>); +} + +template <FunctionPointer auto func> +inline auto DoGetFreeFunctionPtr() { + return []<typename TR, typename... TArgs>(TR (*fptr)(TArgs...)) { + Y_UNUSED(fptr, "For type deducing only."); + return DoGetFreeFunctionPtrInternal<func, TR, TArgs...>(); + }(func); +} + +template <FunctionPointer auto func> +inline auto GetMethodPtr() { + return GetMethodPtrNumber(DoGetFreeFunctionPtr<func>()); +} + +template <MethodPointer auto func, typename TR, typename TM, typename... TArgs> +inline TR Adapter(TM obj, TArgs&&... args) { + return (obj->*func)(std::forward<TArgs>(args)...); +} + +template <MethodPointer auto func, typename TR, typename TM, typename... TArgs> +inline auto GetMethodPtrImpl() { + return DoGetFreeFunctionPtrInternal<&Adapter<func, TR, TM, TArgs...>, TR, TM, TArgs...>(); +} + +template <typename T> +struct is_const_member_function_pointer: std::false_type {}; + +template <typename TR, typename TM, typename... TArgs> +struct is_const_member_function_pointer<TR (TM::*)(TArgs...) const>: std::true_type {}; + +template <MethodPointer auto func> +inline auto DoGetMethodPtr() { + // Just an template helper to get TArgs..., R, T from func. + if constexpr (is_const_member_function_pointer<decltype(func)>::value) { + return []<typename TR, typename TM, typename... TArgs>(TR (TM::*fptr)(TArgs...) const) { + Y_UNUSED(fptr); + return GetMethodPtrImpl<func, TR, TM*, TArgs...>(); + }(func); + } else { + return []<typename TR, typename TM, typename... TArgs>(TR (TM::*fptr)(TArgs...)) { + Y_UNUSED(fptr); + return GetMethodPtrImpl<func, TR, TM*, TArgs...>(); + }(func); + } +} + +template <MethodPointer auto func> +inline uintptr_t GetMethodPtr() { + return GetMethodPtrNumber(DoGetMethodPtr<func>()); +} +#else // SHOULD_WRAP_ALL_UNBOXED_VALUES_FOR_CODEGEN + +template <MethodPointer auto func> +inline uintptr_t GetMethodPtr() { + return GetMethodPtr(func); +} + +template <FunctionPointer auto func> +inline uintptr_t GetMethodPtr() { + return GetMethodPtr(func); +} +#endif // SHOULD_WRAP_ALL_UNBOXED_VALUES_FOR_CODEGEN + +} // namespace NYql diff --git a/yql/essentials/minikql/computation/mkql_method_address_helper_ut.cpp b/yql/essentials/minikql/computation/mkql_method_address_helper_ut.cpp new file mode 100644 index 0000000000..baef6a006d --- /dev/null +++ b/yql/essentials/minikql/computation/mkql_method_address_helper_ut.cpp @@ -0,0 +1,69 @@ +#include <yql/essentials/minikql/computation/mkql_method_address_helper.h> + +#include <library/cpp/testing/unittest/registar.h> +#include <yql/essentials/public/udf/udf_value.h> + +#if SHOULD_WRAP_ALL_UNBOXED_VALUES_FOR_CODEGEN +using namespace NYql; +namespace { +// Test class with methods to test method pointers +class TTestClass { +public: + int MethodWithUnboxedValuePod(NUdf::TUnboxedValuePod val) { + Y_UNUSED(val); + CallCount_++; + return 123; + } + + NUdf::TUnboxedValuePod& ConstMethodWithUnboxedValuePod(NUdf::TUnboxedValuePod val) const { + Y_UNUSED(val); + CallCount_++; + return UnboxedValuePod_; + } + + size_t CallCount() const { + return CallCount_; + } + +private: + mutable size_t CallCount_ = 0; + mutable NUdf::TUnboxedValuePod UnboxedValuePod_; +}; + +NUdf::TUnboxedValuePod FunctionWithUnboxedValuePod(NUdf::TUnboxedValuePod val, NUdf::TUnboxedValuePod& val2, int a, const int& b, int* c, int&& d) { + Y_UNUSED(val2, a, b, c, d); + return val; +} +} // namespace + +Y_UNIT_TEST_SUITE(TestMethodConvertion) { + +Y_UNIT_TEST(TestFreeFunction) { + __int128_t (*actualMethod)(__int128_t, NUdf::TUnboxedValuePod&, int a, const int& b, int* c, int&& d) = DoGetFreeFunctionPtr<&FunctionWithUnboxedValuePod>(); + Y_UNUSED(actualMethod); + auto address = GetMethodPtr<&FunctionWithUnboxedValuePod>(); + NUdf::TUnboxedValuePod a; + UNIT_ASSERT_EQUAL(reinterpret_cast<decltype(actualMethod)>(address)(13, a, 1, 2, nullptr, 3), 13); +} + +Y_UNIT_TEST(TestConstMethod) { + TTestClass testClass; + NUdf::TUnboxedValuePod& (*actualMethod)(TTestClass*, __int128_t) = DoGetMethodPtr<&TTestClass::ConstMethodWithUnboxedValuePod>(); + Y_UNUSED(actualMethod(&testClass, 123)); + UNIT_ASSERT_EQUAL(testClass.CallCount(), 1); +} + +Y_UNIT_TEST(TestNonConstMethod) { + TTestClass testClass; + int (*actualMethod)(TTestClass*, __int128_t) = DoGetMethodPtr<&TTestClass::MethodWithUnboxedValuePod>(); + Y_UNUSED(actualMethod); + actualMethod(&testClass, 123); + UNIT_ASSERT_EQUAL(testClass.CallCount(), 1); + auto address = GetMethodPtr<&TTestClass::MethodWithUnboxedValuePod>(); + UNIT_ASSERT(reinterpret_cast<decltype(actualMethod)>(address)(&testClass, 123)); + UNIT_ASSERT_EQUAL(testClass.CallCount(), 2); +} + +} // Y_UNIT_TEST_SUITE(TestMethodConvertion) + +#endif // SHOULD_WRAP_ALL_UNBOXED_VALUES_FOR_CODEGEN diff --git a/yql/essentials/minikql/computation/mkql_simple_codegen.h b/yql/essentials/minikql/computation/mkql_simple_codegen.h index ab8438b176..1294abe06c 100644 --- a/yql/essentials/minikql/computation/mkql_simple_codegen.h +++ b/yql/essentials/minikql/computation/mkql_simple_codegen.h @@ -91,9 +91,9 @@ protected: : TBase(mutables, source, StateKind) , TLLVMBase(source, inWidth, outWidth, { .ThisPtr = reinterpret_cast<uintptr_t>(this), - .InitStateMethPtr = GetMethodPtr(&TDerived::InitState), - .PrepareInputMethPtr = GetMethodPtr(&TDerived::PrepareInput), - .DoProcessMethPtr = GetMethodPtr(&TDerived::DoProcess) + .InitStateMethPtr = GetMethodPtr<&TDerived::InitState>(), + .PrepareInputMethPtr = GetMethodPtr<&TDerived::PrepareInput>(), + .DoProcessMethPtr = GetMethodPtr<&TDerived::DoProcess>() }) {} #ifndef MKQL_DISABLE_CODEGEN @@ -123,4 +123,4 @@ public: }; } -}
\ No newline at end of file +} diff --git a/yql/essentials/minikql/computation/ut/ya.make.inc b/yql/essentials/minikql/computation/ut/ya.make.inc index 1f7ae7d6dc..969083f969 100644 --- a/yql/essentials/minikql/computation/ut/ya.make.inc +++ b/yql/essentials/minikql/computation/ut/ya.make.inc @@ -24,6 +24,7 @@ SRCS( mkql_value_builder_ut.cpp presort_ut.cpp mkql_vector_spiller_adapter_ut.cpp + mkql_method_address_helper_ut.cpp ) PEERDIR( diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_concat.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_concat.cpp index ae486e29ca..a6a8ce174b 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_concat.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_concat.cpp @@ -16,7 +16,7 @@ struct TConcat { #ifndef MKQL_DISABLE_CODEGEN static Value* Generate(Value* left, Value* right, const TCodegenContext& ctx, BasicBlock*& block) { - return CallBinaryUnboxedValueFunction(&ConcatStrings, Type::getInt128Ty(ctx.Codegen.GetContext()), left, right, ctx.Codegen, block); + return CallBinaryUnboxedValueFunction<&ConcatStrings>(Type::getInt128Ty(ctx.Codegen.GetContext()), left, right, ctx.Codegen, block); } #endif }; diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_convert.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_convert.cpp index 0f2a676190..622a13d0a3 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_convert.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_convert.cpp @@ -591,7 +591,7 @@ struct TJsonToJsonDocumentConvert { static Value* Generate(Value* json, const TCodegenContext& ctx, BasicBlock*& block) { auto& context = ctx.Codegen.GetContext(); - const auto functionAddress = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(JsonToJsonDocument)); + const auto functionAddress = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&JsonToJsonDocument>()); const auto functionType = FunctionType::get(json->getType(), {json->getType()}, /* isVarArg */ false); const auto functionPtr = CastInst::Create(Instruction::IntToPtr, functionAddress, PointerType::getUnqual(functionType), "func", block); return CallInst::Create(functionType, functionPtr, {json}, "jsonToJsonDocument", block); @@ -614,7 +614,7 @@ struct TJsonDocumentToJsonConvert { static Value* Generate(Value* jsonDocument, const TCodegenContext& ctx, BasicBlock*& block) { auto& context = ctx.Codegen.GetContext(); - const auto functionAddress = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(JsonDocumentToJson)); + const auto functionAddress = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&JsonDocumentToJson>()); const auto functionType = FunctionType::get(jsonDocument->getType(), {jsonDocument->getType()}, /* isVarArg */ false); const auto functionPtr = CastInst::Create(Instruction::IntToPtr, functionAddress, PointerType::getUnqual(functionType), "func", block); return CallInst::Create(functionType, functionPtr, {jsonDocument}, "jsonDocumentToJson", block); diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_equals.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_equals.cpp index 859c4971a5..2aae5b4ff6 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_equals.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_equals.cpp @@ -225,7 +225,7 @@ struct TCustomEquals : public TAggrEquals { static Value* Generate(Value* left, Value* right, const TCodegenContext& ctx, BasicBlock*& block) { auto& context = ctx.Codegen.GetContext(); - const auto res = CallBinaryUnboxedValueFunction(&CompareCustoms<Slot>, Type::getInt32Ty(context), left, right, ctx.Codegen, block); + const auto res = CallBinaryUnboxedValueFunction<&CompareCustoms<Slot>>(Type::getInt32Ty(context), left, right, ctx.Codegen, block); const auto comp = CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_EQ, res, ConstantInt::get(res->getType(), 0), "equals", block); ValueCleanup(EValueRepresentation::String, left, ctx, block); ValueCleanup(EValueRepresentation::String, right, ctx, block); diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_find.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_find.cpp index 6a9120c302..5eeaf30d1a 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_find.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_find.cpp @@ -26,7 +26,7 @@ struct TFind { static Value* Generate(Value* string, Value* sub, Value* p, const TCodegenContext& ctx, BasicBlock*& block) { auto& context = ctx.Codegen.GetContext(); - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(Find<Reverse>)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&Find<Reverse>>()); const auto pos = PosOptional ? SelectInst::Create( IsEmpty(p, block, context), diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_greater.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_greater.cpp index c9988dd091..a7f185792e 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_greater.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_greater.cpp @@ -220,7 +220,7 @@ struct TCustomGreater : public TAggrGreater { static Value* Generate(Value* left, Value* right, const TCodegenContext& ctx, BasicBlock*& block) { auto& context = ctx.Codegen.GetContext(); - const auto res = CallBinaryUnboxedValueFunction(&CompareCustoms<Slot>, Type::getInt32Ty(context), left, right, ctx.Codegen, block); + const auto res = CallBinaryUnboxedValueFunction<&CompareCustoms<Slot>>(Type::getInt32Ty(context), left, right, ctx.Codegen, block); const auto comp = CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_SGT, res, ConstantInt::get(res->getType(), 0), "greater", block); ValueCleanup(EValueRepresentation::String, left, ctx, block); ValueCleanup(EValueRepresentation::String, right, ctx, block); diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_greater_or_equal.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_greater_or_equal.cpp index 5e44168ac1..99f18d5d29 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_greater_or_equal.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_greater_or_equal.cpp @@ -220,7 +220,7 @@ struct TCustomGreaterOrEqual : public TAggrGreaterOrEqual { static Value* Generate(Value* left, Value* right, const TCodegenContext& ctx, BasicBlock*& block) { auto& context = ctx.Codegen.GetContext(); - const auto res = CallBinaryUnboxedValueFunction(&CompareCustoms<Slot>, Type::getInt32Ty(context), left, right, ctx.Codegen, block); + const auto res = CallBinaryUnboxedValueFunction<&CompareCustoms<Slot>>(Type::getInt32Ty(context), left, right, ctx.Codegen, block); const auto comp = CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_SGE, res, ConstantInt::get(res->getType(), 0), "greater_or_equal", block); ValueCleanup(EValueRepresentation::String, left, ctx, block); ValueCleanup(EValueRepresentation::String, right, ctx, block); diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_invprestr.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_invprestr.cpp index 7796995be8..f17078aa8e 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_invprestr.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_invprestr.cpp @@ -43,7 +43,7 @@ struct TInversePresortString { #ifndef MKQL_DISABLE_CODEGEN static Value* Generate(Value* arg, const TCodegenContext& ctx, BasicBlock*& block) { - return CallUnaryUnboxedValueFunction(&Presort, Type::getInt128Ty(ctx.Codegen.GetContext()), arg, ctx.Codegen, block); + return CallUnaryUnboxedValueFunction<&Presort>(Type::getInt128Ty(ctx.Codegen.GetContext()), arg, ctx.Codegen, block); } #endif }; @@ -58,7 +58,7 @@ struct TInverseString { #ifndef MKQL_DISABLE_CODEGEN static Value* Generate(Value* arg, const TCodegenContext& ctx, BasicBlock*& block) { - return CallUnaryUnboxedValueFunction(&Inverse, Type::getInt128Ty(ctx.Codegen.GetContext()), arg, ctx.Codegen, block); + return CallUnaryUnboxedValueFunction<&Inverse>(Type::getInt128Ty(ctx.Codegen.GetContext()), arg, ctx.Codegen, block); } #endif }; diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_less.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_less.cpp index 9b0cc0a1cd..2bb7274c3a 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_less.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_less.cpp @@ -220,7 +220,7 @@ struct TCustomLess : public TAggrLess { static Value* Generate(Value* left, Value* right, const TCodegenContext& ctx, BasicBlock*& block) { auto& context = ctx.Codegen.GetContext(); - const auto res = CallBinaryUnboxedValueFunction(&CompareCustoms<Slot>, Type::getInt32Ty(context), left, right, ctx.Codegen, block); + const auto res = CallBinaryUnboxedValueFunction<&CompareCustoms<Slot>>(Type::getInt32Ty(context), left, right, ctx.Codegen, block); const auto comp = CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_SLT, res, ConstantInt::get(res->getType(), 0), "less", block); ValueCleanup(EValueRepresentation::String, left, ctx, block); ValueCleanup(EValueRepresentation::String, right, ctx, block); diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_less_or_equal.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_less_or_equal.cpp index bfe6f9178a..732e8e1004 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_less_or_equal.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_less_or_equal.cpp @@ -220,7 +220,7 @@ struct TCustomLessOrEqual : public TAggrLessOrEqual { static Value* Generate(Value* left, Value* right, const TCodegenContext& ctx, BasicBlock*& block) { auto& context = ctx.Codegen.GetContext(); - const auto res = CallBinaryUnboxedValueFunction(&CompareCustoms<Slot>, Type::getInt32Ty(context), left, right, ctx.Codegen, block); + const auto res = CallBinaryUnboxedValueFunction<&CompareCustoms<Slot>>(Type::getInt32Ty(context), left, right, ctx.Codegen, block); const auto comp = CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_SLE, res, ConstantInt::get(res->getType(), 0), "less_or_equal", block); ValueCleanup(EValueRepresentation::String, left, ctx, block); ValueCleanup(EValueRepresentation::String, right, ctx, block); diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_max.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_max.cpp index e94ba11691..d3b83322db 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_max.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_max.cpp @@ -181,7 +181,7 @@ struct TCustomMax { static Value* Generate(Value* left, Value* right, const TCodegenContext& ctx, BasicBlock*& block) { auto& context = ctx.Codegen.GetContext(); - const auto res = CallBinaryUnboxedValueFunction(&CompareCustoms<Slot>, Type::getInt32Ty(context), left, right, ctx.Codegen, block); + const auto res = CallBinaryUnboxedValueFunction<&CompareCustoms<Slot>>(Type::getInt32Ty(context), left, right, ctx.Codegen, block); const auto comp = CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_SLT, res, ConstantInt::get(res->getType(), 0), "less", block); const auto min = SelectInst::Create(comp, left, right, "min", block); ValueCleanup(EValueRepresentation::String, min, ctx, block); diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_min.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_min.cpp index b07c5162b3..90c5727e30 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_min.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_min.cpp @@ -180,7 +180,7 @@ struct TCustomMin { static Value* Generate(Value* left, Value* right, const TCodegenContext& ctx, BasicBlock*& block) { auto& context = ctx.Codegen.GetContext(); - const auto res = CallBinaryUnboxedValueFunction(&CompareCustoms<Slot>, Type::getInt32Ty(context), left, right, ctx.Codegen, block); + const auto res = CallBinaryUnboxedValueFunction<&CompareCustoms<Slot>>(Type::getInt32Ty(context), left, right, ctx.Codegen, block); const auto comp = CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_SGT, res, ConstantInt::get(res->getType(), 0), "greater", block); const auto max = SelectInst::Create(comp, left, right, "max", block); ValueCleanup(EValueRepresentation::String, max, ctx, block); diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_not_equals.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_not_equals.cpp index c1d1c7eca7..dbf75908ed 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_not_equals.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_not_equals.cpp @@ -225,7 +225,7 @@ struct TCustomNotEquals : public TAggrNotEquals { static Value* Generate(Value* left, Value* right, const TCodegenContext& ctx, BasicBlock*& block) { auto& context = ctx.Codegen.GetContext(); - const auto res = CallBinaryUnboxedValueFunction(&CompareCustoms<Slot>, Type::getInt32Ty(context), left, right, ctx.Codegen, block); + const auto res = CallBinaryUnboxedValueFunction<&CompareCustoms<Slot>>(Type::getInt32Ty(context), left, right, ctx.Codegen, block); const auto comp = CmpInst::Create(Instruction::ICmp, ICmpInst::ICMP_NE, res, ConstantInt::get(res->getType(), 0), "not_equals", block); ValueCleanup(EValueRepresentation::String, left, ctx, block); ValueCleanup(EValueRepresentation::String, right, ctx, block); diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_substring.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_substring.cpp index 8a0c6f6f58..b851d64bbd 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_substring.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_substring.cpp @@ -20,7 +20,7 @@ struct TSubString { static Value* Generate(Value* string, Value* st, Value* cn, const TCodegenContext& ctx, BasicBlock*& block) { auto& context = ctx.Codegen.GetContext(); - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(SubString)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&SubString>()); const auto start = StartOptional ? SelectInst::Create( IsEmpty(st, block, context), diff --git a/yql/essentials/minikql/invoke_builtins/mkql_builtins_with.cpp b/yql/essentials/minikql/invoke_builtins/mkql_builtins_with.cpp index 60927c0e18..62649c5f7d 100644 --- a/yql/essentials/minikql/invoke_builtins/mkql_builtins_with.cpp +++ b/yql/essentials/minikql/invoke_builtins/mkql_builtins_with.cpp @@ -28,7 +28,7 @@ struct TStringWith { static Value* Generate(Value* string, Value* sub, const TCodegenContext& ctx, BasicBlock*& block) { auto& context = ctx.Codegen.GetContext(); - const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(StringFunc)); + const auto doFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<StringFunc>()); const auto funType = FunctionType::get(string->getType(), {string->getType(), sub->getType()}, false); const auto funcPtr = CastInst::Create(Instruction::IntToPtr, doFunc, PointerType::getUnqual(funType), "func", block); const auto result = CallInst::Create(funType, funcPtr, {string, sub}, "has", block); diff --git a/yql/essentials/utils/method_index.cpp b/yql/essentials/utils/method_index.cpp index 030dbc3111..16dd0e520b 100644 --- a/yql/essentials/utils/method_index.cpp +++ b/yql/essentials/utils/method_index.cpp @@ -1,4 +1,5 @@ #include "method_index.h" + #include <util/generic/yexception.h> #include <util/string/hex.h> diff --git a/yql/essentials/utils/method_index.h b/yql/essentials/utils/method_index.h index 6539fd3a3d..4668d558f3 100644 --- a/yql/essentials/utils/method_index.h +++ b/yql/essentials/utils/method_index.h @@ -1,4 +1,5 @@ #pragma once + #include <util/system/platform.h> #include <cstring> #include <cstdint> @@ -21,4 +22,4 @@ inline uintptr_t GetMethodPtr(Method method) { return ptr; } -}
\ No newline at end of file +} diff --git a/yql/essentials/utils/ya.make b/yql/essentials/utils/ya.make index 8d4d279b95..769428e355 100644 --- a/yql/essentials/utils/ya.make +++ b/yql/essentials/utils/ya.make @@ -49,12 +49,12 @@ SRCS( ) PEERDIR( + contrib/libs/miniselect library/cpp/time_provider library/cpp/digest/md5 library/cpp/string_utils/quote library/cpp/threading/future library/cpp/deprecated/atomic - contrib/libs/miniselect ) END() diff --git a/yt/yql/providers/yt/comp_nodes/dq/dq_yt_reader_impl.h b/yt/yql/providers/yt/comp_nodes/dq/dq_yt_reader_impl.h index af6f9462e1..dedea97996 100644 --- a/yt/yql/providers/yt/comp_nodes/dq/dq_yt_reader_impl.h +++ b/yt/yql/providers/yt/comp_nodes/dq/dq_yt_reader_impl.h @@ -142,7 +142,7 @@ public: block = make; const auto self = CastInst::Create(Instruction::IntToPtr, ConstantInt::get(Type::getInt64Ty(context), uintptr_t(static_cast<const TDqYtReadWrapperBase<T, IS>*>(this))), structPtrType, "self", block); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TDqYtReadWrapperBase<T, IS>::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TDqYtReadWrapperBase<T, IS>::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); diff --git a/yt/yql/providers/yt/comp_nodes/dq/dq_yt_writer.cpp b/yt/yql/providers/yt/comp_nodes/dq/dq_yt_writer.cpp index b9b41f9c67..cc0642d4e6 100644 --- a/yt/yql/providers/yt/comp_nodes/dq/dq_yt_writer.cpp +++ b/yt/yql/providers/yt/comp_nodes/dq/dq_yt_writer.cpp @@ -131,7 +131,7 @@ public: 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); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TYtDqWideWriteWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TYtDqWideWriteWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -163,7 +163,7 @@ public: const auto half = CastInst::Create(Instruction::Trunc, state, Type::getInt64Ty(context), "half", block); const auto stateArg = CastInst::Create(Instruction::IntToPtr, half, structPtrType, "state_arg", block); - const auto addFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TWriterState::AddRow)); + const auto addFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TWriterState::AddRow>()); const auto addType = FunctionType::get(Type::getVoidTy(context), {stateArg->getType(), values->getType()}, false); const auto addPtr = CastInst::Create(Instruction::IntToPtr, addFunc, PointerType::getUnqual(addType), "write", block); CallInst::Create(addType, addPtr, {stateArg, values}, "", block); diff --git a/yt/yql/providers/yt/comp_nodes/yql_mkql_input.cpp b/yt/yql/providers/yt/comp_nodes/yql_mkql_input.cpp index 21f48060eb..c6d0086bc0 100644 --- a/yt/yql/providers/yt/comp_nodes/yql_mkql_input.cpp +++ b/yt/yql/providers/yt/comp_nodes/yql_mkql_input.cpp @@ -222,7 +222,7 @@ public: block = make; const auto self = CastInst::Create(Instruction::IntToPtr, ConstantInt::get(Type::getInt64Ty(context), uintptr_t(static_cast<const TYtBaseInputWrapper*>(this))), structPtrType, "self", block); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TYtFlowInputWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TYtFlowInputWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -234,7 +234,7 @@ public: const auto half = CastInst::Create(Instruction::Trunc, state, Type::getInt64Ty(context), "half", block); const auto stateArg = CastInst::Create(Instruction::IntToPtr, half, statePtrType, "state_arg", block); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TInputStateBase::FetchRecord)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TInputStateBase::FetchRecord>()); const auto funcType = FunctionType::get(valueType, { statePtrType }, false); const auto funcPtr = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(funcType), "fetch_func", block); const auto fetch = CallInst::Create(funcType, funcPtr, { stateArg }, "fetch", block); @@ -305,7 +305,7 @@ public: block = make; const auto self = CastInst::Create(Instruction::IntToPtr, ConstantInt::get(Type::getInt64Ty(context), uintptr_t(static_cast<const TYtBaseInputWrapper*>(this))), structPtrType, "self", block); - const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TYtWideInputWrapper::MakeState)); + const auto makeFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TYtWideInputWrapper::MakeState>()); const auto makeType = FunctionType::get(Type::getVoidTy(context), {self->getType(), ctx.Ctx->getType(), statePtr->getType()}, false); const auto makeFuncPtr = CastInst::Create(Instruction::IntToPtr, makeFunc, PointerType::getUnqual(makeType), "function", block); CallInst::Create(makeType, makeFuncPtr, {self, ctx.Ctx, statePtr}, "", block); @@ -317,7 +317,7 @@ public: const auto half = CastInst::Create(Instruction::Trunc, state, Type::getInt64Ty(context), "half", block); const auto stateArg = CastInst::Create(Instruction::IntToPtr, half, statePtrType, "state_arg", block); - const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TInputStateBase::FetchRecord)); + const auto func = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TInputStateBase::FetchRecord>()); const auto funcType = FunctionType::get(valueType, { statePtrType }, false); const auto funcPtr = CastInst::Create(Instruction::IntToPtr, func, PointerType::getUnqual(funcType), "fetch_func", block); const auto fetch = CallInst::Create(funcType, funcPtr, { stateArg }, "fetch", block); diff --git a/yt/yql/providers/yt/comp_nodes/yql_mkql_output.cpp b/yt/yql/providers/yt/comp_nodes/yql_mkql_output.cpp index 1448c77e37..1dfffcf0f5 100644 --- a/yt/yql/providers/yt/comp_nodes/yql_mkql_output.cpp +++ b/yt/yql/providers/yt/comp_nodes/yql_mkql_output.cpp @@ -25,7 +25,7 @@ public: Value* DoGenerateGetValue(const TCodegenContext& ctx, Value* item, BasicBlock*& block) const { auto& context = ctx.Codegen.GetContext(); if (true /*|| TODO: !Writer.GenAddRow(item, ctx, block)*/) { - const auto addFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr(&TYtOutputWrapper::AddRowImpl)); + const auto addFunc = ConstantInt::get(Type::getInt64Ty(context), GetMethodPtr<&TYtOutputWrapper::AddRowImpl>()); const auto selfArg = ConstantInt::get(Type::getInt64Ty(context), ui64(this)); const auto arg = item; const auto addType = FunctionType::get(Type::getVoidTy(context), {selfArg->getType(), arg->getType()}, false); |