| 457 | } |
| 458 | |
| 459 | Status VerifyLlvmModule(const llvm::Module& llvm_module) { |
| 460 | XLA_SCOPED_LOGGING_TIMER("CpuCompiler - Running LLVM verifier"); |
| 461 | |
| 462 | std::string err; |
| 463 | llvm::raw_string_ostream err_stream(err); |
| 464 | |
| 465 | // verifyModule() returns true if the module is broken. |
| 466 | TF_RET_CHECK(!llvm::verifyModule(llvm_module, &err_stream)) |
| 467 | << "Invalid LLVM IR before optimizations:\n" |
| 468 | << err_stream.str() |
| 469 | << "\nThis probably indicates a bug in the HLO -> LLVM IR lowering. " |
| 470 | "Rerun with --xla_dump_to to get the IR. "; |
| 471 | return Status::OK(); |
| 472 | } |
| 473 | |
| 474 | Status CreateHloProfilingArtifacts( |
| 475 | const HloModule& module, |
no outgoing calls
no test coverage detected