MCPcopy Create free account
hub / github.com/apache/impala / CodegenWriteToSlot

Method CodegenWriteToSlot

be/src/runtime/descriptors.cc:923–944  ·  view source on GitHub ↗

Example IR for materializing a string column with non-NULL 'pool'. Includes the part that is generated by CodegenAnyVal::ToReadWriteInfo(). Produced for the following query as part of the @MaterializeExprs() function. select string_col from functional_orc_def.alltypes order by string_col limit 2; ; [insert point starts here] br label %entry1 entry1: ; p

Source from the content-addressed store, hash-verified

921// end_write: ; preds = %null, %non_null
922// ; [insert point ends here]
923void SlotDescriptor::CodegenWriteToSlot(const CodegenAnyValReadWriteInfo& read_write_info,
924 llvm::Value* tuple_llvm_struct_ptr, llvm::Value* pool_val,
925 llvm::BasicBlock* insert_before) const {
926 DCHECK(tuple_llvm_struct_ptr->getType()->isPointerTy());
927 DCHECK(tuple_llvm_struct_ptr->getType()->getPointerElementType()->isStructTy());
928 LlvmBuilder* builder = read_write_info.builder();
929 llvm::LLVMContext& context = read_write_info.codegen()->context();
930 llvm::Function* fn = builder->GetInsertBlock()->getParent();
931
932 // Create new block that will come after conditional blocks if necessary
933 if (insert_before == nullptr) {
934 insert_before = llvm::BasicBlock::Create(context, "end_write", fn);
935 }
936
937 read_write_info.entry_block().BranchTo(builder);
938
939 CodegenWriteToSlotHelper(read_write_info, tuple_llvm_struct_ptr,
940 tuple_llvm_struct_ptr, pool_val, NonWritableBasicBlock(insert_before));
941
942 // Leave builder_ after conditional blocks
943 builder->SetInsertPoint(insert_before);
944}
945
946llvm::Value* SlotDescriptor::CodegenGetNullByte(
947 LlvmCodeGen* codegen, LlvmBuilder* builder,

Callers 1

Calls 9

CreateClass · 0.85
contextMethod · 0.80
getParentMethod · 0.80
BranchToMethod · 0.80
entry_blockMethod · 0.80
getTypeMethod · 0.65
builderMethod · 0.45
codegenMethod · 0.45

Tested by

no test coverage detected