From: Luo Xionghu <[email protected]> aslo call llvm::WriteBitcodeToFile for -dump-spir-binary option under LLVM 3.5.
Signed-off-by: Luo Xionghu <[email protected]> --- backend/src/backend/program.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp index daf6af0..14b802a 100644 --- a/backend/src/backend/program.cpp +++ b/backend/src/backend/program.cpp @@ -667,6 +667,20 @@ namespace gbe { (*out_module)->print(ostream, 0); } //Otherwise, you'll have to make do without the dump. } + + if (!dumpSPIRBinaryName.empty()) { + std::string err; + llvm::raw_fd_ostream ostream (dumpSPIRBinaryName.c_str(), + err, + #if LLVM_VERSION_MINOR == 3 + 0 + #else + llvm::sys::fs::F_None + #endif + ); + if (err.empty()) + llvm::WriteBitcodeToFile(*out_module, ostream); + } #else if (!dumpLLVMFileName.empty()) { std::error_code err; -- 1.9.1 _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
