freedreno/ir3: some more debug prints
Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user