OmniSciDB
a5dc49c757
|
#include "ResultSetReductionJIT.h"
#include "ResultSetReductionCodegen.h"
#include "ResultSetReductionInterpreterStubs.h"
#include "CodeGenerator.h"
#include "DynamicWatchdog.h"
#include "Execute.h"
#include "IRCodegenUtils.h"
#include "LLVMFunctionAttributesUtil.h"
#include "QueryEngine/QueryEngine.h"
#include "Shared/StringTransform.h"
#include "Shared/likely.h"
#include "Shared/quantile.h"
#include <llvm/Bitcode/BitcodeReader.h>
#include <llvm/IR/Function.h>
#include <llvm/IR/IRBuilder.h>
#include <llvm/IR/Verifier.h>
#include <llvm/Support/SourceMgr.h>
#include <llvm/Support/raw_os_ostream.h>
Go to the source code of this file.
Namespaces | |
anonymous_namespace{ResultSetReductionJIT.cpp} | |
Functions | |
Value * | anonymous_namespace{ResultSetReductionJIT.cpp}::emit_load (Value *ptr, Type ptr_type, Function *function) |
Value * | anonymous_namespace{ResultSetReductionJIT.cpp}::emit_load_i32 (Value *ptr, Function *function) |
Value * | anonymous_namespace{ResultSetReductionJIT.cpp}::emit_load_i64 (Value *ptr, Function *function) |
Value * | anonymous_namespace{ResultSetReductionJIT.cpp}::emit_read_int_from_buff (Value *ptr, const int8_t compact_sz, Function *function) |
void | anonymous_namespace{ResultSetReductionJIT.cpp}::emit_aggregate_one_value (const std::string &agg_kind, Value *val_ptr, Value *other_ptr, const size_t chosen_bytes, const TargetInfo &agg_info, Function *ir_reduce_one_entry) |
void | anonymous_namespace{ResultSetReductionJIT.cpp}::emit_aggregate_one_nullable_value (SQLAgg const sql_agg, Value *val_ptr, Value *other_ptr, const int64_t init_val, const size_t chosen_bytes, const TargetInfo &agg_info, Function *ir_reduce_one_entry) |
void | anonymous_namespace{ResultSetReductionJIT.cpp}::emit_aggregate_one_count (Value *val_ptr, Value *other_ptr, const size_t chosen_bytes, Function *ir_reduce_one_entry) |
void | anonymous_namespace{ResultSetReductionJIT.cpp}::emit_write_projection (Value *slot_pi8, Value *other_pi8, const int64_t init_val, const size_t chosen_bytes, Function *ir_reduce_one_entry) |
const Value * | anonymous_namespace{ResultSetReductionJIT.cpp}::emit_checked_write_projection (Value *slot_pi8, Value *other_pi8, const int64_t init_val, const size_t chosen_bytes, Function *ir_reduce_one_entry) |
std::unique_ptr< Function > | anonymous_namespace{ResultSetReductionJIT.cpp}::create_function (const std::string name, const std::vector< Function::NamedArg > &arg_types, const Type ret_type, const bool always_inline) |
std::unique_ptr< Function > | anonymous_namespace{ResultSetReductionJIT.cpp}::setup_is_empty_entry (ReductionCode *reduction_code) |
std::unique_ptr< Function > | anonymous_namespace{ResultSetReductionJIT.cpp}::setup_reduce_one_entry (ReductionCode *reduction_code, const QueryDescriptionType hash_type) |
std::unique_ptr< Function > | anonymous_namespace{ResultSetReductionJIT.cpp}::setup_reduce_one_entry_idx (ReductionCode *reduction_code) |
std::unique_ptr< Function > | anonymous_namespace{ResultSetReductionJIT.cpp}::setup_reduce_loop (ReductionCode *reduction_code) |
llvm::Function * | anonymous_namespace{ResultSetReductionJIT.cpp}::create_llvm_function (const Function *function, CgenState *cgen_state) |
ReductionCode | anonymous_namespace{ResultSetReductionJIT.cpp}::setup_functions_ir (const QueryDescriptionType hash_type) |
bool | anonymous_namespace{ResultSetReductionJIT.cpp}::is_aggregate_query (const QueryDescriptionType hash_type) |
void | anonymous_namespace{ResultSetReductionJIT.cpp}::varlen_buffer_sample (int8_t *this_ptr1, int8_t *this_ptr2, const int8_t *that_ptr1, const int8_t *that_ptr2, const int64_t init_val) |
RUNTIME_EXPORT void | serialized_varlen_buffer_sample (const void *serialized_varlen_buffer_handle, int8_t *this_ptr1, int8_t *this_ptr2, const int8_t *that_ptr1, const int8_t *that_ptr2, const int64_t init_val, const int64_t length_to_elems) |
RUNTIME_EXPORT void | count_distinct_set_union_jit_rt (const int64_t new_set_handle, const int64_t old_set_handle, const void *that_qmd_handle, const void *this_qmd_handle, const int64_t target_logical_idx) |
RUNTIME_EXPORT void | approx_quantile_jit_rt (const int64_t new_set_handle, const int64_t old_set_handle, const void *that_qmd_handle, const void *this_qmd_handle, const int64_t target_logical_idx) |
RUNTIME_EXPORT void | mode_jit_rt (const int64_t new_set_handle, const int64_t old_set_handle, const void *that_qmd_handle, const void *this_qmd_handle, const int64_t target_logical_idx) |
RUNTIME_EXPORT void | get_group_value_reduction_rt (int8_t *groups_buffer, const int8_t *key, const uint32_t key_count, const void *this_qmd_handle, const int8_t *that_buff, const uint32_t that_entry_idx, const uint32_t that_entry_count, const uint32_t row_size_bytes, int64_t **buff_out, uint8_t *empty) |
RUNTIME_EXPORT uint8_t | check_watchdog_rt (const size_t sample_seed) |
uint8_t | check_interrupt_rt (const size_t sample_seed) |
void | anonymous_namespace{ResultSetReductionJIT.cpp}::generate_loop_body (For *for_loop, Function *ir_reduce_loop, Function *ir_reduce_one_entry_idx, Value *this_buff, Value *that_buff, Value *start_index, Value *that_entry_count, Value *this_qmd_handle, Value *that_qmd_handle, Value *serialized_varlen_buffer) |
std::string | anonymous_namespace{ResultSetReductionJIT.cpp}::target_info_key (const TargetInfo &target_info) |
Variables | |
const int32_t | anonymous_namespace{ResultSetReductionJIT.cpp}::WATCHDOG_ERROR |
const int32_t | anonymous_namespace{ResultSetReductionJIT.cpp}::INTERRUPT_ERROR {10} |
const size_t | anonymous_namespace{ResultSetReductionJIT.cpp}::INTERP_THRESHOLD {25} |
RUNTIME_EXPORT void approx_quantile_jit_rt | ( | const int64_t | new_set_handle, |
const int64_t | old_set_handle, | ||
const void * | that_qmd_handle, | ||
const void * | this_qmd_handle, | ||
const int64_t | target_logical_idx | ||
) |
Definition at line 458 of file ResultSetReductionJIT.cpp.
uint8_t check_interrupt_rt | ( | const size_t | sample_seed | ) |
Definition at line 519 of file ResultSetReductionJIT.cpp.
References check_interrupt(), and UNLIKELY.
RUNTIME_EXPORT uint8_t check_watchdog_rt | ( | const size_t | sample_seed | ) |
Definition at line 511 of file ResultSetReductionJIT.cpp.
References dynamic_watchdog(), g_enable_dynamic_watchdog, and UNLIKELY.
RUNTIME_EXPORT void count_distinct_set_union_jit_rt | ( | const int64_t | new_set_handle, |
const int64_t | old_set_handle, | ||
const void * | that_qmd_handle, | ||
const void * | this_qmd_handle, | ||
const int64_t | target_logical_idx | ||
) |
Definition at line 440 of file ResultSetReductionJIT.cpp.
References CHECK, count_distinct_set_union(), QueryMemoryDescriptor::getCountDistinctDescriptor(), and Invalid.
RUNTIME_EXPORT void get_group_value_reduction_rt | ( | int8_t * | groups_buffer, |
const int8_t * | key, | ||
const uint32_t | key_count, | ||
const void * | this_qmd_handle, | ||
const int8_t * | that_buff, | ||
const uint32_t | that_entry_idx, | ||
const uint32_t | that_entry_count, | ||
const uint32_t | row_size_bytes, | ||
int64_t ** | buff_out, | ||
uint8_t * | empty | ||
) |
Definition at line 484 of file ResultSetReductionJIT.cpp.
References result_set::get_group_value_reduction().
RUNTIME_EXPORT void mode_jit_rt | ( | const int64_t | new_set_handle, |
const int64_t | old_set_handle, | ||
const void * | that_qmd_handle, | ||
const void * | this_qmd_handle, | ||
const int64_t | target_logical_idx | ||
) |
Definition at line 474 of file ResultSetReductionJIT.cpp.
References AggMode::reduce().
RUNTIME_EXPORT void serialized_varlen_buffer_sample | ( | const void * | serialized_varlen_buffer_handle, |
int8_t * | this_ptr1, | ||
int8_t * | this_ptr2, | ||
const int8_t * | that_ptr1, | ||
const int8_t * | that_ptr2, | ||
const int64_t | init_val, | ||
const int64_t | length_to_elems | ||
) |
Definition at line 410 of file ResultSetReductionJIT.cpp.
References CHECK_LT, and anonymous_namespace{ResultSetReductionJIT.cpp}::varlen_buffer_sample().