Mesa (master): i965/cfg: Allow cfg::dump to be called without a visitor.
Matt Turner
mattst88 at kemper.freedesktop.org
Wed Feb 18 04:44:56 UTC 2015
Module: Mesa
Branch: master
Commit: 08f304bb3bfd4cc93bcc9108063afb7a8b2dd806
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=08f304bb3bfd4cc93bcc9108063afb7a8b2dd806
Author: Matt Turner <mattst88 at gmail.com>
Date: Tue Feb 18 16:38:07 2014 -0800
i965/cfg: Allow cfg::dump to be called without a visitor.
The fs_visitor's dump_instruction() implementation calls cfg_t()
indirectly through calculate_live_intervals, so if you have an infinite
loop in the CFG code, you can't call cfg::dump(fs_visitor *) to debug
it.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_cfg.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mesa/drivers/dri/i965/brw_cfg.cpp
index 62cc239..ca5b01c 100644
--- a/src/mesa/drivers/dri/i965/brw_cfg.cpp
+++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp
@@ -418,7 +418,8 @@ cfg_t::dump(backend_visitor *v) const
link->block->num);
}
fprintf(stderr, "\n");
- block->dump(v);
+ if (v != NULL)
+ block->dump(v);
fprintf(stderr, "END B%d", block->num);
foreach_list_typed(bblock_link, link, link, &block->children) {
fprintf(stderr, " ->B%d",
More information about the mesa-commit
mailing list