OmniSciDB
0264ff685a
|
Functions | |
void | throw_parseIR_error (const llvm::SMDiagnostic &parse_error, std::string src="", const bool is_gpu=false) |
template<typename T = void> | |
void | show_defined (llvm::Module &module) |
template<typename T = void> | |
void | show_defined (llvm::Module *module) |
template<typename T = void> | |
void | show_defined (std::unique_ptr< llvm::Module > &module) |
template<typename T = void> | |
void | scan_function_calls (llvm::Function &F, std::unordered_set< std::string > &defined, std::unordered_set< std::string > &undefined, const std::unordered_set< std::string > &ignored) |
template<typename T = void> | |
void | scan_function_calls (llvm::Module &module, std::unordered_set< std::string > &defined, std::unordered_set< std::string > &undefined, const std::unordered_set< std::string > &ignored) |
template<typename T = void> | |
std::tuple< std::unordered_set< std::string >, std::unordered_set< std::string > > | scan_function_calls (llvm::Module &module, const std::unordered_set< std::string > &ignored={}) |
void | eliminate_dead_self_recursive_funcs (llvm::Module &M, const std::unordered_set< llvm::Function *> &live_funcs) |
void | optimize_ir (llvm::Function *query_func, llvm::Module *module, llvm::legacy::PassManager &pass_manager, const std::unordered_set< llvm::Function *> &live_funcs, const CompilationOptions &co) |
std::string | assemblyForCPU (ExecutionEngineWrapper &execution_engine, llvm::Module *module) |
std::string | cpp_to_llvm_name (const std::string &s) |
std::string | gen_array_any_all_sigs () |
std::string | gen_translate_null_key_sigs () |
void | bind_pos_placeholders (const std::string &pos_fn_name, const bool use_resume_param, llvm::Function *query_func, llvm::Module *module) |
void | set_row_func_argnames (llvm::Function *row_func, const size_t in_col_count, const size_t agg_col_count, const bool hoist_literals) |
llvm::Function * | create_row_function (const size_t in_col_count, const size_t agg_col_count, const bool hoist_literals, llvm::Module *module, llvm::LLVMContext &context) |
void | bind_query (llvm::Function *query_func, const std::string &query_fname, llvm::Function *multifrag_query_func, llvm::Module *module) |
std::vector< std::string > | get_agg_fnames (const std::vector< Analyzer::Expr *> &target_exprs, const bool is_group_by) |
template<typename InstType > | |
llvm::Value * | find_variable_in_basic_block (llvm::Function *func, std::string bb_name, std::string variable_name) |
size_t | get_shared_memory_size (const bool shared_mem_used, const QueryMemoryDescriptor *query_mem_desc_ptr) |
bool | is_gpu_shared_mem_supported (const QueryMemoryDescriptor *query_mem_desc_ptr, const RelAlgExecutionUnit &ra_exe_unit, const CudaMgr_Namespace::CudaMgr *cuda_mgr, const ExecutorDeviceType device_type, const unsigned gpu_blocksize, const unsigned num_blocks_per_mp) |
std::string | serialize_llvm_metadata_footnotes (llvm::Function *query_func, CgenState *cgen_state) |
Variables | |
const std::string | cuda_rt_decls |
std::string anonymous_namespace{NativeCodegen.cpp}::assemblyForCPU | ( | ExecutionEngineWrapper & | execution_engine, |
llvm::Module * | module | ||
) |
Definition at line 396 of file NativeCodegen.cpp.
References CHECK.
Referenced by CodeGenerator::generateNativeCPUCode().
void anonymous_namespace{NativeCodegen.cpp}::bind_pos_placeholders | ( | const std::string & | pos_fn_name, |
const bool | use_resume_param, | ||
llvm::Function * | query_func, | ||
llvm::Module * | module | ||
) |
Definition at line 1383 of file NativeCodegen.cpp.
References get_arg_by_name().
Referenced by Executor::compileWorkUnit().
void anonymous_namespace{NativeCodegen.cpp}::bind_query | ( | llvm::Function * | query_func, |
const std::string & | query_fname, | ||
llvm::Function * | multifrag_query_func, | ||
llvm::Module * | module | ||
) |
Definition at line 1523 of file NativeCodegen.cpp.
References run_benchmark_import::args.
Referenced by Executor::compileWorkUnit().
std::string anonymous_namespace{NativeCodegen.cpp}::cpp_to_llvm_name | ( | const std::string & | s | ) |
Definition at line 549 of file NativeCodegen.cpp.
References CHECK.
Referenced by gen_array_any_all_sigs(), and gen_translate_null_key_sigs().
llvm::Function* anonymous_namespace{NativeCodegen.cpp}::create_row_function | ( | const size_t | in_col_count, |
const size_t | agg_col_count, | ||
const bool | hoist_literals, | ||
llvm::Module * | module, | ||
llvm::LLVMContext & | context | ||
) |
Definition at line 1459 of file NativeCodegen.cpp.
References get_int_type(), and set_row_func_argnames().
Referenced by Executor::compileWorkUnit().
void anonymous_namespace{NativeCodegen.cpp}::eliminate_dead_self_recursive_funcs | ( | llvm::Module & | M, |
const std::unordered_set< llvm::Function *> & | live_funcs | ||
) |
Definition at line 248 of file NativeCodegen.cpp.
References logger::DEBUG1, logger::INFO, and LOG.
Referenced by optimize_ir().
llvm::Value* anonymous_namespace{NativeCodegen.cpp}::find_variable_in_basic_block | ( | llvm::Function * | func, |
std::string | bb_name, | ||
std::string | variable_name | ||
) |
std::string anonymous_namespace{NativeCodegen.cpp}::gen_array_any_all_sigs | ( | ) |
Definition at line 566 of file NativeCodegen.cpp.
References cpp_to_llvm_name(), and run_benchmark_import::result.
std::string anonymous_namespace{NativeCodegen.cpp}::gen_translate_null_key_sigs | ( | ) |
Definition at line 584 of file NativeCodegen.cpp.
References cpp_to_llvm_name(), and run_benchmark_import::result.
std::vector<std::string> anonymous_namespace{NativeCodegen.cpp}::get_agg_fnames | ( | const std::vector< Analyzer::Expr *> & | target_exprs, |
const bool | is_group_by | ||
) |
Definition at line 1549 of file NativeCodegen.cpp.
References CHECK, g_rt_module, Analyzer::AggExpr::get_aggtype(), getGlobalLLVMContext(), kAPPROX_COUNT_DISTINCT, kAPPROX_MEDIAN, kAVG, kCOUNT, kENCODING_NONE, kMAX, kMIN, kSAMPLE, kSINGLE_VALUE, kSUM, read_template_module(), and run_benchmark_import::result.
Referenced by Executor::compileWorkUnit().
size_t anonymous_namespace{NativeCodegen.cpp}::get_shared_memory_size | ( | const bool | shared_mem_used, |
const QueryMemoryDescriptor * | query_mem_desc_ptr | ||
) |
Definition at line 2257 of file NativeCodegen.cpp.
References QueryMemoryDescriptor::getEntryCount(), and QueryMemoryDescriptor::getRowSize().
Referenced by Executor::compileWorkUnit().
bool anonymous_namespace{NativeCodegen.cpp}::is_gpu_shared_mem_supported | ( | const QueryMemoryDescriptor * | query_mem_desc_ptr, |
const RelAlgExecutionUnit & | ra_exe_unit, | ||
const CudaMgr_Namespace::CudaMgr * | cuda_mgr, | ||
const ExecutorDeviceType | device_type, | ||
const unsigned | gpu_blocksize, | ||
const unsigned | num_blocks_per_mp | ||
) |
To simplify the implementation for practical purposes, we initially provide shared memory support for cases where there are at most as many entries in the output buffer as there are threads within each GPU device. In order to relax this assumption later, we need to add a for loop in generated codes such that each thread loops over multiple entries. TODO: relax this if necessary
Definition at line 2264 of file NativeCodegen.cpp.
References CHECK, QueryMemoryDescriptor::countDistinctDescriptorsLogicallyEmpty(), CPU, QueryMemoryDescriptor::didOutputColumnar(), g_enable_smem_group_by, g_enable_smem_grouped_non_count_agg, g_enable_smem_non_grouped_agg, g_gpu_smem_threshold, QueryMemoryDescriptor::getEntryCount(), CudaMgr_Namespace::CudaMgr::getMinSharedMemoryPerBlockForAllDevices(), QueryMemoryDescriptor::getQueryDescriptionType(), QueryMemoryDescriptor::getRowSize(), GroupByPerfectHash, QueryMemoryDescriptor::hasKeylessHash(), CudaMgr_Namespace::CudaMgr::isArchMaxwellOrLaterForAll(), kAVG, kCOUNT, kMAX, kMIN, kSUM, NonGroupedAggregate, RelAlgExecutionUnit::target_exprs, target_exprs_to_infos(), and QueryMemoryDescriptor::useStreamingTopN().
Referenced by Executor::compileWorkUnit().
void anonymous_namespace{NativeCodegen.cpp}::optimize_ir | ( | llvm::Function * | query_func, |
llvm::Module * | module, | ||
llvm::legacy::PassManager & | pass_manager, | ||
const std::unordered_set< llvm::Function *> & | live_funcs, | ||
const CompilationOptions & | co | ||
) |
Definition at line 309 of file NativeCodegen.cpp.
References eliminate_dead_self_recursive_funcs(), LoopStrengthReduction, and CompilationOptions::opt_level.
Referenced by Executor::compileWorkUnit(), CodeGenerator::generateNativeCPUCode(), and CodeGenerator::generateNativeGPUCode().
void anonymous_namespace{NativeCodegen.cpp}::scan_function_calls | ( | llvm::Function & | F, |
std::unordered_set< std::string > & | defined, | ||
std::unordered_set< std::string > & | undefined, | ||
const std::unordered_set< std::string > & | ignored | ||
) |
Definition at line 197 of file NativeCodegen.cpp.
References scan_function_calls().
void anonymous_namespace{NativeCodegen.cpp}::scan_function_calls | ( | llvm::Module & | module, |
std::unordered_set< std::string > & | defined, | ||
std::unordered_set< std::string > & | undefined, | ||
const std::unordered_set< std::string > & | ignored | ||
) |
Definition at line 227 of file NativeCodegen.cpp.
References scan_function_calls().
std::tuple<std::unordered_set<std::string>, std::unordered_set<std::string> > anonymous_namespace{NativeCodegen.cpp}::scan_function_calls | ( | llvm::Module & | module, |
const std::unordered_set< std::string > & | ignored = {} |
||
) |
Definition at line 240 of file NativeCodegen.cpp.
Referenced by scan_function_calls().
std::string anonymous_namespace{NativeCodegen.cpp}::serialize_llvm_metadata_footnotes | ( | llvm::Function * | query_func, |
CgenState * | cgen_state | ||
) |
Definition at line 2376 of file NativeCodegen.cpp.
References CgenState::filter_func_, CgenState::module_, CgenState::row_func_, and split().
Referenced by Executor::compileWorkUnit().
void anonymous_namespace{NativeCodegen.cpp}::set_row_func_argnames | ( | llvm::Function * | row_func, |
const size_t | in_col_count, | ||
const size_t | agg_col_count, | ||
const bool | hoist_literals | ||
) |
Definition at line 1410 of file NativeCodegen.cpp.
References to_string().
Referenced by create_row_function().
void anonymous_namespace{NativeCodegen.cpp}::show_defined | ( | llvm::Module & | module | ) |
Definition at line 158 of file NativeCodegen.cpp.
void anonymous_namespace{NativeCodegen.cpp}::show_defined | ( | llvm::Module * | module | ) |
Definition at line 169 of file NativeCodegen.cpp.
References show_defined().
void anonymous_namespace{NativeCodegen.cpp}::show_defined | ( | std::unique_ptr< llvm::Module > & | module | ) |
Definition at line 178 of file NativeCodegen.cpp.
Referenced by show_defined().
void anonymous_namespace{NativeCodegen.cpp}::throw_parseIR_error | ( | const llvm::SMDiagnostic & | parse_error, |
std::string | src = "" , |
||
const bool | is_gpu = false |
||
) |
Definition at line 126 of file NativeCodegen.cpp.
Referenced by CodeGenerator::generatePTX(), read_rt_udf_cpu_module(), read_rt_udf_gpu_module(), read_udf_cpu_module(), and read_udf_gpu_module().
const std::string anonymous_namespace{NativeCodegen.cpp}::cuda_rt_decls |
Definition at line 594 of file NativeCodegen.cpp.