|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "jit/llvmjit.h"#include <fcntl.h>#include <sys/mman.h>#include <sys/stat.h>#include <sys/types.h>#include <unistd.h>#include "common/string.h"#include "miscadmin.h"#include "storage/fd.h"#include <llvm-c/Core.h>#include <llvm-c/BitReader.h>#include <llvm/ADT/SetVector.h>#include <llvm/ADT/StringSet.h>#include <llvm/ADT/StringMap.h>#include <llvm/Analysis/ModuleSummaryAnalysis.h>#include <llvm/Bitcode/BitcodeReader.h>#include <llvm/IR/Attributes.h>#include <llvm/IR/DebugInfo.h>#include <llvm/IR/IntrinsicInst.h>#include <llvm/IR/IRBuilder.h>#include <llvm/IR/ModuleSummaryIndex.h>#include <llvm/Linker/IRMover.h>#include <llvm/Support/ManagedStatic.h>#include <llvm/Support/MemoryBuffer.h>
Go to the source code of this file.
Data Structures | |
| struct | InlineWorkListItem |
| struct | FunctionInlineState |
Macros | |
| #define | ilog(...) (void) 0 |
| #define | starts_with startswith |
Variables | |
| const float | inline_cost_decay_factor = 0.5 |
| const int | inline_initial_cost = 150 |
| llvm::ManagedStatic< ModuleCache > | module_cache |
| llvm::ManagedStatic< SummaryCache > | summary_cache |
Definition at line 147 of file llvmjit_inline.cpp.
| #define starts_with startswith |
Definition at line 90 of file llvmjit_inline.cpp.
Definition at line 96 of file llvmjit_inline.cpp.
Definition at line 67 of file llvmjit_inline.cpp.
Definition at line 77 of file llvmjit_inline.cpp.
Definition at line 106 of file llvmjit_inline.cpp.
Definition at line 108 of file llvmjit_inline.cpp.
|
static |
Definition at line 797 of file llvmjit_inline.cpp.
References Assert, fb(), llvm_load_summary(), pkglib_path, and summary_cache.
Referenced by llvm_build_inline_plan().
|
static |
Definition at line 850 of file llvmjit_inline.cpp.
Referenced by llvm_execute_inline_plan().
|
static |
Definition at line 572 of file llvmjit_inline.cpp.
References FunctionInlineState::costLimit, DEBUG1, elog, F, FATAL, fb(), function_inlinable(), function_references(), ilog, and inline_cost_decay_factor.
Referenced by function_inlinable(), and llvm_build_inline_plan().
|
static |
Definition at line 515 of file llvmjit_inline.cpp.
Referenced by function_inlinable().
|
static |
Definition at line 183 of file llvmjit_inline.cpp.
References add_module_to_inline_search_path(), Assert, DEBUG1, elog, FATAL, fb(), function_inlinable(), ilog, inline_initial_cost, llvm_split_symbol_name(), load_module_cached(), InlineWorkListItem::searchpath, summaries_for_guid(), and InlineWorkListItem::symbolName.
Referenced by llvm_inline().
|
static |
Definition at line 381 of file llvmjit_inline.cpp.
References Assert, create_redirection_function(), DEBUG1, elog, F, FATAL, fb(), funcname, ilog, llvm_split_symbol_name(), and module_cache.
Referenced by llvm_inline().
| void llvm_inline | ( | LLVMModuleRef | M | ) |
Definition at line 167 of file llvmjit_inline.cpp.
References fb(), llvm_build_inline_plan(), and llvm_execute_inline_plan().
Referenced by llvm_compile_module().
Definition at line 156 of file llvmjit_inline.cpp.
References module_cache, and summary_cache.
Referenced by llvm_recreate_llvm_context().
|
static |
Definition at line 768 of file llvmjit_inline.cpp.
References DEBUG1, elog, FATAL, fb(), and ilog.
Referenced by add_module_to_inline_search_path().
|
static |
Definition at line 485 of file llvmjit_inline.cpp.
References buf, elog, FATAL, fb(), MAXPGPATH, pkglib_path, and snprintf.
Referenced by load_module_cached().
|
static |
Definition at line 472 of file llvmjit_inline.cpp.
References fb(), load_module(), and module_cache.
Referenced by llvm_build_inline_plan().
|
static |
Definition at line 829 of file llvmjit_inline.cpp.
References fb().
Referenced by llvm_build_inline_plan().
Definition at line 99 of file llvmjit_inline.cpp.
Referenced by function_inlinable().
Definition at line 100 of file llvmjit_inline.cpp.
Referenced by llvm_build_inline_plan().
| llvm::ManagedStatic<ModuleCache> module_cache |
Definition at line 107 of file llvmjit_inline.cpp.
Referenced by llvm_execute_inline_plan(), llvm_inline_reset_caches(), and load_module_cached().
| llvm::ManagedStatic<SummaryCache> summary_cache |
Definition at line 109 of file llvmjit_inline.cpp.
Referenced by add_module_to_inline_search_path(), and llvm_inline_reset_caches().