19 #include <llvm/IR/Value.h>
21 #include "../Analyzer/Analyzer.h"
43 const bool fetch_columns,
51 const std::vector<StringOps_Namespace::StringOpInfo>& string_op_infos,
56 const std::vector<const Analyzer::Constant*>& constants,
76 llvm::Value*
toBool(llvm::Value*);
82 const std::vector<llvm::Function*>& roots,
83 const std::vector<llvm::Function*>& leaves);
87 const std::unordered_set<llvm::Function*>& live_funcs,
90 static std::string
generatePTX(
const std::string& cuda_llir,
91 llvm::TargetMachine* nvptx_target_machine,
92 llvm::LLVMContext& context);
107 llvm::Module& module,
108 llvm::PassManagerBuilder& pass_manager_builder,
113 llvm::Function* func,
114 llvm::Function* wrapper_func,
115 const std::unordered_set<llvm::Function*>& live_funcs,
116 const bool is_gpu_smem_used,
120 static void link_udf_module(
const std::unique_ptr<llvm::Module>& udf_module,
121 llvm::Module& module,
126 std::vector<Analyzer::Expr*>& primary_quals,
127 std::vector<Analyzer::Expr*>& deferred_quals,
132 : std::runtime_error(
"Executor required to generate this expression") {}
138 llvm::Value* nullable_lv,
140 const std::string&
name =
"");
142 llvm::Value*
finalize(llvm::Value* null_lv, llvm::Value* notnull_lv);
159 const bool nullable);
163 llvm::Value* pos_arg);
172 const bool fetch_column,
183 std::vector<llvm::Value*>,
201 const bool operand_is_const,
237 const std::shared_ptr<AbstractMLModel>& model,
241 const std::shared_ptr<AbstractTreeModel>& tree_model,
260 const bool fetch_columns,
279 std::vector<llvm::Value*>,
283 std::vector<llvm::Value*>,
288 const std::vector<std::shared_ptr<Analyzer::Expr>>&,
306 const int16_t lit_off,
307 const size_t lit_bytes);
312 const int16_t lit_off,
313 const std::vector<llvm::Value*>& literal_loads);
316 const bool fetch_column,
317 const bool update_query_plan,
322 llvm::Value* col_byte_stream,
323 llvm::Value* pos_arg,
329 llvm::Value* col_byte_stream,
330 llvm::Value* pos_arg,
335 llvm::Value* col_byte_stream,
336 llvm::Value* pos_arg);
345 const bool fetch_column,
357 const bool nullable);
361 const bool nullable);
366 const bool operand_is_const,
372 const bool operand_is_const,
386 const std::string& null_typename,
387 const std::string& null_check_suffix,
394 const std::string& null_typename,
395 const std::string& null_check_suffix,
401 llvm::BasicBlock* no_overflow_bb,
407 const std::string& null_typename,
408 const std::string& null_check_suffix,
411 bool downscale =
true);
415 const std::string& null_typename,
416 const std::string& null_check_suffix,
418 bool upscale =
true);
424 const std::string& null_typename,
425 const std::string& null_check_suffix,
430 const bool is_real_str,
450 const std::shared_ptr<Analyzer::Expr>,
451 const std::shared_ptr<Analyzer::Expr>,
456 const std::shared_ptr<Analyzer::Expr>,
457 const std::shared_ptr<Analyzer::Expr>,
462 std::vector<llvm::Value*>,
469 llvm::Value*
codegenDictLike(
const std::shared_ptr<Analyzer::Expr> arg,
472 const bool is_simple,
473 const char escape_char,
477 const std::shared_ptr<Analyzer::Expr>,
483 const char escape_char,
493 const bool fetch_column,
494 const bool hoist_literals);
519 const std::vector<llvm::Value*>& orig_arg_lvs);
527 const std::vector<llvm::Value*>&);
532 llvm::Value* row_pos,
534 bool cast_and_extend);
538 llvm::Value* buffer_buf,
539 llvm::Value* buffer_size,
540 llvm::Value* buffer_is_null,
541 std::vector<llvm::Value*>& output_args);
548 llvm::Value* point_buf,
549 llvm::Value* point_size,
550 llvm::Value* compression,
551 llvm::Value* input_srid,
552 llvm::Value* output_srid,
553 std::vector<llvm::Value*>& output_args);
560 llvm::Value* multi_point_buf,
561 llvm::Value* multi_point_size,
563 llvm::Value* compression,
564 llvm::Value* input_srid,
565 llvm::Value* output_srid,
566 std::vector<llvm::Value*>& output_args);
573 llvm::Value* line_string_buf,
574 llvm::Value* line_string_size,
575 llvm::Value* compression,
576 llvm::Value* input_srid,
577 llvm::Value* output_srid,
578 std::vector<llvm::Value*>& output_args);
585 llvm::Value* multi_linestring_coords,
586 llvm::Value* multi_linestring_size,
587 llvm::Value* linestring_sizes,
588 llvm::Value* linestring_sizes_size,
590 llvm::Value* compression,
591 llvm::Value* input_srid,
592 llvm::Value* output_srid,
593 std::vector<llvm::Value*>& output_args);
600 llvm::Value* polygon_buf,
601 llvm::Value* polygon_size,
602 llvm::Value* ring_sizes_buf,
603 llvm::Value* num_rings,
604 llvm::Value* compression,
605 llvm::Value* input_srid,
606 llvm::Value* output_srid,
607 std::vector<llvm::Value*>& output_args);
614 llvm::Value* polygon_coords,
615 llvm::Value* polygon_coords_size,
616 llvm::Value* ring_sizes_buf,
617 llvm::Value* ring_sizes,
618 llvm::Value* polygon_bounds,
619 llvm::Value* polygon_bounds_sizes,
620 llvm::Value* compression,
621 llvm::Value* input_srid,
622 llvm::Value* output_srid,
623 std::vector<llvm::Value*>& output_args);
628 const std::vector<llvm::Value*>&,
629 const std::vector<size_t>&,
630 const std::unordered_map<llvm::Value*, llvm::Value*>&,
647 const std::string& null_check_suffix,
650 std::pair<std::vector<llvm::Value*>, std::unique_ptr<CodeGenerator::NullCheckCodegen>>
653 const size_t arg_idx,
654 const bool codegen_nullcheck);
692 std::vector<std::shared_ptr<Analyzer::ColumnVar>>
inputs;
698 const bool fetch_columns,
712 std::unordered_map<InputColDescriptor, std::shared_ptr<Analyzer::ColumnVar>>;
716 const bool fetch_column,
724 llvm::Function* func,
725 llvm::Function* wrapper_func,
747 llvm::Value* byte_stream_arg,
748 llvm::IRBuilder<>& ir_builder,
749 llvm::LLVMContext& ctx);
llvm::StructType * createLineStringStructType(const std::string &udf_func_name, size_t param_num)
void codegenGeoMultiPolygonArgs(const std::string &udf_func_name, size_t param_num, llvm::Value *polygon_coords, llvm::Value *polygon_coords_size, llvm::Value *ring_sizes_buf, llvm::Value *ring_sizes, llvm::Value *polygon_bounds, llvm::Value *polygon_bounds_sizes, llvm::Value *compression, llvm::Value *input_srid, llvm::Value *output_srid, std::vector< llvm::Value * > &output_args)
llvm::Value * codegenIntArith(const Analyzer::BinOper *, llvm::Value *, llvm::Value *, const CompilationOptions &)
llvm::Value * codegenPerRowStringOper(const Analyzer::StringOper *string_oper, const CompilationOptions &co)
CompiledExpression compile(const Analyzer::Expr *expr, const bool fetch_columns, const CompilationOptions &co)
NullCheckCodegen(CgenState *cgen_state, Executor *executor, llvm::Value *nullable_lv, const SQLTypeInfo &nullable_ti, const std::string &name="")
llvm::BasicBlock * orig_bb
llvm::Value * codegenCastFromFp(llvm::Value *operand_lv, const SQLTypeInfo &operand_ti, const SQLTypeInfo &ti)
std::vector< llvm::Value * > codegenColumn(const Analyzer::ColumnVar *, const bool fetch_column, const CompilationOptions &) override
llvm::Value * codegenStrCmp(const SQLOps, const SQLQualifier, const std::shared_ptr< Analyzer::Expr >, const std::shared_ptr< Analyzer::Expr >, const CompilationOptions &)
llvm::Value * codegenConstantWidthBucketExpr(const Analyzer::WidthBucketExpr *, const CompilationOptions &)
std::unique_ptr< llvm::Module > runtime_module_shallow_copy(CgenState *cgen_state)
llvm::BasicBlock * args_notnull_bb
llvm::BasicBlock * nullcheck_bb
std::unique_ptr< PlanState > own_plan_state_
llvm::Value * codegenTreeRegPredict(const Analyzer::MLPredictExpr *, const std::shared_ptr< AbstractTreeModel > &tree_model, const CompilationOptions &)
llvm::Value * codegenArith(const Analyzer::BinOper *, const CompilationOptions &)
ExecutionEngineWrapper execution_engine_
void codegenGeoPolygonArgs(const std::string &udf_func_name, size_t param_num, llvm::Value *polygon_buf, llvm::Value *polygon_size, llvm::Value *ring_sizes_buf, llvm::Value *num_rings, llvm::Value *compression, llvm::Value *input_srid, llvm::Value *output_srid, std::vector< llvm::Value * > &output_args)
llvm::Value * codegenCastNonStringToString(llvm::Value *operand_lv, const SQLTypeInfo &operand_ti, const SQLTypeInfo &ti, const bool operand_is_const, const CompilationOptions &co)
llvm::Value * codegenRowId(const Analyzer::ColumnVar *col_var, const CompilationOptions &co)
llvm::StructType * createMultiPointStructType(const std::string &udf_func_name, size_t param_num)
std::vector< llvm::Value * > codegenFunctionOperCastArgs(const Analyzer::FunctionOper *, const ExtensionFunction *, const std::vector< llvm::Value * > &, const std::vector< size_t > &, const std::unordered_map< llvm::Value *, llvm::Value * > &, const CompilationOptions &)
llvm::StructType * createMultiLineStringStructType(const std::string &udf_func_name, size_t param_num)
llvm::Value * codegenMod(llvm::Value *, llvm::Value *, const std::string &null_typename, const std::string &null_check_suffix, const SQLTypeInfo &)
llvm::Value * codegenFunctionOperNullArg(const Analyzer::FunctionOper *, const std::vector< llvm::Value * > &)
std::vector< llvm::Value * > codegenOuterJoinNullPlaceholder(const Analyzer::ColumnVar *col_var, const bool fetch_column, const CompilationOptions &co)
std::unique_ptr< llvm::TargetMachine > nvptx_target_machine_
llvm::Value * posArg(const Analyzer::Expr *) const
std::shared_ptr< GpuCompilationContext > gpu_compilation_context_
llvm::Value * castArrayPointer(llvm::Value *ptr, const SQLTypeInfo &elem_ti)
llvm::Value * codegenCastToFp(llvm::Value *operand_lv, const SQLTypeInfo &operand_ti, const SQLTypeInfo &ti)
llvm::Value * codgenAdjustFixedEncNull(llvm::Value *, const SQLTypeInfo &)
llvm::Value * codegenPseudoStringOper(const Analyzer::ColumnVar *, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos, const CompilationOptions &)
llvm::Value * foundOuterJoinMatch(const size_t nesting_level) const
llvm::Value * codegenExtractHighPrecisionTimestamps(llvm::Value *, const SQLTypeInfo &, const ExtractField &)
llvm::StructType * createPointStructType(const std::string &udf_func_name, size_t param_num)
virtual std::vector< llvm::Value * > codegenColumn(const Analyzer::ColumnVar *, const bool fetch_column, const CompilationOptions &)
std::unordered_set< std::shared_ptr< Analyzer::Expr >> HoistedFiltersSet
llvm::Value * codegenDeciDiv(const Analyzer::BinOper *, const CompilationOptions &)
std::vector< llvm::Value * > codegenHoistedConstants(const std::vector< const Analyzer::Constant * > &constants, const EncodingType enc_type, const shared::StringDictKey &dict_id)
static ExecutionEngineWrapper generateNativeCPUCode(llvm::Function *func, const std::unordered_set< llvm::Function * > &live_funcs, const CompilationOptions &co)
llvm::Value * codegenArrayAt(const Analyzer::BinOper *, const CompilationOptions &)
llvm::Value * codegenLinRegPredict(const Analyzer::MLPredictExpr *, const std::shared_ptr< AbstractMLModel > &model, const CompilationOptions &)
std::unordered_map< InputColDescriptor, std::shared_ptr< Analyzer::ColumnVar >> ColumnMap
static std::string generatePTX(const std::string &cuda_llir, llvm::TargetMachine *nvptx_target_machine, llvm::LLVMContext &context)
std::vector< llvm::Value * > codegenGeoBinOper(const Analyzer::GeoBinOper *, const CompilationOptions &)
llvm::Function * wrapper_func
const CudaMgr_Namespace::CudaMgr * cuda_mgr
void codegenBufferArgs(const std::string &udf_func_name, size_t param_num, llvm::Value *buffer_buf, llvm::Value *buffer_size, llvm::Value *buffer_is_null, std::vector< llvm::Value * > &output_args)
std::unique_ptr< CudaMgr_Namespace::CudaMgr > cuda_mgr_
llvm::Value * codegenFpArith(const Analyzer::BinOper *, llvm::Value *, llvm::Value *)
llvm::Value * codegenIsNull(const Analyzer::UOper *, const CompilationOptions &)
llvm::TargetMachine * nvptx_target_machine
std::pair< llvm::Value *, llvm::Value * > codegenArrayBuff(llvm::Value *chunk, llvm::Value *row_pos, SQLTypes array_type, bool cast_and_extend)
std::shared_ptr< const Analyzer::Expr > hashJoinLhs(const Analyzer::ColumnVar *rhs) const
llvm::Value * codegenWindowPosition(const WindowFunctionContext *window_func_context, llvm::Value *pos_arg)
CudaMgr_Namespace::CudaMgr * getCudaMgr() const
std::vector< llvm::Value * > codegenGeoExpr(const Analyzer::GeoExpr *, const CompilationOptions &)
llvm::Value * codegenDiv(llvm::Value *, llvm::Value *, const std::string &null_typename, const std::string &null_check_suffix, const SQLTypeInfo &, bool upscale=true)
llvm::Value * codegenCmpDecimalConst(const SQLOps, const SQLQualifier, const Analyzer::Expr *, const SQLTypeInfo &, const Analyzer::Expr *, const CompilationOptions &)
std::tuple< ArgNullcheckBBs, llvm::Value * > beginArgsNullcheck(const Analyzer::FunctionOper *function_oper, const std::vector< llvm::Value * > &orig_arg_lvs)
std::vector< llvm::Value * > codegenGeoOperator(const Analyzer::GeoOperator *, const CompilationOptions &)
static std::unordered_set< llvm::Function * > markDeadRuntimeFuncs(llvm::Module &module, const std::vector< llvm::Function * > &roots, const std::vector< llvm::Function * > &leaves)
std::vector< llvm::Value * > codegenGeoUOper(const Analyzer::GeoUOper *, const CompilationOptions &)
void codegenSkipOverflowCheckForNull(llvm::Value *lhs_lv, llvm::Value *rhs_lv, llvm::BasicBlock *no_overflow_bb, const SQLTypeInfo &ti)
std::vector< llvm::Value * > codegenHoistedConstantsLoads(const SQLTypeInfo &type_info, const EncodingType enc_type, const shared::StringDictKey &dict_id, const int16_t lit_off, const size_t lit_bytes)
std::vector< llvm::Value * > codegenHoistedConstantsPlaceholders(const SQLTypeInfo &type_info, const EncodingType enc_type, const int16_t lit_off, const std::vector< llvm::Value * > &literal_loads)
CodeGenerator(Executor *executor)
void codegenGeoMultiPointArgs(const std::string &udf_func_name, size_t param_num, llvm::Value *multi_point_buf, llvm::Value *multi_point_size, llvm::Value *compression, llvm::Value *input_srid, llvm::Value *output_srid, std::vector< llvm::Value * > &output_args)
llvm::Value * codegenBinOpWithOverflowForCPU(const Analyzer::BinOper *bin_oper, llvm::Value *lhs_lv, llvm::Value *rhs_lv, const std::string &null_check_suffix, const SQLTypeInfo &ti)
llvm::Value * codegenWidthBucketExpr(const Analyzer::WidthBucketExpr *, const CompilationOptions &)
llvm::Value * codegenFunctionOper(const Analyzer::FunctionOper *, const CompilationOptions &)
llvm::Value * codegenCastBetweenIntTypes(llvm::Value *operand_lv, const SQLTypeInfo &operand_ti, const SQLTypeInfo &ti, bool upscale=true)
bool row_func_not_inlined
llvm::Value * codegenDictStrCmp(const std::shared_ptr< Analyzer::Expr >, const std::shared_ptr< Analyzer::Expr >, const SQLOps, const CompilationOptions &co)
llvm::Value * codegenCastTimestampToDate(llvm::Value *ts_lv, const int dimen, const bool nullable)
static void link_udf_module(const std::unique_ptr< llvm::Module > &udf_module, llvm::Module &module, CgenState *cgen_state, llvm::Linker::Flags flags=llvm::Linker::Flags::None)
std::vector< llvm::Value * > codegenArrayExpr(const Analyzer::ArrayExpr *, const CompilationOptions &)
llvm::Value * codegenDictRegexp(const std::shared_ptr< Analyzer::Expr > arg, const Analyzer::Constant *pattern, const char escape_char, const CompilationOptions &)
llvm::BasicBlock * args_null_bb
void codegenGeoMultiLineStringArgs(const std::string &udf_func_name, size_t param_num, llvm::Value *multi_linestring_coords, llvm::Value *multi_linestring_size, llvm::Value *linestring_sizes, llvm::Value *linestring_sizes_size, llvm::Value *compression, llvm::Value *input_srid, llvm::Value *output_srid, std::vector< llvm::Value * > &output_args)
llvm::Function * getArithWithOverflowIntrinsic(const Analyzer::BinOper *bin_oper, llvm::Type *type)
std::vector< llvm::Value * > codegenColVar(const Analyzer::ColumnVar *, const bool fetch_column, const bool update_query_plan, const CompilationOptions &)
llvm::PHINode * nullcheck_value
ScalarCodeGenerator(std::unique_ptr< llvm::Module > llvm_module)
std::vector< llvm::Value * > codegenGeosConstructorCall(const std::string &, std::vector< llvm::Value * >, llvm::Value *, const CompilationOptions &)
llvm::Value * codegenUMinus(const Analyzer::UOper *, const CompilationOptions &)
static std::mutex initialize_cpu_backend_mutex_
void codegenGeoPointArgs(const std::string &udf_func_name, size_t param_num, llvm::Value *point_buf, llvm::Value *point_size, llvm::Value *compression, llvm::Value *input_srid, llvm::Value *output_srid, std::vector< llvm::Value * > &output_args)
std::vector< llvm::Value * > codegen(const Analyzer::Expr *, const bool fetch_columns, const CompilationOptions &)
static llvm::ConstantInt * codegenIntConst(const Analyzer::Constant *constant, CgenState *cgen_state)
Expression class for string functions The "arg" constructor parameter must be an expression that reso...
std::vector< llvm::Value * > codegenGeosPredicateCall(const std::string &, std::vector< llvm::Value * >, const CompilationOptions &)
llvm::StructType * createPolygonStructType(const std::string &udf_func_name, size_t param_num)
static std::shared_ptr< GpuCompilationContext > generateNativeGPUCode(Executor *executor, llvm::Function *func, llvm::Function *wrapper_func, const std::unordered_set< llvm::Function * > &live_funcs, const bool is_gpu_smem_used, const CompilationOptions &co, const GPUTarget &gpu_target)
llvm::Value * codegenQualifierCmp(const SQLOps, const SQLQualifier, std::vector< llvm::Value * >, const Analyzer::Expr *, const CompilationOptions &)
llvm::Value * codegenFixedLengthColVarInWindow(const Analyzer::ColumnVar *col_var, llvm::Value *col_byte_stream, llvm::Value *pos_arg, const CompilationOptions &co, const WindowFunctionContext *window_function_context=nullptr)
llvm::Value * endArgsNullcheck(const ArgNullcheckBBs &, llvm::Value *, llvm::Value *, const Analyzer::FunctionOper *)
llvm::Value * codegenSub(const Analyzer::BinOper *, llvm::Value *, llvm::Value *, const std::string &null_typename, const std::string &null_check_suffix, const SQLTypeInfo &, const CompilationOptions &)
void codegenCastBetweenIntTypesOverflowChecks(llvm::Value *operand_lv, const SQLTypeInfo &operand_ti, const SQLTypeInfo &ti, const int64_t scale)
static bool alwaysCloneRuntimeFunction(const llvm::Function *func)
ColumnMap prepare(const Analyzer::Expr *)
static ArrayLoadCodegen codegenGeoArrayLoadAndNullcheck(llvm::Value *byte_stream, llvm::Value *pos, const SQLTypeInfo &ti, CgenState *cgen_state)
llvm::StructType * createStringViewStructType()
std::unique_ptr< CgenState > own_cgen_state_
llvm::Value * codegenCase(const Analyzer::CaseExpr *, llvm::Type *case_llvm_type, const bool is_real_str, const CompilationOptions &)
std::vector< llvm::Value * > generate_column_heads_load(const int num_columns, llvm::Value *byte_stream_arg, llvm::IRBuilder<> &ir_builder, llvm::LLVMContext &ctx)
llvm::Value * codegenBoundingBoxIntersect(const SQLOps, const SQLQualifier, const std::shared_ptr< Analyzer::Expr >, const std::shared_ptr< Analyzer::Expr >, const CompilationOptions &)
static void linkModuleWithLibdevice(Executor *executor, llvm::Module &module, llvm::PassManagerBuilder &pass_manager_builder, const GPUTarget &gpu_target)
llvm::Value * toBool(llvm::Value *)
std::vector< llvm::Value * > codegenGeoColumnVar(const Analyzer::GeoColumnVar *, const bool fetch_columns, const CompilationOptions &co)
static bool prioritizeQuals(const RelAlgExecutionUnit &ra_exe_unit, std::vector< Analyzer::Expr * > &primary_quals, std::vector< Analyzer::Expr * > &deferred_quals, const PlanState::HoistedFiltersSet &hoisted_quals)
std::vector< void * > generateNativeGPUCode(Executor *executor, llvm::Function *func, llvm::Function *wrapper_func, const CompilationOptions &co)
llvm::Value * codegenFunctionOperWithCustomTypeHandling(const Analyzer::FunctionOperWithCustomTypeHandling *, const CompilationOptions &)
llvm::Value * codegenCmp(const Analyzer::BinOper *, const CompilationOptions &)
bool needCastForHashJoinLhs(const Analyzer::ColumnVar *rhs) const
llvm::Value * codegenCastBetweenTimestamps(llvm::Value *ts_lv, const SQLTypeInfo &operand_dimen, const SQLTypeInfo &target_dimen, const bool nullable)
std::pair< std::vector< llvm::Value * >, std::unique_ptr< CodeGenerator::NullCheckCodegen > > codegenStringFetchAndEncode(const Analyzer::StringOper *expr, const CompilationOptions &co, const size_t arg_idx, const bool codegen_nullcheck)
llvm::Value * codegenUnnest(const Analyzer::UOper *, const CompilationOptions &)
std::vector< llvm::Value * > codegenGeoArgs(const std::vector< std::shared_ptr< Analyzer::Expr >> &, const CompilationOptions &)
llvm::Value * finalize(llvm::Value *null_lv, llvm::Value *notnull_lv)
llvm::Value * colByteStream(const Analyzer::ColumnVar *col_var, const bool fetch_column, const bool hoist_literals)
llvm::Value * codegenIsNullNumber(llvm::Value *, const SQLTypeInfo &)
llvm::Value * codegenLogical(const Analyzer::BinOper *, const CompilationOptions &)
std::unique_ptr< llvm::Module > module_
llvm::Value * codegenCompression(const SQLTypeInfo &type_info)
llvm::Value * codegenCastTimestampToTime(llvm::Value *ts_lv, const int dimen, const bool nullable)
std::vector< llvm::Value * > codegenGeoConstant(const Analyzer::GeoConstant *, const CompilationOptions &)
std::vector< std::shared_ptr< Analyzer::ColumnVar > > inputs
llvm::Value * codegenCastFromString(llvm::Value *operand_lv, const SQLTypeInfo &operand_ti, const SQLTypeInfo &ti, const bool operand_is_const, const CompilationOptions &co)
CodeGenerator(CgenState *cgen_state, PlanState *plan_state)
llvm::Value * codegenCast(const Analyzer::UOper *, const CompilationOptions &)
llvm::Value * codegenDateTruncHighPrecisionTimestamps(llvm::Value *, const SQLTypeInfo &, const DatetruncField &)
std::unique_ptr< InValuesBitmap > createInValuesBitmap(const Analyzer::InValues *, const CompilationOptions &)
llvm::Value * codegenMul(const Analyzer::BinOper *, llvm::Value *, llvm::Value *, const std::string &null_typename, const std::string &null_check_suffix, const SQLTypeInfo &, const CompilationOptions &, bool downscale=true)
std::shared_ptr< const Analyzer::ColumnVar > hashJoinLhsTuple(const Analyzer::ColumnVar *rhs, const Analyzer::BinOper *tautological_eq) const
llvm::Value * codegenFixedLengthColVar(const Analyzer::ColumnVar *col_var, llvm::Value *col_byte_stream, llvm::Value *pos_arg, const WindowFunctionContext *window_function_context=nullptr)
std::vector< llvm::Value * > codegenVariableLengthStringColVar(llvm::Value *col_byte_stream, llvm::Value *pos_arg)
std::vector< void * > generateNativeCode(Executor *executor, const CompiledExpression &compiled_expression, const CompilationOptions &co)
void codegenGeoLineStringArgs(const std::string &udf_func_name, size_t param_num, llvm::Value *line_string_buf, llvm::Value *line_string_size, llvm::Value *compression, llvm::Value *input_srid, llvm::Value *output_srid, std::vector< llvm::Value * > &output_args)
llvm::Value * codegenAdd(const Analyzer::BinOper *, llvm::Value *, llvm::Value *, const std::string &null_typename, const std::string &null_check_suffix, const SQLTypeInfo &, const CompilationOptions &)
bool checkExpressionRanges(const Analyzer::UOper *, int64_t, int64_t)
llvm::Value * codegenLogicalShortCircuit(const Analyzer::BinOper *, const CompilationOptions &)
std::unique_ptr< DiamondCodegen > null_check
static std::unique_ptr< llvm::TargetMachine > initializeNVPTXBackend(const CudaMgr_Namespace::NvidiaDeviceArch arch)
llvm::Value * resolveGroupedColumnReference(const Analyzer::ColumnVar *)
llvm::Value * codegenDictLike(const std::shared_ptr< Analyzer::Expr > arg, const Analyzer::Constant *pattern, const bool ilike, const bool is_simple, const char escape_char, const CompilationOptions &)
static std::mutex initialize_nvptx_mutex_
Executor * executor() const
llvm::StructType * createMultiPolygonStructType(const std::string &udf_func_name, size_t param_num)