| 165 | } |
| 166 | |
| 167 | Status NonGroupingAggregatorConfig::CodegenAddBatchImpl( |
| 168 | LlvmCodeGen* codegen, TPrefetchMode::type prefetch_mode) { |
| 169 | llvm::Function* update_tuple_fn; |
| 170 | RETURN_IF_ERROR(CodegenUpdateTuple(codegen, &update_tuple_fn)); |
| 171 | |
| 172 | // Get the cross compiled update row batch function |
| 173 | IRFunction::Type ir_fn = IRFunction::NON_GROUPING_AGG_ADD_BATCH_IMPL; |
| 174 | llvm::Function* add_batch_impl_fn = codegen->GetFunction(ir_fn, true); |
| 175 | DCHECK(add_batch_impl_fn != nullptr); |
| 176 | |
| 177 | int replaced; |
| 178 | replaced = codegen->ReplaceCallSites(add_batch_impl_fn, update_tuple_fn, "UpdateTuple"); |
| 179 | DCHECK_GE(replaced, 1); |
| 180 | add_batch_impl_fn = codegen->FinalizeFunction(add_batch_impl_fn); |
| 181 | if (add_batch_impl_fn == nullptr) { |
| 182 | return Status("NonGroupingAggregator::CodegenAddBatchImpl(): codegen'd " |
| 183 | "AddBatchImpl() function failed verification, see log"); |
| 184 | } |
| 185 | |
| 186 | codegen->AddFunctionToJit(add_batch_impl_fn, &add_batch_impl_fn_); |
| 187 | return Status::OK(); |
| 188 | } |
| 189 | } // namespace impala |
nothing calls this directly
no test coverage detected