From: Matt Turner Date: Sat, 26 Sep 2015 21:40:09 +0000 (-0700) Subject: i965: Don't print line numbers with INTEL_DEBUG=optimizer. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cd7fa1034adc8891b094a0a52fbbbef0cc708e3d;p=mesa.git i965: Don't print line numbers with INTEL_DEBUG=optimizer. The thing you want to do with the output files is diff them, which is made more difficult by line numbers changing. Reviewed-by: Alejandro PiƱeiro --- diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 3960e869421..a16e5958776 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp @@ -1307,13 +1307,15 @@ backend_shader::dump_instructions(const char *name) if (cfg) { int ip = 0; foreach_block_and_inst(block, backend_instruction, inst, cfg) { - fprintf(file, "%4d: ", ip++); + if (!unlikely(INTEL_DEBUG & DEBUG_OPTIMIZER)) + fprintf(file, "%4d: ", ip++); dump_instruction(inst, file); } } else { int ip = 0; foreach_in_list(backend_instruction, inst, &instructions) { - fprintf(file, "%4d: ", ip++); + if (!unlikely(INTEL_DEBUG & DEBUG_OPTIMIZER)) + fprintf(file, "%4d: ", ip++); dump_instruction(inst, file); } }