[Mesa-dev] [PATCH] i965/cfg: Fix cfg_t::dump() when a block has no immediate dominator.
Matt Turner
mattst88 at gmail.com
Tue Oct 6 12:02:12 PDT 2015
On Tue, Oct 6, 2015 at 10:01 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Switch statements introduce a bogus loop with an unconditional break at
> the end of the loop, just before the while...so the while is unreachable
> and has no immediate dominator.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
> src/mesa/drivers/dri/i965/brw_cfg.cpp | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mesa/drivers/dri/i965/brw_cfg.cpp
> index 91d53ef..97e0624 100644
> --- a/src/mesa/drivers/dri/i965/brw_cfg.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp
> @@ -422,7 +422,11 @@ cfg_t::dump(backend_shader *s)
> calculate_idom();
>
> foreach_block (block, this) {
> - fprintf(stderr, "START B%d IDOM(B%d)", block->num, block->idom->num);
> + if (block->idom)
> + fprintf(stderr, "START B%d IDOM(B%d)", block->num, block->idom->num);
> + else
> + fprintf(stderr, "START B%d IDOM(NONE?!)", block->num);
s/NONE?!/none/ and
Reviewed-by: Matt Turner <mattst88 at gmail.com>
More information about the mesa-dev
mailing list