From ec6bad140b780aaa10f7c02c8e2eb46f12671d4d Mon Sep 17 00:00:00 2001 From: Pierre Moreau Date: Tue, 5 May 2020 13:14:26 +0200 Subject: [PATCH] clover/spirv: Print linked SPIR-V module if asked Signed-off-by: Pierre Moreau Reviewed-by: Serge Martin Reviewed-by: Karol Herbst Reviewed-by: Francisco Jerez Part-of: --- src/gallium/frontends/clover/spirv/invocation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/frontends/clover/spirv/invocation.cpp b/src/gallium/frontends/clover/spirv/invocation.cpp index 2adfc668f99..e4b1565288f 100644 --- a/src/gallium/frontends/clover/spirv/invocation.cpp +++ b/src/gallium/frontends/clover/spirv/invocation.cpp @@ -654,6 +654,9 @@ clover::spirv::link_program(const std::vector &modules, if (!is_valid_spirv(final_binary, opencl_version, r_log)) throw error(CL_LINK_PROGRAM_FAILURE); + if (has_flag(llvm::debug::spirv)) + llvm::debug::log(".spvasm", spirv::print_module(final_binary, dev.device_version())); + for (const auto &mod : modules) m.syms.insert(m.syms.end(), mod.syms.begin(), mod.syms.end()); -- 2.30.2