mkql_builtins_codegen.h.txt 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #include <yql/essentials/minikql/computation/mkql_computation_node_codegen.h>
  3. #include <yql/essentials/minikql/codegen/codegen.h>
  4. namespace NKikimr {
  5. namespace NMiniKQL {
  6. #ifndef MKQL_DISABLE_CODEGEN
  7. using namespace llvm;
  8. using TUnaryGenFunc = Value* (*)(Value*, const TCodegenContext&, BasicBlock*&);
  9. using TBinaryGenFunc = Value* (*)(Value*, Value*, const TCodegenContext&, BasicBlock*&);
  10. using TTernaryGenFunc = Value* (*)(Value*, Value*, Value*, const TCodegenContext&, BasicBlock*&);
  11. Value* GenerateUnaryWithoutCheck(Value* arg, const TCodegenContext& ctx, BasicBlock*& block, TUnaryGenFunc generator);
  12. Value* GenerateUnaryWithCheck(Value* arg, const TCodegenContext& ctx, BasicBlock*& block, TUnaryGenFunc generator);
  13. template<bool CheckLeft, bool CheckRight>
  14. Value* GenerateBinary(Value* lhs, Value* rhs, const TCodegenContext& ctx, BasicBlock*& block, TBinaryGenFunc generator);
  15. Value* GenerateAggregate(Value* lhs, Value* rhs, const TCodegenContext& ctx, BasicBlock*& block, TBinaryGenFunc generator);
  16. Value* GenerateCompareAggregate(Value* lhs, Value* rhs, const TCodegenContext& ctx, BasicBlock*& block, TBinaryGenFunc generator, CmpInst::Predicate simple);
  17. template<bool CheckFirst>
  18. Value* GenerateTernary(Value* first, Value* second, Value* third, const TCodegenContext& ctx, BasicBlock*& block, TTernaryGenFunc generator);
  19. template<typename T>
  20. std::string GetFuncNameForType(const char* name);
  21. #endif
  22. }
  23. }