[Mesa-dev] [PATCH 04/10] i965/cfg: Add function to generate a dot file of the dominator tree.

Kenneth Graunke kenneth at whitecape.org
Mon Feb 9 17:54:15 PST 2015


On Wednesday, February 04, 2015 08:21:21 PM Matt Turner wrote:
> ---
>  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");

Shouldn't this be "digraph domtree" or such?  Looks like "digraph CFG"
got copy and pasted from the previous patch.

Patches 1, 3-5 are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

> +   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;
>  
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150209/61de3216/attachment.sig>


More information about the mesa-dev mailing list