OmniSciDB
a5dc49c757
|
#include <CodeGenerator.h>
Classes | |
struct | ArgNullcheckBBs |
struct | ExecutorRequired |
struct | GPUTarget |
struct | NullCheckCodegen |
Public Member Functions | |
CodeGenerator (Executor *executor) | |
CodeGenerator (CgenState *cgen_state, PlanState *plan_state) | |
std::vector< llvm::Value * > | codegen (const Analyzer::Expr *, const bool fetch_columns, const CompilationOptions &) |
llvm::Value * | codegenPerRowStringOper (const Analyzer::StringOper *string_oper, const CompilationOptions &co) |
llvm::Value * | codegenPseudoStringOper (const Analyzer::ColumnVar *, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos, const CompilationOptions &) |
std::vector< llvm::Value * > | codegenHoistedConstants (const std::vector< const Analyzer::Constant * > &constants, const EncodingType enc_type, const shared::StringDictKey &dict_id) |
llvm::Value * | codegenCastBetweenIntTypes (llvm::Value *operand_lv, const SQLTypeInfo &operand_ti, const SQLTypeInfo &ti, bool upscale=true) |
void | codegenCastBetweenIntTypesOverflowChecks (llvm::Value *operand_lv, const SQLTypeInfo &operand_ti, const SQLTypeInfo &ti, const int64_t scale) |
llvm::Value * | posArg (const Analyzer::Expr *) const |
llvm::Value * | toBool (llvm::Value *) |
llvm::Value * | castArrayPointer (llvm::Value *ptr, const SQLTypeInfo &elem_ti) |
llvm::Value * | codegenCastBetweenTimestamps (llvm::Value *ts_lv, const SQLTypeInfo &operand_dimen, const SQLTypeInfo &target_dimen, const bool nullable) |
llvm::Value * | codegenWindowPosition (const WindowFunctionContext *window_func_context, llvm::Value *pos_arg) |
Static Public Member Functions | |
static llvm::ConstantInt * | codegenIntConst (const Analyzer::Constant *constant, CgenState *cgen_state) |
static std::unordered_set < llvm::Function * > | markDeadRuntimeFuncs (llvm::Module &module, const std::vector< llvm::Function * > &roots, const std::vector< llvm::Function * > &leaves) |
static ExecutionEngineWrapper | generateNativeCPUCode (llvm::Function *func, const std::unordered_set< llvm::Function * > &live_funcs, const CompilationOptions &co) |
static std::string | generatePTX (const std::string &cuda_llir, llvm::TargetMachine *nvptx_target_machine, llvm::LLVMContext &context) |
static std::unique_ptr < llvm::TargetMachine > | initializeNVPTXBackend (const CudaMgr_Namespace::NvidiaDeviceArch arch) |
static bool | alwaysCloneRuntimeFunction (const llvm::Function *func) |
static void | linkModuleWithLibdevice (Executor *executor, llvm::Module &module, llvm::PassManagerBuilder &pass_manager_builder, const GPUTarget &gpu_target) |
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) |
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) |
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) |
static ArrayLoadCodegen | codegenGeoArrayLoadAndNullcheck (llvm::Value *byte_stream, llvm::Value *pos, const SQLTypeInfo &ti, CgenState *cgen_state) |
Protected Member Functions | |
Executor * | executor () const |
Protected Attributes | |
CgenState * | cgen_state_ |
PlanState * | plan_state_ |
Private Member Functions | |
std::vector< llvm::Value * > | codegen (const Analyzer::Constant *, const EncodingType enc_type, const shared::StringDictKey &dict_id, const CompilationOptions &) |
virtual std::vector < llvm::Value * > | codegenColumn (const Analyzer::ColumnVar *, const bool fetch_column, const CompilationOptions &) |
llvm::Value * | codegenArith (const Analyzer::BinOper *, const CompilationOptions &) |
llvm::Value * | codegenUMinus (const Analyzer::UOper *, const CompilationOptions &) |
llvm::Value * | codegenCmp (const Analyzer::BinOper *, const CompilationOptions &) |
llvm::Value * | codegenCmp (const SQLOps, const SQLQualifier, std::vector< llvm::Value * >, const SQLTypeInfo &, const Analyzer::Expr *, const CompilationOptions &) |
llvm::Value * | codegenIsNull (const Analyzer::UOper *, const CompilationOptions &) |
llvm::Value * | codegenIsNullNumber (llvm::Value *, const SQLTypeInfo &) |
llvm::Value * | codegenLogical (const Analyzer::BinOper *, const CompilationOptions &) |
llvm::Value * | codegenLogical (const Analyzer::UOper *, const CompilationOptions &) |
llvm::Value * | codegenCast (const Analyzer::UOper *, const CompilationOptions &) |
llvm::Value * | codegenCast (llvm::Value *operand_lv, const SQLTypeInfo &operand_ti, const SQLTypeInfo &ti, const bool operand_is_const, const CompilationOptions &co) |
llvm::Value * | codegen (const Analyzer::InValues *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::InIntegerSet *expr, const CompilationOptions &co) |
std::vector< llvm::Value * > | codegen (const Analyzer::CaseExpr *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::ExtractExpr *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::DateaddExpr *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::DatediffExpr *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::DatetruncExpr *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::CharLengthExpr *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::KeyForStringExpr *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::SampleRatioExpr *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::WidthBucketExpr *, const CompilationOptions &) |
llvm::Value * | codegenConstantWidthBucketExpr (const Analyzer::WidthBucketExpr *, const CompilationOptions &) |
llvm::Value * | codegenWidthBucketExpr (const Analyzer::WidthBucketExpr *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::MLPredictExpr *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::PCAProjectExpr *, const CompilationOptions &) |
llvm::Value * | codegenLinRegPredict (const Analyzer::MLPredictExpr *, const std::shared_ptr< AbstractMLModel > &model, const CompilationOptions &) |
llvm::Value * | codegenTreeRegPredict (const Analyzer::MLPredictExpr *, const std::shared_ptr< AbstractTreeModel > &tree_model, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::StringOper *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::LikeExpr *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::RegexpExpr *, const CompilationOptions &) |
llvm::Value * | codegenUnnest (const Analyzer::UOper *, const CompilationOptions &) |
llvm::Value * | codegenArrayAt (const Analyzer::BinOper *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::CardinalityExpr *, const CompilationOptions &) |
std::vector< llvm::Value * > | codegenArrayExpr (const Analyzer::ArrayExpr *, const CompilationOptions &) |
std::vector< llvm::Value * > | codegenGeoColumnVar (const Analyzer::GeoColumnVar *, const bool fetch_columns, const CompilationOptions &co) |
std::vector< llvm::Value * > | codegenGeoExpr (const Analyzer::GeoExpr *, const CompilationOptions &) |
std::vector< llvm::Value * > | codegenGeoConstant (const Analyzer::GeoConstant *, const CompilationOptions &) |
std::vector< llvm::Value * > | codegenGeoOperator (const Analyzer::GeoOperator *, const CompilationOptions &) |
std::vector< llvm::Value * > | codegenGeoUOper (const Analyzer::GeoUOper *, const CompilationOptions &) |
std::vector< llvm::Value * > | codegenGeoBinOper (const Analyzer::GeoBinOper *, const CompilationOptions &) |
std::vector< llvm::Value * > | codegenGeosPredicateCall (const std::string &, std::vector< llvm::Value * >, const CompilationOptions &) |
std::vector< llvm::Value * > | codegenGeosConstructorCall (const std::string &, std::vector< llvm::Value * >, llvm::Value *, const CompilationOptions &) |
std::vector< llvm::Value * > | codegenGeoArgs (const std::vector< std::shared_ptr< Analyzer::Expr >> &, const CompilationOptions &) |
llvm::Value * | codegenFunctionOper (const Analyzer::FunctionOper *, const CompilationOptions &) |
llvm::Value * | codegenFunctionOperWithCustomTypeHandling (const Analyzer::FunctionOperWithCustomTypeHandling *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::BinOper *, const CompilationOptions &) |
llvm::Value * | codegen (const Analyzer::UOper *, const CompilationOptions &) |
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) |
std::vector< llvm::Value * > | codegenColVar (const Analyzer::ColumnVar *, const bool fetch_column, const bool update_query_plan, const CompilationOptions &) |
llvm::Value * | codegenFixedLengthColVar (const Analyzer::ColumnVar *col_var, llvm::Value *col_byte_stream, llvm::Value *pos_arg, const WindowFunctionContext *window_function_context=nullptr) |
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) |
std::vector< llvm::Value * > | codegenVariableLengthStringColVar (llvm::Value *col_byte_stream, llvm::Value *pos_arg) |
llvm::Value * | codegenRowId (const Analyzer::ColumnVar *col_var, const CompilationOptions &co) |
llvm::Value * | codgenAdjustFixedEncNull (llvm::Value *, const SQLTypeInfo &) |
std::vector< llvm::Value * > | codegenOuterJoinNullPlaceholder (const Analyzer::ColumnVar *col_var, const bool fetch_column, const CompilationOptions &co) |
llvm::Value * | codegenIntArith (const Analyzer::BinOper *, llvm::Value *, llvm::Value *, const CompilationOptions &) |
llvm::Value * | codegenFpArith (const Analyzer::BinOper *, llvm::Value *, llvm::Value *) |
llvm::Value * | codegenCastTimestampToTime (llvm::Value *ts_lv, const int dimen, const bool nullable) |
llvm::Value * | codegenCastTimestampToDate (llvm::Value *ts_lv, const int dimen, const bool nullable) |
llvm::Value * | codegenCastFromString (llvm::Value *operand_lv, const SQLTypeInfo &operand_ti, const SQLTypeInfo &ti, const bool operand_is_const, const CompilationOptions &co) |
llvm::Value * | codegenCastNonStringToString (llvm::Value *operand_lv, const SQLTypeInfo &operand_ti, const SQLTypeInfo &ti, const bool operand_is_const, const CompilationOptions &co) |
llvm::Value * | codegenCastToFp (llvm::Value *operand_lv, const SQLTypeInfo &operand_ti, const SQLTypeInfo &ti) |
llvm::Value * | codegenCastFromFp (llvm::Value *operand_lv, const SQLTypeInfo &operand_ti, const SQLTypeInfo &ti) |
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 &) |
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 | codegenSkipOverflowCheckForNull (llvm::Value *lhs_lv, llvm::Value *rhs_lv, llvm::BasicBlock *no_overflow_bb, const SQLTypeInfo &ti) |
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) |
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 * | codegenDeciDiv (const Analyzer::BinOper *, const CompilationOptions &) |
llvm::Value * | codegenMod (llvm::Value *, llvm::Value *, const std::string &null_typename, const std::string &null_check_suffix, const SQLTypeInfo &) |
llvm::Value * | codegenCase (const Analyzer::CaseExpr *, llvm::Type *case_llvm_type, const bool is_real_str, const CompilationOptions &) |
llvm::Value * | codegenExtractHighPrecisionTimestamps (llvm::Value *, const SQLTypeInfo &, const ExtractField &) |
llvm::Value * | codegenDateTruncHighPrecisionTimestamps (llvm::Value *, const SQLTypeInfo &, const DatetruncField &) |
llvm::Value * | codegenCmpDecimalConst (const SQLOps, const SQLQualifier, const Analyzer::Expr *, const SQLTypeInfo &, const Analyzer::Expr *, const CompilationOptions &) |
llvm::Value * | codegenBoundingBoxIntersect (const SQLOps, const SQLQualifier, const std::shared_ptr< Analyzer::Expr >, const std::shared_ptr< Analyzer::Expr >, const CompilationOptions &) |
llvm::Value * | codegenStrCmp (const SQLOps, const SQLQualifier, const std::shared_ptr< Analyzer::Expr >, const std::shared_ptr< Analyzer::Expr >, const CompilationOptions &) |
llvm::Value * | codegenQualifierCmp (const SQLOps, const SQLQualifier, std::vector< llvm::Value * >, const Analyzer::Expr *, const CompilationOptions &) |
llvm::Value * | codegenLogicalShortCircuit (const Analyzer::BinOper *, const CompilationOptions &) |
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 &) |
llvm::Value * | codegenDictStrCmp (const std::shared_ptr< Analyzer::Expr >, const std::shared_ptr< Analyzer::Expr >, const SQLOps, const CompilationOptions &co) |
llvm::Value * | codegenDictRegexp (const std::shared_ptr< Analyzer::Expr > arg, const Analyzer::Constant *pattern, const char escape_char, const CompilationOptions &) |
llvm::Value * | foundOuterJoinMatch (const size_t nesting_level) const |
llvm::Value * | resolveGroupedColumnReference (const Analyzer::ColumnVar *) |
llvm::Value * | colByteStream (const Analyzer::ColumnVar *col_var, const bool fetch_column, const bool hoist_literals) |
std::shared_ptr< const Analyzer::Expr > | hashJoinLhs (const Analyzer::ColumnVar *rhs) const |
std::shared_ptr< const Analyzer::ColumnVar > | hashJoinLhsTuple (const Analyzer::ColumnVar *rhs, const Analyzer::BinOper *tautological_eq) const |
bool | needCastForHashJoinLhs (const Analyzer::ColumnVar *rhs) const |
std::unique_ptr< InValuesBitmap > | createInValuesBitmap (const Analyzer::InValues *, const CompilationOptions &) |
bool | checkExpressionRanges (const Analyzer::UOper *, int64_t, int64_t) |
bool | checkExpressionRanges (const Analyzer::BinOper *, int64_t, int64_t) |
std::tuple< ArgNullcheckBBs, llvm::Value * > | beginArgsNullcheck (const Analyzer::FunctionOper *function_oper, const std::vector< llvm::Value * > &orig_arg_lvs) |
llvm::Value * | endArgsNullcheck (const ArgNullcheckBBs &, llvm::Value *, llvm::Value *, const Analyzer::FunctionOper *) |
llvm::Value * | codegenFunctionOperNullArg (const Analyzer::FunctionOper *, const std::vector< llvm::Value * > &) |
llvm::Value * | codegenCompression (const SQLTypeInfo &type_info) |
std::pair< llvm::Value *, llvm::Value * > | codegenArrayBuff (llvm::Value *chunk, llvm::Value *row_pos, SQLTypes array_type, bool cast_and_extend) |
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) |
llvm::StructType * | createPointStructType (const std::string &udf_func_name, size_t param_num) |
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) |
llvm::StructType * | createMultiPointStructType (const std::string &udf_func_name, size_t param_num) |
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::StructType * | createLineStringStructType (const std::string &udf_func_name, size_t param_num) |
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::StructType * | createMultiLineStringStructType (const std::string &udf_func_name, size_t param_num) |
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::StructType * | createPolygonStructType (const std::string &udf_func_name, size_t param_num) |
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::StructType * | createMultiPolygonStructType (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) |
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 * | createStringViewStructType () |
llvm::Function * | getArithWithOverflowIntrinsic (const Analyzer::BinOper *bin_oper, llvm::Type *type) |
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) |
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) |
Private Attributes | |
Executor * | executor_ |
Static Private Attributes | |
static std::mutex | initialize_nvptx_mutex_ |
static std::mutex | initialize_cpu_backend_mutex_ |
Friends | |
class | GroupByAndAggregate |
Definition at line 29 of file CodeGenerator.h.
|
inline |
Definition at line 31 of file CodeGenerator.h.
Definition at line 38 of file CodeGenerator.h.
|
static |
Definition at line 1574 of file NativeCodegen.cpp.
Referenced by CgenState::set_module_shallow_copy().
|
private |
Definition at line 428 of file ExtensionsIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, codegenFunctionOperNullArg(), CgenState::context_, CgenState::current_func_, anonymous_namespace{ExtensionsIR.cpp}::ext_func_call_requires_nullcheck(), anonymous_namespace{ExtensionsIR.cpp}::get_buffer_struct_type(), anonymous_namespace{ExtensionsIR.cpp}::get_llvm_type_from_sql_array_type(), Analyzer::Expr::get_type_info(), Analyzer::FunctionOper::getName(), and CgenState::ir_builder_.
Referenced by codegenFunctionOper(), and codegenFunctionOperWithCustomTypeHandling().
llvm::Value * CodeGenerator::castArrayPointer | ( | llvm::Value * | ptr, |
const SQLTypeInfo & | elem_ti | ||
) |
Definition at line 1748 of file ExtensionsIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CgenState::context_, SQLTypeInfo::get_compression(), SQLTypeInfo::get_size(), SQLTypeInfo::get_type(), CgenState::ir_builder_, SQLTypeInfo::is_boolean(), SQLTypeInfo::is_integer(), SQLTypeInfo::is_string(), kDOUBLE, kENCODING_DICT, and kFLOAT.
Referenced by codegenFunctionOperCastArgs(), RangeJoinHashTable::codegenKey(), and BoundingBoxIntersectJoinHashTable::codegenKey().
|
private |
Definition at line 630 of file ArithmeticIR.cpp.
References CHECK, executor(), executor_, Analyzer::Expr::get_type_info(), getExpressionRange(), Integer, SQLTypeInfo::is_decimal(), ExpressionRange::makeInvalidRange(), plan_state_, and PlanState::query_infos_.
Referenced by codegenAdd(), codegenMul(), codegenSub(), and codegenUMinus().
|
private |
Definition at line 189 of file ArithmeticIR.cpp.
References CHECK, executor(), executor_, Analyzer::BinOper::get_left_operand(), Analyzer::BinOper::get_right_operand(), Analyzer::Expr::get_type_info(), getExpressionRange(), Integer, SQLTypeInfo::is_decimal(), anonymous_namespace{ArithmeticIR.cpp}::is_temporary_column(), ExpressionRange::makeInvalidRange(), plan_state_, and PlanState::query_infos_.
std::vector< llvm::Value * > CodeGenerator::codegen | ( | const Analyzer::Expr * | expr, |
const bool | fetch_columns, | ||
const CompilationOptions & | co | ||
) |
Definition at line 30 of file IRCodegen.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CHECK_NE, codegenArrayExpr(), codegenColumn(), codegenFunctionOper(), codegenFunctionOperWithCustomTypeHandling(), codegenGeoBinOper(), codegenGeoColumnVar(), codegenGeoExpr(), codegenGeoUOper(), CgenState::context_, createStringViewStructType(), executor_, get_int_type(), Analyzer::Expr::get_type_info(), CgenState::ir_builder_, kENCODING_DICT, kENCODING_NONE, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNULLT, kPOINT, kPOLYGON, CgenState::llInt(), posArg(), and width_bucket_expr().
Referenced by Executor::buildHoistLeftHandSideFiltersCb(), Executor::buildIsDeletedCb(), Executor::buildJoinLoops(), TreeModelPredictionMgr::codegen(), codegen(), GroupByAndAggregate::codegenAggArg(), TargetExprCodegen::codegenAggregate(), codegenArith(), codegenArrayAt(), codegenArrayExpr(), codegenCase(), codegenCast(), codegenCmp(), codegenCmpDecimalConst(), HashJoin::codegenColOrStringOper(), codegenColVar(), codegenConstantWidthBucketExpr(), codegenDeciDiv(), codegenDictLike(), codegenDictRegexp(), codegenDictStrCmp(), Executor::codegenFrameBoundExpr(), codegenFunctionOper(), codegenFunctionOperWithCustomTypeHandling(), codegenGeoArgs(), codegenGeoColumnVar(), codegenGeoConstant(), codegenGeoOperator(), codegenIsNull(), RangeJoinHashTable::codegenKey(), BoundingBoxIntersectJoinHashTable::codegenKey(), codegenLogical(), codegenLogicalShortCircuit(), BoundingBoxIntersectJoinHashTable::codegenManyKey(), codegenOuterJoinNullPlaceholder(), GroupByAndAggregate::codegenOutputSlot(), codegenPseudoStringOper(), codegenQualifierCmp(), codegenRowId(), codegenStringFetchAndEncode(), codegenTreeRegPredict(), codegenUMinus(), codegenUnnest(), codegenWidthBucketExpr(), Executor::codegenWindowFunctionAggregateCalls(), ScalarCodeGenerator::compile(), and Executor::groupByColumnCodegen().
|
private |
Definition at line 20 of file ConstantIR.cpp.
References CgenState::addStringConstant(), AUTOMATIC_IR_METADATA, Datum::boolval, cgen_state_, CHECK, codegenGeoConstant(), codegenHoistedConstants(), codegenIntConst(), CgenState::context_, decimal_to_int_type(), CompilationOptions::device_type, Datum::doubleval, executor(), Datum::floatval, Analyzer::Constant::get_constval(), get_int_type(), Analyzer::Constant::get_is_null(), Analyzer::Expr::get_type_info(), CompilationOptions::hoist_literals, inline_int_null_val(), kBIGINT, kBOOLEAN, kCHAR, kDATE, kDOUBLE, kENCODING_DICT, kFLOAT, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, CgenState::llInt(), Datum::stringval, and run_benchmark_import::type.
|
private |
Definition at line 23 of file InValuesIR.cpp.
References CgenState::addInValuesBitmap(), AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CHECK_EQ, codegen(), InValuesBitmap::codegen(), codegenCmp(), CgenState::context_, createInValuesBitmap(), CgenState::emitCall(), executor(), Analyzer::InValues::get_arg(), Analyzer::Expr::get_type_info(), Analyzer::InValues::get_value_list(), CompilationOptions::hoist_literals, CgenState::inlineIntNull(), CgenState::ir_builder_, is_unnest(), kBOOLEAN, kEQ, kONE, CgenState::llInt(), run_benchmark_import::result, and toBool().
|
private |
Definition at line 72 of file InValuesIR.cpp.
References CgenState::addInValuesBitmap(), AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CHECK_EQ, codegen(), InValuesBitmap::codegen(), CgenState::context_, Data_Namespace::CPU_LEVEL, CompilationOptions::device_type, executor(), Analyzer::InIntegerSet::get_arg(), Analyzer::Expr::get_type_info(), Analyzer::InIntegerSet::get_value_list(), GPU, Data_Namespace::GPU_LEVEL, CompilationOptions::hoist_literals, inline_int_null_val(), is_unnest(), CgenState::llInt(), and run_benchmark_import::result.
|
private |
Definition at line 20 of file CaseIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CHECK_EQ, codegenCase(), CgenState::context_, createStringViewStructType(), get_bit_width(), Analyzer::CaseExpr::get_else_expr(), get_int_type(), Analyzer::Expr::get_type_info(), CgenState::ir_builder_, kENCODING_DICT, and kFLOAT.
|
private |
Definition at line 76 of file DateTimeIR.cpp.
References AUTOMATIC_IR_METADATA, CHECK, DateTimeUtils::get_extract_timestamp_precision_scale(), Analyzer::ExtractExpr::get_field(), Analyzer::ExtractExpr::get_from_expr(), get_int_type(), Analyzer::Expr::get_type_info(), DateTimeUtils::is_subsecond_extract_field(), kDATE, kEPOCH, and kTIMESTAMP.
|
private |
Definition at line 163 of file DateTimeIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, codegen(), CgenState::context_, CgenState::emitExternalCall(), Analyzer::DateaddExpr::get_datetime_expr(), Analyzer::DateaddExpr::get_field(), get_int_type(), Analyzer::DateaddExpr::get_number_expr(), Analyzer::Expr::get_type_info(), inline_fixed_encoding_null_val(), inline_int_null_val(), DateTimeUtils::is_subsecond_dateadd_field(), kDATE, kTIMESTAMP, CgenState::llInt(), and Analyzer::DateaddExpr::use_fixed_encoding_null_val().
|
private |
Definition at line 199 of file DateTimeIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, codegen(), CgenState::context_, CgenState::emitExternalCall(), Analyzer::DatediffExpr::get_end_expr(), Analyzer::DatediffExpr::get_field(), get_int_type(), Analyzer::DatediffExpr::get_start_expr(), Analyzer::Expr::get_type_info(), CgenState::inlineIntNull(), and CgenState::llInt().
|
private |
Definition at line 227 of file DateTimeIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, codegen(), codegenDateTruncHighPrecisionTimestamps(), CgenState::context_, datetrunc_fname_lookup, dtMICROSECOND, dtMILLISECOND, dtNANOSECOND, dtSECOND, CgenState::emitExternalCall(), executor(), field(), Analyzer::DatetruncExpr::get_field(), Analyzer::DatetruncExpr::get_from_expr(), get_int_type(), Analyzer::Expr::get_type_info(), and CgenState::ir_builder_.
|
private |
Definition at line 239 of file StringOpsIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK_EQ, codegen(), CgenState::context_, CompilationOptions::device_type, CgenState::emitCall(), CgenState::emitExternalCall(), Analyzer::CharLengthExpr::get_arg(), Analyzer::CharLengthExpr::get_calc_encoded_length(), get_int_type(), SQLTypeInfo::get_notnull(), Analyzer::Expr::get_type_info(), GPU, CgenState::inlineIntNull(), and CgenState::ir_builder_.
|
private |
Definition at line 269 of file StringOpsIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK_EQ, codegen(), CgenState::emitCall(), and Analyzer::KeyForStringExpr::get_arg().
|
private |
Definition at line 278 of file IRCodegen.cpp.
References run_benchmark_import::args, AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CHECK_EQ, codegen(), CgenState::context_, CgenState::emitCall(), executor(), Analyzer::SampleRatioExpr::get_arg(), kDOUBLE, ll_bool(), and posArg().
|
private |
Definition at line 305 of file IRCodegen.cpp.
References AUTOMATIC_IR_METADATA, Analyzer::WidthBucketExpr::can_skip_out_of_bound_check(), cgen_state_, CHECK, codegenConstantWidthBucketExpr(), codegenWidthBucketExpr(), executor_, Analyzer::WidthBucketExpr::get_lower_bound(), Analyzer::WidthBucketExpr::get_partition_count(), Analyzer::WidthBucketExpr::get_partition_count_val(), Analyzer::WidthBucketExpr::get_target_value(), Analyzer::WidthBucketExpr::get_upper_bound(), getExpressionRange(), PlanState::getSimpleQuals(), Integer, Analyzer::WidthBucketExpr::is_constant_expr(), kCAST, plan_state_, PlanState::query_infos_, Analyzer::WidthBucketExpr::set_constant_expr(), and Analyzer::WidthBucketExpr::skip_out_of_bound_check().
|
private |
Definition at line 288 of file MLPredictCodegen.cpp.
References CHECK, codegenLinRegPredict(), codegenTreeRegPredict(), DEBUG_TIMER, DECISION_TREE_REG, g_ml_models, GBT_REG, Analyzer::MLPredictExpr::get_model_value(), Analyzer::MLPredictExpr::get_regressor_values(), MLModelMap::getModel(), LINEAR_REG, and RANDOM_FOREST_REG.
|
private |
Definition at line 334 of file MLPredictCodegen.cpp.
References CHECK, codegenArith(), DEBUG_TIMER, Datum::doubleval, executor(), g_ml_models, generated_encoded_and_casted_features(), Analyzer::Constant::get_constval(), Analyzer::PCAProjectExpr::get_feature_values(), Analyzer::PCAProjectExpr::get_model_value(), Analyzer::PCAProjectExpr::get_pc_dimension_value(), MLModelMap::getModel(), Datum::intval, kDIVIDE, kDOUBLE, kMINUS, kMULTIPLY, kONE, kPLUS, PCA, and run_benchmark_import::result.
|
private |
Definition at line 533 of file StringOpsIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK_EQ, CHECK_GE, codegen(), StringDictionaryTranslationMgr::codegen(), codegenPerRowStringOper(), CompilationOptions::device_type, executor(), Analyzer::Expr::get_type_info(), Analyzer::StringOper::getArg(), Analyzer::StringOper::getArity(), CgenState::moveStringDictionaryTranslationMgr(), Analyzer::StringOper::requiresPerRowTranslation(), and translate_dict_strings().
|
private |
Definition at line 587 of file StringOpsIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CHECK_EQ, codegen(), codegenDictLike(), CgenState::context_, CompilationOptions::device_type, CgenState::emitCall(), extract_cast_arg(), g_enable_watchdog, Analyzer::LikeExpr::get_arg(), Analyzer::LikeExpr::get_escape_expr(), Analyzer::LikeExpr::get_is_ilike(), Analyzer::LikeExpr::get_is_simple(), Analyzer::LikeExpr::get_like_expr(), SQLTypeInfo::get_notnull(), Analyzer::LikeExpr::get_own_arg(), Analyzer::Expr::get_type_info(), GPU, CgenState::inlineIntNull(), CgenState::ir_builder_, is_unnest(), kENCODING_NONE, and CgenState::llInt().
|
private |
Definition at line 845 of file StringOpsIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CHECK_EQ, codegen(), codegenDictRegexp(), CgenState::context_, CompilationOptions::device_type, CgenState::emitExternalCall(), extract_cast_arg(), g_enable_watchdog, Analyzer::RegexpExpr::get_arg(), Analyzer::RegexpExpr::get_escape_expr(), get_int_type(), SQLTypeInfo::get_notnull(), Analyzer::RegexpExpr::get_own_arg(), Analyzer::RegexpExpr::get_pattern_expr(), Analyzer::Expr::get_type_info(), GPU, CgenState::inlineIntNull(), CgenState::ir_builder_, is_unnest(), kENCODING_NONE, and CgenState::llInt().
|
private |
Definition at line 68 of file ArrayIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, codegen(), CgenState::context_, CgenState::emitExternalCall(), Analyzer::CardinalityExpr::get_arg(), get_int_type(), Analyzer::Expr::get_type_info(), CgenState::inlineIntNull(), CgenState::llInt(), log2_bytes(), and posArg().
|
private |
Definition at line 234 of file IRCodegen.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, codegenArith(), codegenArrayAt(), codegenCmp(), codegenLogical(), Analyzer::BinOper::get_optype(), IS_ARITHMETIC, IS_COMPARISON, IS_LOGIC, and kARRAY_AT.
|
private |
Definition at line 253 of file IRCodegen.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, codegenCast(), codegenIsNull(), codegenLogical(), codegenUMinus(), codegenUnnest(), Analyzer::UOper::get_optype(), kCAST, kISNULL, kNOT, kUMINUS, kUNNEST, and UNREACHABLE.
|
private |
Definition at line 219 of file ArithmeticIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CHECK_EQ, checkExpressionRanges(), codegenBinOpWithOverflowForCPU(), codegenSkipOverflowCheckForNull(), CgenState::context_, CPU, CgenState::current_func_, CompilationOptions::device_type, CgenState::emitCall(), SQLTypeInfo::get_size(), inline_int_null_val(), CgenState::inlineIntMaxMin(), CgenState::ir_builder_, SQLTypeInfo::is_decimal(), SQLTypeInfo::is_integer(), SQLTypeInfo::is_timeinterval(), CgenState::llInt(), and CgenState::needs_error_check_.
Referenced by codegenIntArith().
|
private |
Definition at line 38 of file ArithmeticIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CHECK_EQ, codegen(), codegenCastBetweenIntTypes(), codegenDeciDiv(), codegenFpArith(), codegenIntArith(), Analyzer::BinOper::get_left_operand(), Analyzer::BinOper::get_optype(), Analyzer::BinOper::get_right_operand(), Analyzer::Expr::get_type_info(), IS_ARITHMETIC, and kDIVIDE.
Referenced by codegen(), and codegenLinRegPredict().
|
private |
Definition at line 26 of file ArrayIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CHECK_EQ, codegen(), CgenState::context_, CgenState::emitExternalCall(), get_int_type(), Analyzer::BinOper::get_left_operand(), Analyzer::BinOper::get_right_operand(), Analyzer::Expr::get_type_info(), CgenState::inlineFpNull(), CgenState::inlineIntNull(), CgenState::ir_builder_, kDOUBLE, posArg(), and to_string().
Referenced by codegen().
|
private |
Definition at line 685 of file ExtensionsIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CgenState::context_, CgenState::emitExternalCall(), SQLTypeInfo::get_elem_type(), kARRAY, and kENCODING_NONE.
Referenced by codegenFunctionOperCastArgs().
|
private |
Definition at line 97 of file ArrayIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, codegen(), CgenState::context_, CompilationOptions::device_type, CgenState::emitExternalCall(), executor(), get_int_array_type(), get_int_type(), Analyzer::Expr::get_type_info(), Analyzer::ArrayExpr::getElement(), Analyzer::ArrayExpr::getElementCount(), GPU, CgenState::ir_builder_, Analyzer::ArrayExpr::isLocalAlloc(), Analyzer::ArrayExpr::isNull(), kENCODING_GEOINT, CgenState::llFp(), and CgenState::llInt().
Referenced by codegen().
|
private |
Definition at line 728 of file ArithmeticIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, codegenSkipOverflowCheckForNull(), CgenState::context_, CgenState::current_func_, getArithWithOverflowIntrinsic(), inline_int_null_val(), CgenState::ir_builder_, CgenState::llInt(), and CgenState::needs_error_check_.
Referenced by codegenAdd(), codegenMul(), and codegenSub().
|
private |
Definition at line 285 of file CompareIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, codegenFunctionOper(), CgenState::context_, g_enable_bbox_intersect_hashjoin, get_int_type(), Catalog_Namespace::get_metadata_for_column(), Datum::intval, IS_GEO_POLY, kBOOLEAN, kDOUBLE, kENCODING_GEOINT, kINT, kPOINT, and VLOG.
Referenced by codegenCmp().
|
private |
Definition at line 713 of file ExtensionsIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CgenState::context_, anonymous_namespace{ExtensionsIR.cpp}::get_buffer_struct_type(), and CgenState::ir_builder_.
Referenced by codegenFunctionOperCastArgs().
|
private |
Definition at line 65 of file CaseIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK_EQ, codegen(), CgenState::context_, CgenState::current_func_, CgenState::emitCall(), Analyzer::CaseExpr::get_expr_pair_list(), CgenState::ir_builder_, and toBool().
Referenced by codegen().
|
private |
Definition at line 21 of file CastIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK_EQ, codegen(), CgenState::context_, CgenState::emitCall(), executor_, get_int_type(), Analyzer::UOper::get_operand(), Analyzer::UOper::get_optype(), Analyzer::Expr::get_type_info(), CgenState::ir_builder_, and kCAST.
Referenced by codegen(), codegenCmpDecimalConst(), codegenFunctionOper(), and codegenFunctionOperWithCustomTypeHandling().
|
private |
Definition at line 73 of file CastIR.cpp.
References AUTOMATIC_IR_METADATA, anonymous_namespace{CastIR.cpp}::byte_array_cast(), CgenState::castToTypeIn(), cgen_state_, CHECK, codegenCastBetweenIntTypes(), codegenCastBetweenTimestamps(), codegenCastFromFp(), codegenCastFromString(), codegenCastNonStringToString(), codegenCastTimestampToDate(), codegenCastTimestampToTime(), codegenCastToFp(), CgenState::context_, SQLTypeInfo::get_dimension(), get_int_array_type(), SQLTypeInfo::get_notnull(), SQLTypeInfo::get_size(), SQLTypeInfo::get_type(), CgenState::ir_builder_, SQLTypeInfo::is_boolean(), SQLTypeInfo::is_decimal(), SQLTypeInfo::is_integer(), SQLTypeInfo::is_string(), SQLTypeInfo::is_text_encoding_dict(), SQLTypeInfo::is_time(), SQLTypeInfo::is_timestamp(), kDATE, kTIME, and kTIMESTAMP.
llvm::Value * CodeGenerator::codegenCastBetweenIntTypes | ( | llvm::Value * | operand_lv, |
const SQLTypeInfo & | operand_ti, | ||
const SQLTypeInfo & | ti, | ||
bool | upscale = true |
||
) |
Definition at line 427 of file CastIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, codegenCastBetweenIntTypesOverflowChecks(), CgenState::context_, CgenState::emitCall(), exp_to_scale(), get_bit_width(), get_int_type(), SQLTypeInfo::get_logical_size(), SQLTypeInfo::get_notnull(), SQLTypeInfo::get_scale(), inline_int_null_val(), CgenState::inlineIntNull(), CgenState::ir_builder_, SQLTypeInfo::is_decimal(), SQLTypeInfo::is_integer(), kBIGINT, CgenState::llInt(), and numeric_type_name().
Referenced by codegenArith(), codegenCast(), codegenDeciDiv(), codegenWidthBucketExpr(), and Executor::codegenWindowFunctionAggregateCalls().
void CodeGenerator::codegenCastBetweenIntTypesOverflowChecks | ( | llvm::Value * | operand_lv, |
const SQLTypeInfo & | operand_ti, | ||
const SQLTypeInfo & | ti, | ||
const int64_t | scale | ||
) |
Definition at line 500 of file CastIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CgenState::context_, CgenState::current_func_, CgenState::emitCall(), get_int_type(), SQLTypeInfo::get_logical_size(), SQLTypeInfo::get_notnull(), inline_int_null_val(), CgenState::inlineIntMaxMin(), CgenState::inlineIntNull(), CgenState::ir_builder_, kBOOLEAN, CgenState::llInt(), CgenState::needs_error_check_, numeric_type_name(), toBool(), and type_name().
Referenced by codegenCastBetweenIntTypes(), and codegenCastBetweenTimestamps().
llvm::Value * CodeGenerator::codegenCastBetweenTimestamps | ( | llvm::Value * | ts_lv, |
const SQLTypeInfo & | operand_dimen, | ||
const SQLTypeInfo & | target_dimen, | ||
const bool | nullable | ||
) |
Definition at line 199 of file CastIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, codegenCastBetweenIntTypesOverflowChecks(), CgenState::emitCall(), SQLTypeInfo::get_dimension(), DateTimeUtils::get_timestamp_precision_scale(), CgenState::inlineIntNull(), CgenState::ir_builder_, and CgenState::llInt().
Referenced by codegenCast().
|
private |
Definition at line 601 of file CastIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CgenState::context_, CgenState::emitCall(), get_bit_width(), get_int_type(), SQLTypeInfo::get_notnull(), SQLTypeInfo::get_type(), SQLTypeInfo::get_type_name(), CgenState::inlineFpNull(), CgenState::inlineIntNull(), CgenState::ir_builder_, SQLTypeInfo::is_decimal(), SQLTypeInfo::is_fp(), SQLTypeInfo::is_integer(), SQLTypeInfo::is_number(), kDOUBLE, kFLOAT, and numeric_type_name().
Referenced by codegenCast().
|
private |
Definition at line 231 of file CastIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CHECK_EQ, StringDictionaryTranslationMgr::codegen(), CgenState::context_, CPU, Data_Namespace::CPU_LEVEL, createStringViewStructType(), CompilationOptions::device_type, shared::StringDictKey::dict_id, CgenState::emitExternalCall(), executor(), g_cluster, SQLTypeInfo::get_compression(), get_int_type(), SQLTypeInfo::get_type_name(), SQLTypeInfo::getStringDictKey(), GPU, Data_Namespace::GPU_LEVEL, SQLTypeInfo::is_dict_intersection(), SQLTypeInfo::is_string(), kENCODING_DICT, kENCODING_NONE, dict_ref_t::literalsDictId, CgenState::llInt(), and CgenState::moveStringDictionaryTranslationMgr().
Referenced by codegenCast().
|
private |
Definition at line 350 of file CastIR.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CgenState::context_, CompilationOptions::device_type, CgenState::emitExternalCall(), executor(), g_cluster, SQLTypeInfo::get_compression(), SQLTypeInfo::get_dimension(), get_int_type(), SQLTypeInfo::get_notnull(), SQLTypeInfo::get_precision(), SQLTypeInfo::get_scale(), SQLTypeInfo::get_type(), SQLTypeInfo::getStringDictKey(), GPU, SQLTypeInfo::is_string(), kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kDOUBLE, kENCODING_NONE, kFLOAT, kINT, kNUMERIC, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, CgenState::llInt(), to_lower(), and toString().
Referenced by codegenCast().