summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-10-05 16:21:10 -0700
committerKenneth Graunke <[email protected]>2015-10-10 11:40:19 -0700
commita4e988f4814d80b27102c48020c4338a6d86c6da (patch)
tree75f2bb6c5738b1a255b4cf81c2c1a1f53fa828d7 /src/mesa
parent2496cfd771cff250bce5c53ca9d79dbf64d7cbcf (diff)
i965/cfg: Fix cfg_t::dump() when a block has no immediate dominator.
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. v2: With less exuberance Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_cfg.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mesa/drivers/dri/i965/brw_cfg.cpp
index 531fa16b387..10bcd4bafd4 100644
--- a/src/mesa/drivers/dri/i965/brw_cfg.cpp
+++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp
@@ -426,7 +426,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);
+
foreach_list_typed(bblock_link, link, link, &block->parents) {
fprintf(stderr, " <-B%d",
link->block->num);