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
| 921 | // end_write: ; preds = %null, %non_null |
| 922 | // ; [insert point ends here] |
| 923 | void 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 | |
| 946 | llvm::Value* SlotDescriptor::CodegenGetNullByte( |
| 947 | LlvmCodeGen* codegen, LlvmBuilder* builder, |
no test coverage detected