diff options
author | Rob Clark <[email protected]> | 2018-01-29 15:33:55 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-02-10 14:54:58 -0500 |
commit | 930ca0e03862a86b4fe0933661e4220cf114bfb0 (patch) | |
tree | ca6a9260d9d091aef092313eb2484c67c60d88c0 /src/gallium/drivers | |
parent | a84e32484778fb535d3ad8a266b884e14ad194da (diff) |
freedreno/ir3: some more debug prints
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_print.c | 31 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c index 15a3aa4c802..23888770fbe 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c @@ -3352,6 +3352,11 @@ ir3_compile_shader_nir(struct ir3_compiler *compiler, */ ir3_group(ir); + if (fd_mesa_debug & FD_DBG_OPTMSGS) { + printf("AFTER GROUPING:\n"); + ir3_print(ir); + } + ir3_depth(ir); if (fd_mesa_debug & FD_DBG_OPTMSGS) { diff --git a/src/gallium/drivers/freedreno/ir3/ir3_print.c b/src/gallium/drivers/freedreno/ir3/ir3_print.c index 8aebf21a1be..c399c69ea2a 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_print.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_print.c @@ -41,6 +41,7 @@ static void print_instr_name(struct ir3_instruction *instr) printf("%04u:", instr->serialno); #endif printf("%04u:", instr->name); + printf("%04u:", instr->ip); printf("%03u: ", instr->depth); if (instr->flags & IR3_INSTR_SY) @@ -196,6 +197,17 @@ print_instr(struct ir3_instruction *instr, int lvl) printf(", target=block%u", block_id(instr->cat0.target)); } + if (instr->deps_count) { + printf(", false-deps:"); + for (unsigned i = 0; i < instr->deps_count; i++) { + if (i > 0) + printf(", "); + printf("_["); + print_instr_name(instr->deps[i]); + printf("]"); + } + } + printf("\n"); } @@ -208,9 +220,28 @@ static void print_block(struct ir3_block *block, int lvl) { tab(lvl); printf("block%u {\n", block_id(block)); + + if (block->predecessors_count > 0) { + tab(lvl+1); + printf("pred: "); + for (unsigned i = 0; i < block->predecessors_count; i++) { + if (i) + printf(", "); + printf("block%u", block_id(block->predecessors[i])); + } + printf("\n"); + } + list_for_each_entry (struct ir3_instruction, instr, &block->instr_list, node) { print_instr(instr, lvl+1); } + + tab(lvl+1); printf("/* keeps:\n"); + for (unsigned i = 0; i < block->keeps_count; i++) { + print_instr(block->keeps[i], lvl+2); + } + tab(lvl+1); printf(" */\n"); + if (block->successors[1]) { /* leading into if/else: */ tab(lvl+1); |