Struct CgenState¶
-
struct
CgenState
¶ Public Types
-
using
LiteralValue
= boost::variant<int8_t, int16_t, int32_t, int64_t, float, double, std::pair<std::string, int>, 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 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)¶
-
size_t
getOrAddLiteral
(const Analyzer::Constant *constant, const EncodingType enc_type, const int 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 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)¶
-
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 &type_info)¶
-
llvm::ConstantFP *
inlineFpNull
(const SQLTypeInfo &type_info)¶
-
llvm::Constant *
inlineNull
(const SQLTypeInfo &ti)¶
-
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)¶
-
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)¶
Public Members
-
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<int, 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 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_
¶
Public Static Functions
-
static size_t
literalBytes
(const CgenState::LiteralValue &lit)¶
-
static size_t
addAligned
(const size_t off_in, const size_t alignment)¶
Private Members
-
std::unordered_map<int, LiteralValues>
literals_
¶
-
std::unordered_map<int, size_t>
literal_bytes_
¶
-
struct
FunctionOperValue
¶
-
struct
HoistedLiteralLoadLocator
¶
-
using