---
 src/mesa/drivers/dri/i965/brw_cfg.cpp | 10 ++++++++++
 src/mesa/drivers/dri/i965/brw_cfg.h   |  1 +
 2 files changed, 11 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp 
b/src/mesa/drivers/dri/i965/brw_cfg.cpp
index 2d6a181..095c34f 100644
--- a/src/mesa/drivers/dri/i965/brw_cfg.cpp
+++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp
@@ -504,3 +504,13 @@ cfg_t::dump_cfg()
    }
    printf("}\n");
 }
+
+void
+cfg_t::dump_domtree()
+{
+   printf("digraph CFG {\n");
+   foreach_block(block, this) {
+      printf("\t%d -> %d\n", block->idom->num, block->num);
+   }
+   printf("}\n");
+}
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h 
b/src/mesa/drivers/dri/i965/brw_cfg.h
index 4d4eb2d..56d7d07 100644
--- a/src/mesa/drivers/dri/i965/brw_cfg.h
+++ b/src/mesa/drivers/dri/i965/brw_cfg.h
@@ -275,6 +275,7 @@ struct cfg_t {
 
    void dump(backend_visitor *v);
    void dump_cfg();
+   void dump_domtree();
 #endif
    void *mem_ctx;
 
-- 
2.0.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to