Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <llvm-codegen.h>
Public Member Functions | |
FnPrototype (LlvmCodeGen *, const std::string &name, llvm::Type *ret_type) | |
const std::string & | name () const |
Returns name of function. More... | |
void | AddArgument (const NamedVariable &var) |
Add argument. More... | |
llvm::Function * | GeneratePrototype (LlvmBuilder *builder=NULL, llvm::Value **params=NULL) |
Private Attributes | |
LlvmCodeGen * | codegen_ |
std::string | name_ |
llvm::Type * | ret_type_ |
std::vector< NamedVariable > | args_ |
Friends | |
class | LlvmCodeGen |
Abstraction over function prototypes. Contains helpers to build prototypes and generate IR for the types.
Definition at line 161 of file llvm-codegen.h.
impala::LlvmCodeGen::FnPrototype::FnPrototype | ( | LlvmCodeGen * | , |
const std::string & | name, | ||
llvm::Type * | ret_type | ||
) |
Create a function prototype object, specifying the name of the function and the return type.
Definition at line 454 of file llvm-codegen.cc.
References codegen_, and impala::LlvmCodeGen::is_compiled_.
|
inline |
Add argument.
Definition at line 171 of file llvm-codegen.h.
References args_.
Referenced by impala::LlvmCodeGen::AddFunctionToJit(), CodegenCrcHash(), impala::HashJoinNode::CodegenCreateOutputRow(), impala::PartitionedHashJoinNode::CodegenCreateOutputRow(), impala::HashTableCtx::CodegenEquals(), impala::OldHashTable::CodegenEquals(), impala::ExecNode::CodegenEvalConjuncts(), impala::HashTableCtx::CodegenEvalRow(), impala::OldHashTable::CodegenEvalTupleRow(), impala::HashTableCtx::CodegenHashCurrentRow(), impala::OldHashTable::CodegenHashCurrentRow(), impala::SlotDescriptor::CodegenIsNull(), impala::HdfsAvroScanner::CodegenMaterializeTuple(), impala::LlvmCodeGen::CodegenMinMax(), impala::CodegenStringTest(), impala::SlotDescriptor::CodegenUpdateNull(), impala::AggregationNode::CodegenUpdateSlot(), impala::PartitionedAggregationNode::CodegenUpdateSlot(), impala::AggregationNode::CodegenUpdateTuple(), impala::PartitionedAggregationNode::CodegenUpdateTuple(), impala::HdfsScanner::CodegenWriteCompleteTuple(), impala::TextConverter::CodegenWriteSlot(), impala::Expr::CreateIrFunctionPrototype(), impala::LlvmCodeGen::GetHashFunction(), and impala::TEST_F().
Function * impala::LlvmCodeGen::FnPrototype::GeneratePrototype | ( | LlvmBuilder * | builder = NULL , |
llvm::Value ** | params = NULL |
||
) |
Generate LLVM function prototype. If a non-null builder is passed, this function will also create the entry block and set the builder's insert point to there. If params is non-null, this function will also return the arguments values (params[0] is the first arg, etc). In that case, params should be preallocated to be number of arguments
Definition at line 460 of file llvm-codegen.cc.
References gen_ir_descriptions::idx.
Referenced by impala::CodegenInnerLoop(), impala::LlvmCodeGen::CodegenMinMax(), impala::Expr::CreateIrFunctionPrototype(), and impala::LlvmCodeGen::GetLibCFunction().
|
inline |
Returns name of function.
Definition at line 168 of file llvm-codegen.h.
References name_.
Referenced by impala::LlvmCodeGen::GetLibCFunction().
|
friend |
Definition at line 185 of file llvm-codegen.h.
|
private |
Definition at line 190 of file llvm-codegen.h.
Referenced by AddArgument().
|
private |
Definition at line 187 of file llvm-codegen.h.
Referenced by FnPrototype().
|
private |
Definition at line 188 of file llvm-codegen.h.
Referenced by name().
|
private |
Definition at line 189 of file llvm-codegen.h.