| 456 | } |
| 457 | |
| 458 | Status Engine::LoadExternalPreCompiledIR() { |
| 459 | const auto& buffers = function_registry_->GetBitcodeBuffers(); |
| 460 | for (const auto& buffer : buffers) { |
| 461 | auto llvm_memory_buffer_ref = AsLLVMMemoryBuffer(*buffer); |
| 462 | auto module_or_error = llvm::parseBitcodeFile(llvm_memory_buffer_ref, *context()); |
| 463 | ARROW_ASSIGN_OR_RAISE( |
| 464 | auto src_ir_module, |
| 465 | AsArrowResult(module_or_error, "Failed to verify and link module: ")); |
| 466 | RemoveBuildTargetAttributes(*src_ir_module); |
| 467 | ARROW_RETURN_NOT_OK(VerifyAndLinkModule(*module_, std::move(src_ir_module))); |
| 468 | } |
| 469 | |
| 470 | return Status::OK(); |
| 471 | } |
| 472 | |
| 473 | // Get rid of all functions that don't need to be compiled. |
| 474 | // This helps in reducing the overall compilation time. This pass is trivial, |
nothing calls this directly
no test coverage detected