diff options
Diffstat (limited to 'tensorflow/compiler/xla/service/cpu/compiler_functor.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/cpu/compiler_functor.cc | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/tensorflow/compiler/xla/service/cpu/compiler_functor.cc b/tensorflow/compiler/xla/service/cpu/compiler_functor.cc index 128eea4828..6a7eb85e3b 100644 --- a/tensorflow/compiler/xla/service/cpu/compiler_functor.cc +++ b/tensorflow/compiler/xla/service/cpu/compiler_functor.cc @@ -156,26 +156,9 @@ std::unique_ptr<llvm::MemoryBuffer> CompilerFunctor::operator()( target_machine_->addPassesToEmitMC(codegen_passes, mc_context, ostream); codegen_passes.run(module); - std::unique_ptr<llvm::MemoryBuffer> memory_buffer( + // Construct ObjectFile from machine code buffer. + return std::unique_ptr<llvm::MemoryBuffer>( new llvm::SmallVectorMemoryBuffer(std::move(stream_buffer))); - - if (VLOG_IS_ON(2)) { - llvm::Expected<std::unique_ptr<llvm::object::ObjectFile>> obj_file = - llvm::object::ObjectFile::createObjectFile(*memory_buffer); - if (obj_file) { - StatusOr<DisassemblerResult> disasm_result = - disassembler_->DisassembleObjectFile(*obj_file.get()); - if (disasm_result.ok()) { - XLA_VLOG_LINES(2, disasm_result.ValueOrDie().text); - } else { - LOG(WARNING) << "Could not disassemble object file!"; - } - } else { - LOG(WARNING) << "Could convert memory buffer to object file!"; - } - } - - return memory_buffer; } static std::vector<llvm::VecDesc> VectorFunctionsForTargetLibraryInfoImpl() { |