OmniSciDB
a5dc49c757
|
#include <CgenState.h>
Classes | |
struct | FunctionOperValue |
struct | HoistedLiteralLoadLocator |
Public Types | |
using | LiteralValue = boost::variant< int8_t, int16_t, int32_t, int64_t, float, double, std::pair< std::string, shared::StringDictKey >, std::string, std::vector< double >, std::vector< int32_t >, std::vector< int8_t >, std::pair< std::vector< int8_t >, int >> |
using | LiteralValues = std::vector< LiteralValue > |
Public Member Functions | |
CgenState (const size_t num_query_infos, const bool contains_left_deep_outer_join, Executor *executor) | |
CgenState (const size_t num_query_infos, const bool contains_left_deep_outer_join) | |
CgenState (llvm::LLVMContext &context) | |
std::tuple< size_t, size_t > | getOrAddLiteral (const Analyzer::Constant *constant, const EncodingType enc_type, const shared::StringDictKey &dict_id, const int device_id) |
const std::unordered_map< int, LiteralValues > & | getLiterals () const |
llvm::Value * | addStringConstant (const std::string &str) |
const StringDictionaryTranslationMgr * | moveStringDictionaryTranslationMgr (std::unique_ptr< const StringDictionaryTranslationMgr > &&str_dict_translation_mgr) |
const TreeModelPredictionMgr * | moveTreeModelPredictionMgr (std::unique_ptr< const TreeModelPredictionMgr > &&tree_model_prediction_mgr) |
const InValuesBitmap * | addInValuesBitmap (std::unique_ptr< InValuesBitmap > &in_values_bitmap) |
void | moveInValuesBitmap (std::unique_ptr< const InValuesBitmap > &in_values_bitmap) |
llvm::Value * | emitExternalCall (const std::string &fname, llvm::Type *ret_type, const std::vector< llvm::Value * > args, const std::vector< llvm::Attribute::AttrKind > &fnattrs={}, const bool has_struct_return=false) |
llvm::Value * | emitCall (const std::string &fname, const std::vector< llvm::Value * > &args) |
llvm::Value * | emitEntryCall (const std::string &fname, const std::vector< llvm::Value * > &args) |
size_t | getLiteralBufferUsage (const int device_id) |
llvm::Value * | castToTypeIn (llvm::Value *val, const size_t bit_width) |
std::pair< llvm::ConstantInt *, llvm::ConstantInt * > | inlineIntMaxMin (const size_t byte_width, const bool is_signed) |
llvm::ConstantInt * | inlineIntNull (const SQLTypeInfo &) |
llvm::ConstantFP * | inlineFpNull (const SQLTypeInfo &) |
llvm::Constant * | inlineNull (const SQLTypeInfo &) |
template<class T > | |
llvm::ConstantInt * | llInt (const T v) const |
llvm::ConstantFP * | llFp (const float v) const |
llvm::ConstantFP * | llFp (const double v) const |
llvm::ConstantInt * | llBool (const bool v) const |
void | emitErrorCheck (llvm::Value *condition, llvm::Value *errorCode, std::string label) |
std::vector< std::string > | gpuFunctionsToReplace (llvm::Function *fn) |
void | replaceFunctionForGpu (const std::string &fcn_to_replace, llvm::Function *fn) |
std::shared_ptr< Executor > | getExecutor () const |
llvm::LLVMContext & | getExecutorContext () const |
void | set_module_shallow_copy (const std::unique_ptr< llvm::Module > &module, bool always_clone=false) |
void | maybeCloneFunctionRecursive (llvm::Function *fn) |
Static Public Member Functions | |
static size_t | literalBytes (const CgenState::LiteralValue &lit) |
static size_t | addAligned (const size_t off_in, const size_t alignment) |
Public Attributes | |
size_t | executor_id_ |
llvm::Module * | module_ |
llvm::Function * | row_func_ |
llvm::Function * | filter_func_ |
llvm::Function * | current_func_ |
llvm::BasicBlock * | row_func_bb_ |
llvm::BasicBlock * | filter_func_bb_ |
llvm::CallInst * | row_func_call_ |
llvm::CallInst * | filter_func_call_ |
std::vector< llvm::Function * > | helper_functions_ |
llvm::LLVMContext & | context_ |
llvm::ValueToValueMapTy | vmap_ |
llvm::IRBuilder | ir_builder_ |
std::unordered_map< size_t, std::vector< llvm::Value * > > | fetch_cache_ |
std::vector< FunctionOperValue > | ext_call_cache_ |
std::vector< llvm::Value * > | group_by_expr_cache_ |
std::vector< llvm::Value * > | str_constants_ |
std::vector< llvm::Value * > | frag_offsets_ |
const bool | contains_left_deep_outer_join_ |
std::vector< llvm::Value * > | outer_join_match_found_per_level_ |
std::unordered_map< int, llvm::Value * > | scan_idx_to_hash_pos_ |
InsertionOrderedMap | filter_func_args_ |
std::vector< std::unique_ptr < const InValuesBitmap > > | in_values_bitmaps_ |
std::vector< std::unique_ptr < const TreeModelPredictionMgr > > | tree_model_prediction_mgrs_ |
std::vector< std::unique_ptr < const StringDictionaryTranslationMgr > > | str_dict_translation_mgrs_ |
std::map< std::pair < llvm::Value *, llvm::Value * > , ArrayLoadCodegen > | array_load_cache_ |
std::unordered_map < std::string, llvm::Value * > | geo_target_cache_ |
bool | needs_error_check_ |
bool | needs_geos_ |
llvm::Function * | query_func_ |
llvm::IRBuilder | query_func_entry_ir_builder_ |
std::unordered_map< int, std::vector< llvm::Value * > > | query_func_literal_loads_ |
std::unordered_map < llvm::Value *, HoistedLiteralLoadLocator > | row_func_hoisted_literals_ |
Private Member Functions | |
template<class T > | |
std::tuple< size_t, size_t > | getOrAddLiteral (const T &val, const int device_id) |
Private Attributes | |
std::unordered_map< int, LiteralValues > | literals_ |
std::unordered_map< int, size_t > | literal_bytes_ |
Definition at line 41 of file CgenState.h.
using CgenState::LiteralValue = boost::variant<int8_t, int16_t, int32_t, int64_t, float, double, std::pair<std::string, shared::StringDictKey>, std::string, std::vector<double>, std::vector<int32_t>, std::vector<int8_t>, std::pair<std::vector<int8_t>, int>> |
Definition at line 185 of file CgenState.h.
using CgenState::LiteralValues = std::vector<LiteralValue> |
Definition at line 186 of file CgenState.h.
CgenState::CgenState | ( | const size_t | num_query_infos, |
const bool | contains_left_deep_outer_join, | ||
Executor * | executor | ||
) |
Definition at line 26 of file CgenState.cpp.
CgenState::CgenState | ( | const size_t | num_query_infos, |
const bool | contains_left_deep_outer_join | ||
) |
Definition at line 47 of file CgenState.cpp.
CgenState::CgenState | ( | llvm::LLVMContext & | context | ) |
Definition at line 53 of file CgenState.cpp.
|
inlinestatic |
Definition at line 449 of file CgenState.h.
Referenced by getOrAddLiteral(), and Executor::serializeLiterals().
|
inline |
Definition at line 211 of file CgenState.h.
References in_values_bitmaps_.
Referenced by CodeGenerator::codegen().
|
inline |
Definition at line 190 of file CgenState.h.
References context_, get_int_type(), ir_builder_, str_constants_, and to_string().
Referenced by CodeGenerator::codegen().
llvm::Value * CgenState::castToTypeIn | ( | llvm::Value * | val, |
const size_t | bit_width | ||
) |
Definition at line 150 of file CgenState.cpp.
References CHECK, context_, get_int_type(), and ir_builder_.
Referenced by CodeGenerator::codegenCast(), CodeGenerator::codegenCmp(), CodeGenerator::codegenFixedLengthColVarInWindow(), CodeGenerator::codegenIsNull(), CodeGenerator::codegenLogical(), CodeGenerator::codegenLogicalShortCircuit(), and anonymous_namespace{WindowFunctionIR.cpp}::get_null_value_by_size_with_encoding().
llvm::Value * CgenState::emitCall | ( | const std::string & | fname, |
const std::vector< llvm::Value * > & | args | ||
) |
Definition at line 217 of file CgenState.cpp.
References CHECK, ir_builder_, maybeCloneFunctionRecursive(), and module_.
Referenced by spatial_type::Transform::codegen(), CodeGenerator::codegen(), CodeGenerator::codegenAdd(), CodeGenerator::codegenCase(), CodeGenerator::codegenCast(), CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastBetweenIntTypesOverflowChecks(), CodeGenerator::codegenCastBetweenTimestamps(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCastToFp(), CodeGenerator::codegenCmp(), CodeGenerator::codegenConstantWidthBucketExpr(), CodeGenerator::codegenDateTruncHighPrecisionTimestamps(), CodeGenerator::codegenDiv(), CodeGenerator::codegenExtractHighPrecisionTimestamps(), CodeGenerator::codegenFpArith(), CodeGenerator::codegenFunctionOperWithCustomTypeHandling(), CodeGenerator::codegenIsNull(), spatial_type::Transform::codegenLoads(), CodeGenerator::codegenLogical(), CodeGenerator::codegenMod(), CodeGenerator::codegenMul(), CodeGenerator::codegenSub(), CodeGenerator::codegenUMinus(), CodeGenerator::codegenWidthBucketExpr(), CodeGenerator::codegenWindowPosition(), and CodeGenerator::codgenAdjustFixedEncNull().
llvm::Value * CgenState::emitEntryCall | ( | const std::string & | fname, |
const std::vector< llvm::Value * > & | args | ||
) |
Definition at line 229 of file CgenState.cpp.
References CHECK, maybeCloneFunctionRecursive(), module_, and query_func_entry_ir_builder_.
Referenced by CodeGenerator::codegenHoistedConstantsLoads().
void CgenState::emitErrorCheck | ( | llvm::Value * | condition, |
llvm::Value * | errorCode, | ||
std::string | label | ||
) |
Definition at line 241 of file CgenState.cpp.
References context_, current_func_, ir_builder_, and needs_error_check_.
llvm::Value * CgenState::emitExternalCall | ( | const std::string & | fname, |
llvm::Type * | ret_type, | ||
const std::vector< llvm::Value * > | args, | ||
const std::vector< llvm::Attribute::AttrKind > & | fnattrs = {} , |
||
const bool | has_struct_return = false |
||
) |
Definition at line 395 of file CgenState.cpp.
References CHECK, CHECK_EQ, context_, ir_builder_, module_, and run_benchmark_import::result.
Referenced by spatial_type::Transform::codegen(), CodeGenerator::codegen(), CodeGenerator::codegenArrayAt(), CodeGenerator::codegenArrayBuff(), CodeGenerator::codegenArrayExpr(), CodeGenerator::codegenCastFromString(), CodeGenerator::codegenCastNonStringToString(), CodeGenerator::codegenCastTimestampToDate(), CodeGenerator::codegenCastTimestampToTime(), CodeGenerator::codegenDateTruncHighPrecisionTimestamps(), CodeGenerator::codegenFunctionOper(), CodeGenerator::codegenFunctionOperCastArgs(), CodeGenerator::codegenFunctionOperNullArg(), CodeGenerator::codegenFunctionOperWithCustomTypeHandling(), CodeGenerator::codegenGeoArgs(), CodeGenerator::codegenGeoArrayLoadAndNullcheck(), CodeGenerator::codegenGeosConstructorCall(), spatial_type::PointN::codegenGeoSize(), CodeGenerator::codegenGeosPredicateCall(), CodeGenerator::codegenIsNull(), CodeGenerator::codegenPerRowStringOper(), CodeGenerator::codegenQualifierCmp(), CodeGenerator::codegenStringFetchAndEncode(), CodeGenerator::codegenVariableLengthStringColVar(), and anonymous_namespace{CompareIR.cpp}::unpack_dict_encoded_string().
std::shared_ptr< Executor > CgenState::getExecutor | ( | ) | const |
Definition at line 371 of file CgenState.cpp.
References CHECK, executor_id_, Executor::getExecutor(), and Executor::INVALID_EXECUTOR_ID.
Referenced by getExecutorContext(), and maybeCloneFunctionRecursive().
llvm::LLVMContext & CgenState::getExecutorContext | ( | ) | const |
Definition at line 376 of file CgenState.cpp.
References getExecutor().
|
inline |
Definition at line 236 of file CgenState.h.
References literal_bytes_.
|
inline |
|
inline |
Definition at line 49 of file CgenState.h.
References Datum::bigintval, Datum::boolval, CHECK, CHECK_EQ, decimal_to_int_type(), Datum::doubleval, Datum::floatval, Analyzer::Constant::get_constval(), Analyzer::Constant::get_is_null(), Analyzer::Expr::get_type_info(), Analyzer::Constant::get_value_list(), inline_fp_null_val(), inline_int_null_val(), Datum::intval, kARRAY, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDOUBLE, kENCODING_DICT, kENCODING_GEOINT, kENCODING_NONE, kFLOAT, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, Datum::smallintval, Datum::stringval, Datum::tinyintval, and run_benchmark_import::type.
Referenced by CodeGenerator::codegenHoistedConstants().
|
inlineprivate |
Definition at line 462 of file CgenState.h.
References addAligned(), literal_bytes_, literalBytes(), and literals_.
std::vector< std::string > CgenState::gpuFunctionsToReplace | ( | llvm::Function * | fn | ) |
Definition at line 306 of file CgenState.cpp.
References CHECK, CodegenUtil::getCalledFunctionName(), and anonymous_namespace{CgenState.cpp}::gpu_replacement_functions.
Referenced by spatial_type::Transform::codegen().
llvm::ConstantFP * CgenState::inlineFpNull | ( | const SQLTypeInfo & | type_info | ) |
Definition at line 104 of file CgenState.cpp.
References CHECK, SQLTypeInfo::get_type(), SQLTypeInfo::is_fp(), kDOUBLE, kFLOAT, llFp(), NULL_DOUBLE, and NULL_FLOAT.
Referenced by CodeGenerator::codegenArrayAt(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCastToFp(), CodeGenerator::codegenFixedLengthColVarInWindow(), CodeGenerator::codegenUMinus(), CodeGenerator::codegenWidthBucketExpr(), CodeGenerator::endArgsNullcheck(), inlineNull(), and CodeGenerator::NullCheckCodegen::NullCheckCodegen().
std::pair< llvm::ConstantInt *, llvm::ConstantInt * > CgenState::inlineIntMaxMin | ( | const size_t | byte_width, |
const bool | is_signed | ||
) |
Definition at line 121 of file CgenState.cpp.
References CHECK_EQ, context_, inline_int_max_min(), inline_uint_max_min(), and ll_int().
Referenced by CodeGenerator::codegenAdd(), CodeGenerator::codegenCastBetweenIntTypesOverflowChecks(), CodeGenerator::codegenDiv(), CodeGenerator::codegenMul(), CodeGenerator::codegenSub(), and CodeGenerator::codegenUMinus().
llvm::ConstantInt * CgenState::inlineIntNull | ( | const SQLTypeInfo & | type_info | ) |
Definition at line 65 of file CgenState.cpp.
References CHECK, SQLTypeInfo::get_compression(), SQLTypeInfo::get_type(), inline_int_null_val(), SQLTypeInfo::is_string(), kARRAY, kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kENCODING_DICT, kENCODING_NONE, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kNUMERIC, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, llInt(), and run_benchmark_import::type.
Referenced by CodeGenerator::codegen(), CodeGenerator::codegenArrayAt(), CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastBetweenIntTypesOverflowChecks(), CodeGenerator::codegenCastBetweenTimestamps(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCastTimestampToDate(), CodeGenerator::codegenCastTimestampToTime(), CodeGenerator::codegenCastToFp(), CodeGenerator::codegenCmp(), CodeGenerator::codegenDateTruncHighPrecisionTimestamps(), CodeGenerator::codegenDiv(), CodeGenerator::codegenExtractHighPrecisionTimestamps(), CodeGenerator::codegenFixedLengthColVarInWindow(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codegenIntConst(), CodeGenerator::codegenIsNullNumber(), CodeGenerator::codegenLogical(), CodeGenerator::codegenLogicalShortCircuit(), CodeGenerator::codegenQualifierCmp(), CodeGenerator::codegenUMinus(), CodeGenerator::codgenAdjustFixedEncNull(), CodeGenerator::endArgsNullcheck(), inlineNull(), and CodeGenerator::NullCheckCodegen::NullCheckCodegen().
llvm::Constant * CgenState::inlineNull | ( | const SQLTypeInfo & | ti | ) |
Definition at line 116 of file CgenState.cpp.
References inlineFpNull(), inlineIntNull(), and SQLTypeInfo::is_fp().
Referenced by CodeGenerator::codegenPerRowStringOper().
|
inlinestatic |
Definition at line 418 of file CgenState.h.
Referenced by CodeGenerator::codegenHoistedConstantsLoads(), getOrAddLiteral(), and Executor::serializeLiterals().
|
inline |
Definition at line 263 of file CgenState.h.
References context_, and ll_bool().
Referenced by Executor::buildJoinLoops(), CodeGenerator::codegenGeosConstructorCall(), CodeGenerator::codegenGeosPredicateCall(), spatial_type::PointN::codegenIndexOutOfBoundCheck(), and CodeGenerator::NullCheckCodegen::NullCheckCodegen().
|
inline |
Definition at line 253 of file CgenState.h.
References context_.
Referenced by CodeGenerator::codegenArrayExpr(), CodeGenerator::codegenCmp(), CodeGenerator::codegenDiv(), CodeGenerator::codegenFpArith(), CodeGenerator::codegenGeoUOper(), CodeGenerator::codegenIsNullNumber(), spatial_type::PointConstructor::codegenOperandIsNull(), anonymous_namespace{WindowFunctionIR.cpp}::get_null_value_by_size(), anonymous_namespace{WindowFunctionIR.cpp}::get_null_value_by_size_with_encoding(), and inlineFpNull().
|
inline |
|
inline |
Definition at line 249 of file CgenState.h.
References context_, and ll_int().
Referenced by spatial_type::Transform::codegen(), CodeGenerator::codegen(), CodeGenerator::codegenAdd(), CodeGenerator::codegenArrayExpr(), CodeGenerator::codegenBinOpWithOverflowForCPU(), CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastBetweenIntTypesOverflowChecks(), CodeGenerator::codegenCastBetweenTimestamps(), CodeGenerator::codegenCastFromString(), CodeGenerator::codegenCastNonStringToString(), CodeGenerator::codegenCastTimestampToDate(), CodeGenerator::codegenCastTimestampToTime(), CodeGenerator::codegenCmp(), CodeGenerator::codegenCompression(), CodeGenerator::codegenDateTruncHighPrecisionTimestamps(), CodeGenerator::codegenDiv(), CodeGenerator::codegenExtractHighPrecisionTimestamps(), CodeGenerator::codegenFixedLengthColVarInWindow(), CodeGenerator::codegenFunctionOper(), CodeGenerator::codegenFunctionOperCastArgs(), CodeGenerator::codegenFunctionOperWithCustomTypeHandling(), CodeGenerator::codegenGeoArgs(), CodeGenerator::codegenGeoBinOper(), CodeGenerator::codegenGeosConstructorCall(), spatial_type::PointN::codegenGeoSize(), CodeGenerator::codegenGeosPredicateCall(), CodeGenerator::codegenGeoUOper(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codegenHoistedConstantsPlaceholders(), spatial_type::PointN::codegenIndexOutOfBoundCheck(), CodeGenerator::codegenIntConst(), CodeGenerator::codegenMod(), CodeGenerator::codegenMul(), spatial_type::PointConstructor::codegenOperandIsNull(), CodeGenerator::codegenPerRowStringOper(), CodeGenerator::codegenQualifierCmp(), CodeGenerator::codegenRowId(), CodeGenerator::codegenStringFetchAndEncode(), CodeGenerator::codegenSub(), CodeGenerator::codegenUMinus(), CodeGenerator::codegenWidthBucketExpr(), CodeGenerator::codegenWindowPosition(), CodeGenerator::codgenAdjustFixedEncNull(), anonymous_namespace{WindowFunctionIR.cpp}::get_null_value_by_size(), anonymous_namespace{WindowFunctionIR.cpp}::get_null_value_by_size_with_encoding(), inlineIntNull(), and anonymous_namespace{CompareIR.cpp}::unpack_dict_encoded_string().
void CgenState::maybeCloneFunctionRecursive | ( | llvm::Function * | fn | ) |
Definition at line 181 of file CgenState.cpp.
References CHECK, getExecutor(), and vmap_.
Referenced by spatial_type::Transform::codegen(), emitCall(), and emitEntryCall().
|
inline |
Definition at line 219 of file CgenState.h.
References in_values_bitmaps_.
|
inline |
Definition at line 199 of file CgenState.h.
References str_dict_translation_mgrs_.
Referenced by CodeGenerator::codegen(), CodeGenerator::codegenCastFromString(), and CodeGenerator::codegenPseudoStringOper().
|
inline |
Definition at line 205 of file CgenState.h.
References tree_model_prediction_mgrs_.
Referenced by CodeGenerator::codegenTreeRegPredict().
void CgenState::replaceFunctionForGpu | ( | const std::string & | fcn_to_replace, |
llvm::Function * | fn | ||
) |
Definition at line 329 of file CgenState.cpp.
References run_benchmark_import::args, CHECK, CHECK_EQ, context_, CodegenUtil::findCalledFunction(), anonymous_namespace{CgenState.cpp}::gpu_replacement_functions, module_, and VLOG.
Referenced by spatial_type::Transform::codegen().
void CgenState::set_module_shallow_copy | ( | const std::unique_ptr< llvm::Module > & | module, |
bool | always_clone = false |
||
) |
Definition at line 380 of file CgenState.cpp.
References CodeGenerator::alwaysCloneRuntimeFunction(), module_, and vmap_.
Referenced by GpuReductionHelperJIT::codegen().
std::map<std::pair<llvm::Value*, llvm::Value*>, ArrayLoadCodegen> CgenState::array_load_cache_ |
Definition at line 403 of file CgenState.h.
Referenced by CodeGenerator::codegenGeoArrayLoadAndNullcheck().
const bool CgenState::contains_left_deep_outer_join_ |
Definition at line 394 of file CgenState.h.
llvm::LLVMContext& CgenState::context_ |
Definition at line 382 of file CgenState.h.
Referenced by addStringConstant(), CodeGenerator::beginArgsNullcheck(), CodeGenerator::castArrayPointer(), castToTypeIn(), spatial_type::Transform::codegen(), CodeGenerator::codegen(), CodeGenerator::codegenAdd(), GroupByAndAggregate::codegenAggArg(), CodeGenerator::codegenArrayAt(), CodeGenerator::codegenArrayBuff(), CodeGenerator::codegenArrayExpr(), CodeGenerator::codegenBinOpWithOverflowForCPU(), CodeGenerator::codegenBoundingBoxIntersect(), CodeGenerator::codegenBufferArgs(), CodeGenerator::codegenCase(), CodeGenerator::codegenCast(), CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastBetweenIntTypesOverflowChecks(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCastFromString(), CodeGenerator::codegenCastNonStringToString(), CodeGenerator::codegenCastTimestampToDate(), CodeGenerator::codegenCastTimestampToTime(), CodeGenerator::codegenCastToFp(), CodeGenerator::codegenDateTruncHighPrecisionTimestamps(), CodeGenerator::codegenDiv(), CodeGenerator::codegenFixedLengthColVar(), CodeGenerator::codegenFixedLengthColVarInWindow(), CodeGenerator::codegenFunctionOper(), CodeGenerator::codegenFunctionOperCastArgs(), CodeGenerator::codegenFunctionOperNullArg(), CodeGenerator::codegenFunctionOperWithCustomTypeHandling(), CodeGenerator::codegenGeoArgs(), CodeGenerator::codegenGeoArrayLoadAndNullcheck(), CodeGenerator::codegenGeoBinOper(), CodeGenerator::codegenGeoConstant(), CodeGenerator::codegenGeosConstructorCall(), spatial_type::PointN::codegenGeoSize(), CodeGenerator::codegenGeosPredicateCall(), CodeGenerator::codegenGeoUOper(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codegenIsNull(), CodeGenerator::codegenLogicalShortCircuit(), CodeGenerator::codegenMod(), CodeGenerator::codegenMul(), CodeGenerator::codegenOuterJoinNullPlaceholder(), CodeGenerator::codegenPerRowStringOper(), CodeGenerator::codegenQualifierCmp(), CodeGenerator::codegenSkipOverflowCheckForNull(), CodeGenerator::codegenStringFetchAndEncode(), CodeGenerator::codegenSub(), CodeGenerator::codegenUMinus(), CodeGenerator::codegenVariableLengthStringColVar(), CodeGenerator::codegenWidthBucketExpr(), CodeGenerator::codgenAdjustFixedEncNull(), CodeGenerator::colByteStream(), anonymous_namespace{ResultSetReductionCodegen.cpp}::create_entry_block(), anonymous_namespace{ResultSetReductionJIT.cpp}::create_llvm_function(), anonymous_namespace{ResultSetReductionInterpreterStubs.cpp}::create_stub_function(), CodeGenerator::createLineStringStructType(), CodeGenerator::createMultiLineStringStructType(), CodeGenerator::createMultiPointStructType(), CodeGenerator::createMultiPolygonStructType(), CodeGenerator::createPointStructType(), CodeGenerator::createPolygonStructType(), CodeGenerator::createStringViewStructType(), emitErrorCheck(), emitExternalCall(), CodeGenerator::endArgsNullcheck(), anonymous_namespace{TableFunctionCompilationContext.cpp}::generate_entry_point(), anonymous_namespace{ExtensionsIR.cpp}::get_buffer_struct_type(), inlineIntMaxMin(), llBool(), llFp(), llInt(), AutomaticIRMetadataGuard::markInstructions(), CodeGenerator::NullCheckCodegen::NullCheckCodegen(), CodeGenerator::posArg(), replaceFunctionForGpu(), anonymous_namespace{CompareIR.cpp}::unpack_dict_encoded_string(), and anonymous_namespace{CompareIR.cpp}::unpack_none_encoded_string().
llvm::Function* CgenState::current_func_ |
Definition at line 376 of file CgenState.h.
Referenced by CodeGenerator::beginArgsNullcheck(), CodeGenerator::codegenAdd(), CodeGenerator::codegenBinOpWithOverflowForCPU(), CodeGenerator::codegenCase(), CodeGenerator::codegenCastBetweenIntTypesOverflowChecks(), CodeGenerator::codegenDiv(), CodeGenerator::codegenFixedLengthColVarInWindow(), CodeGenerator::codegenGeosConstructorCall(), CodeGenerator::codegenGeosPredicateCall(), CodeGenerator::codegenLogicalShortCircuit(), CodeGenerator::codegenMod(), CodeGenerator::codegenMul(), CodeGenerator::codegenOuterJoinNullPlaceholder(), CodeGenerator::codegenSkipOverflowCheckForNull(), CodeGenerator::codegenSub(), CodeGenerator::codegenUMinus(), CodeGenerator::codegenWidthBucketExpr(), emitErrorCheck(), and CodeGenerator::NullCheckCodegen::NullCheckCodegen().
size_t CgenState::executor_id_ |
Definition at line 276 of file CgenState.h.
Referenced by getExecutor().
std::vector<FunctionOperValue> CgenState::ext_call_cache_ |
Definition at line 390 of file CgenState.h.
Referenced by CodeGenerator::codegenFunctionOper().
std::unordered_map<size_t, std::vector<llvm::Value*> > CgenState::fetch_cache_ |
Definition at line 385 of file CgenState.h.
Referenced by CodeGenerator::codegenColVar(), and Executor::FetchCacheAnchor::~FetchCacheAnchor().
llvm::Function* CgenState::filter_func_ |
Definition at line 375 of file CgenState.h.
InsertionOrderedMap CgenState::filter_func_args_ |
Definition at line 397 of file CgenState.h.
llvm::BasicBlock* CgenState::filter_func_bb_ |
Definition at line 378 of file CgenState.h.
llvm::CallInst* CgenState::filter_func_call_ |
Definition at line 380 of file CgenState.h.
std::vector<llvm::Value*> CgenState::frag_offsets_ |
Definition at line 393 of file CgenState.h.
Referenced by CodeGenerator::codegenColVar(), and CodeGenerator::codegenRowId().
std::unordered_map<std::string, llvm::Value*> CgenState::geo_target_cache_ |
Definition at line 404 of file CgenState.h.
Referenced by CodeGenerator::codegenGeoOperator().
std::vector<llvm::Value*> CgenState::group_by_expr_cache_ |
Definition at line 391 of file CgenState.h.
Referenced by CodeGenerator::resolveGroupedColumnReference().
std::vector<llvm::Function*> CgenState::helper_functions_ |
Definition at line 381 of file CgenState.h.
std::vector<std::unique_ptr<const InValuesBitmap> > CgenState::in_values_bitmaps_ |
Definition at line 398 of file CgenState.h.
Referenced by addInValuesBitmap(), and moveInValuesBitmap().
llvm::IRBuilder CgenState::ir_builder_ |
Definition at line 384 of file CgenState.h.
Referenced by addStringConstant(), CodeGenerator::beginArgsNullcheck(), Executor::buildJoinLoops(), CodeGenerator::castArrayPointer(), castToTypeIn(), JoinLoop::codegen(), spatial_type::Transform::codegen(), CodeGenerator::codegen(), CodeGenerator::codegenAdd(), CodeGenerator::codegenArrayAt(), CodeGenerator::codegenArrayExpr(), CodeGenerator::codegenBinOpWithOverflowForCPU(), CodeGenerator::codegenBufferArgs(), CodeGenerator::codegenCase(), CodeGenerator::codegenCast(), CodeGenerator::codegenCastBetweenIntTypes(), CodeGenerator::codegenCastBetweenIntTypesOverflowChecks(), CodeGenerator::codegenCastBetweenTimestamps(), CodeGenerator::codegenCastFromFp(), CodeGenerator::codegenCastToFp(), CodeGenerator::codegenCmp(), CodeGenerator::codegenColVar(), CodeGenerator::codegenDateTruncHighPrecisionTimestamps(), CodeGenerator::codegenDiv(), CodeGenerator::codegenExtractHighPrecisionTimestamps(), CodeGenerator::codegenFixedLengthColVar(), CodeGenerator::codegenFixedLengthColVarInWindow(), CodeGenerator::codegenFpArith(), CodeGenerator::codegenFunctionOper(), CodeGenerator::codegenFunctionOperCastArgs(), CodeGenerator::codegenFunctionOperNullArg(), CodeGenerator::codegenFunctionOperWithCustomTypeHandling(), CodeGenerator::codegenGeoArgs(), CodeGenerator::codegenGeoConstant(), CodeGenerator::codegenGeoLineStringArgs(), CodeGenerator::codegenGeoMultiLineStringArgs(), CodeGenerator::codegenGeoMultiPointArgs(), CodeGenerator::codegenGeoMultiPolygonArgs(), CodeGenerator::codegenGeoPointArgs(), CodeGenerator::codegenGeoPolygonArgs(), CodeGenerator::codegenGeosConstructorCall(), CodeGenerator::codegenGeosPredicateCall(), CodeGenerator::codegenHoistedConstantsPlaceholders(), spatial_type::PointN::codegenIndexOutOfBoundCheck(), CodeGenerator::codegenIsNull(), CodeGenerator::codegenIsNullNumber(), CodeGenerator::codegenLogical(), CodeGenerator::codegenLogicalShortCircuit(), CodeGenerator::codegenMod(), CodeGenerator::codegenMul(), spatial_type::PointConstructor::codegenOperandIsNull(), CodeGenerator::codegenOuterJoinNullPlaceholder(), CodeGenerator::codegenRowId(), CodeGenerator::codegenSkipOverflowCheckForNull(), CodeGenerator::codegenStringFetchAndEncode(), CodeGenerator::codegenSub(), CodeGenerator::codegenUMinus(), CodeGenerator::codegenVariableLengthStringColVar(), CodeGenerator::codegenWidthBucketExpr(), CodeGenerator::codgenAdjustFixedEncNull(), ScalarCodeGenerator::compile(), anonymous_namespace{ResultSetReductionCodegen.cpp}::create_entry_block(), anonymous_namespace{ResultSetReductionInterpreterStubs.cpp}::create_stub_function(), CodegenUtil::createPtrWithHoistedMemoryAddr(), emitCall(), emitErrorCheck(), emitExternalCall(), CodeGenerator::endArgsNullcheck(), JoinLoop::evaluateOuterJoinCondition(), CodeGenerator::NullCheckCodegen::NullCheckCodegen(), CodeGenerator::posArg(), CodeGenerator::toBool(), anonymous_namespace{CompareIR.cpp}::unpack_dict_encoded_string(), and anonymous_namespace{CompareIR.cpp}::unpack_none_encoded_string().
|
private |
Definition at line 480 of file CgenState.h.
Referenced by getLiteralBufferUsage(), and getOrAddLiteral().
|
private |
Definition at line 479 of file CgenState.h.
Referenced by getLiterals(), and getOrAddLiteral().
llvm::Module* CgenState::module_ |
Definition at line 373 of file CgenState.h.
Referenced by AutomaticIRMetadataGuard::AutomaticIRMetadataGuard(), spatial_type::Transform::codegen(), CodeGenerator::codegenFixedLengthColVar(), anonymous_namespace{ResultSetReductionJIT.cpp}::create_llvm_function(), anonymous_namespace{ResultSetReductionInterpreterStubs.cpp}::create_stub_function(), CodeGenerator::createLineStringStructType(), CodeGenerator::createMultiLineStringStructType(), CodeGenerator::createMultiPointStructType(), CodeGenerator::createMultiPolygonStructType(), CodeGenerator::createPointStructType(), CodeGenerator::createPolygonStructType(), emitCall(), emitEntryCall(), emitExternalCall(), anonymous_namespace{TableFunctionCompilationContext.cpp}::generate_entry_point(), CodeGenerator::getArithWithOverflowIntrinsic(), AutomaticIRMetadataGuard::markInstructions(), AutomaticIRMetadataGuard::rememberOurInstructions(), AutomaticIRMetadataGuard::rememberPreexistingInstructions(), replaceFunctionForGpu(), and set_module_shallow_copy().
bool CgenState::needs_error_check_ |
Definition at line 405 of file CgenState.h.
Referenced by JoinLoop::codegen(), CodeGenerator::codegenAdd(), CodeGenerator::codegenBinOpWithOverflowForCPU(), CodeGenerator::codegenCastBetweenIntTypesOverflowChecks(), CodeGenerator::codegenDiv(), CodeGenerator::codegenGeosConstructorCall(), CodeGenerator::codegenGeosPredicateCall(), CodeGenerator::codegenMod(), CodeGenerator::codegenMul(), CodeGenerator::codegenSub(), CodeGenerator::codegenUMinus(), CodeGenerator::codegenWidthBucketExpr(), and emitErrorCheck().
bool CgenState::needs_geos_ |
Definition at line 406 of file CgenState.h.
Referenced by CodeGenerator::codegenGeosConstructorCall(), and CodeGenerator::codegenGeosPredicateCall().
std::vector<llvm::Value*> CgenState::outer_join_match_found_per_level_ |
Definition at line 395 of file CgenState.h.
Referenced by Executor::buildJoinLoops(), CodeGenerator::codegenColumn(), and CodeGenerator::foundOuterJoinMatch().
llvm::Function* CgenState::query_func_ |
Definition at line 408 of file CgenState.h.
Referenced by CodeGenerator::codegenHoistedConstantsLoads().
llvm::IRBuilder CgenState::query_func_entry_ir_builder_ |
Definition at line 409 of file CgenState.h.
Referenced by CodeGenerator::codegenHoistedConstantsLoads(), and emitEntryCall().
std::unordered_map<int, std::vector<llvm::Value*> > CgenState::query_func_literal_loads_ |
Definition at line 410 of file CgenState.h.
Referenced by CodeGenerator::codegenHoistedConstants().
llvm::Function* CgenState::row_func_ |
Definition at line 374 of file CgenState.h.
Referenced by ScalarCodeGenerator::codegenColumn(), CodeGenerator::codegenFunctionOper(), CodeGenerator::codegenRowId(), CodeGenerator::colByteStream(), ScalarCodeGenerator::compile(), and CodeGenerator::posArg().
llvm::BasicBlock* CgenState::row_func_bb_ |
Definition at line 377 of file CgenState.h.
llvm::CallInst* CgenState::row_func_call_ |
Definition at line 379 of file CgenState.h.
std::unordered_map<llvm::Value*, HoistedLiteralLoadLocator> CgenState::row_func_hoisted_literals_ |
Definition at line 416 of file CgenState.h.
Referenced by CodeGenerator::codegenHoistedConstantsPlaceholders().
std::unordered_map<int, llvm::Value*> CgenState::scan_idx_to_hash_pos_ |
Definition at line 396 of file CgenState.h.
Referenced by CodeGenerator::posArg().
std::vector<llvm::Value*> CgenState::str_constants_ |
Definition at line 392 of file CgenState.h.
Referenced by addStringConstant().
std::vector<std::unique_ptr<const StringDictionaryTranslationMgr> > CgenState::str_dict_translation_mgrs_ |
Definition at line 401 of file CgenState.h.
Referenced by moveStringDictionaryTranslationMgr().
std::vector<std::unique_ptr<const TreeModelPredictionMgr> > CgenState::tree_model_prediction_mgrs_ |
Definition at line 399 of file CgenState.h.
Referenced by moveTreeModelPredictionMgr().
llvm::ValueToValueMapTy CgenState::vmap_ |
Definition at line 383 of file CgenState.h.
Referenced by CodeGenerator::link_udf_module(), maybeCloneFunctionRecursive(), and set_module_shallow_copy().