summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover
diff options
context:
space:
mode:
authorEdB <[email protected]>2015-01-28 02:20:38 +0200
committerFrancisco Jerez <[email protected]>2015-01-28 02:27:41 +0200
commit6ee5effac1ac8858c96820ece352be57c5c53cf6 (patch)
tree61a0d073ca861acadfb5f7b81a9bbeeae56ecda0 /src/gallium/state_trackers/clover
parent13d23a9a176b62453d36035b5d793082a638a686 (diff)
clover/llvm: Dump the OpenCL C code earlier.
[ Francisco Jerez: As discussed on the mailing list, this is intended to produce more useful debug output in cases where the compilation terminates unexpectedly. ] Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover')
-rw-r--r--src/gallium/state_trackers/clover/llvm/invocation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index 085bb6ac182..0794e6156de 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -717,6 +717,9 @@ clover::compile_program_llvm(const compat::string &source,
llvm_ctx.setDiagnosticHandler(diagnostic_handler, &r_log);
#endif
+ if (get_debug_flags() & DBG_CLC)
+ debug_log(source, ".cl");
+
// The input file name must have the .cl extension in order for the
// CompilerInvocation class to recognize it as an OpenCL source file.
llvm::Module *mod = compile_llvm(llvm_ctx, source, headers, "input.cl",
@@ -727,9 +730,6 @@ clover::compile_program_llvm(const compat::string &source,
optimize(mod, optimization_level, kernels);
- if (get_debug_flags() & DBG_CLC)
- debug_log(source, ".cl");
-
if (get_debug_flags() & DBG_LLVM) {
std::string log;
llvm::raw_string_ostream s_log(log);