diff options
author | Kenneth Graunke <[email protected]> | 2013-08-18 18:06:13 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-08-21 21:05:50 -0700 |
commit | 9d08756ac7d27b5a392d17c2a91a55cec6edab5d (patch) | |
tree | 25d2d9908c2ef8478dd2569bd37da35d28a2a9ad /src | |
parent | 63ac68bae398884b3b704eccf58a8a9fe8aac9e6 (diff) |
i965/fs: Add code to print out global copy propagation sets.
This was invaluable when debugging the global copy propagation
algorithm. We may as well commit it in case someone needs to print
out the sets in the future.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp index 74644985c70..2780ab6fd6d 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -83,6 +83,8 @@ public: void setup_initial_values(); void run(); + void dump_block_data() const; + void *mem_ctx; cfg_t *cfg; @@ -243,6 +245,34 @@ fs_copy_prop_dataflow::run() } while (progress); } +void +fs_copy_prop_dataflow::dump_block_data() const +{ + for (int b = 0; b < cfg->num_blocks; b++) { + bblock_t *block = cfg->blocks[b]; + printf("Block %d [%d, %d] (parents ", block->block_num, + block->start_ip, block->end_ip); + foreach_list(block_node, &block->parents) { + bblock_t *parent = ((bblock_link *) block_node)->block; + printf("%d ", parent->block_num); + } + printf("):\n"); + printf(" livein = 0x"); + for (int i = 0; i < bitset_words; i++) + printf("%08x", bd[b].livein[i]); + printf(", liveout = 0x"); + for (int i = 0; i < bitset_words; i++) + printf("%08x", bd[b].liveout[i]); + printf(",\n copy = 0x"); + for (int i = 0; i < bitset_words; i++) + printf("%08x", bd[b].copy[i]); + printf(", kill = 0x"); + for (int i = 0; i < bitset_words; i++) + printf("%08x", bd[b].kill[i]); + printf("\n"); + } +} + bool fs_visitor::try_copy_propagate(fs_inst *inst, int arg, acp_entry *entry) { |