diff options
author | Eric Anholt <[email protected]> | 2012-12-04 13:52:19 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-12-14 15:17:55 -0800 |
commit | ba864bfcfaceac37a5f9292795dc5aba7dc2c0e2 (patch) | |
tree | e5c214e034ada95ab413ce32c543c8af98ed9b8b /src | |
parent | 7a9f940cab8e5a3bbbab3e302de2311b36159d91 (diff) |
i965/fs: Add some optional debug printfs to scheduling.
Seeing when instructions become available to schedule is really useful.
Acked-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp index 24612625e30..14de5f804a3 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp @@ -52,6 +52,8 @@ * from in picking among those. */ +static bool debug = false; + class schedule_node : public exec_node { public: @@ -513,6 +515,11 @@ instruction_scheduler::schedule_instructions(fs_inst *next_block_header) */ time = MAX2(time + 1, chosen_time); + if (debug) { + printf("clock %4d, scheduled: ", time); + v->dump_instruction(chosen->inst); + } + /* Now that we've scheduled a new instruction, some of its * children can be promoted to the list of instructions ready to * be scheduled. Update the children's unblocked time for this @@ -526,6 +533,10 @@ instruction_scheduler::schedule_instructions(fs_inst *next_block_header) child->parent_count--; if (child->parent_count == 0) { + if (debug) { + printf("now available: "); + v->dump_instruction(child->inst); + } instructions.push_tail(child); } } @@ -560,6 +571,11 @@ fs_visitor::schedule_instructions(bool post_reg_alloc) else grf_count = virtual_grf_count; + if (debug) { + printf("\nInstructions before scheduling (reg_alloc %d)\n", post_reg_alloc); + dump_instructions(); + } + instruction_scheduler sched(this, mem_ctx, grf_count, post_reg_alloc); while (!next_block_header->is_tail_sentinel()) { @@ -583,5 +599,10 @@ fs_visitor::schedule_instructions(bool post_reg_alloc) sched.schedule_instructions(next_block_header); } + if (debug) { + printf("\nInstructions after scheduling (reg_alloc %d)\n", post_reg_alloc); + dump_instructions(); + } + this->live_intervals_valid = false; } |