Make the reaching defs dot dump optional.

This commit is contained in:
Bill Currie 2012-12-10 12:17:20 +09:00
parent e4dd86c36b
commit fa45ab842f
3 changed files with 6 additions and 1 deletions

View file

@ -75,6 +75,7 @@ typedef struct {
qboolean final;
qboolean dags;
qboolean expr;
qboolean reaching;
qboolean flow;
qboolean post;
} blockdot_options_t;

View file

@ -1061,7 +1061,8 @@ flow_data_flow (function_t *func)
graph = flow_build_graph (func);
func->graph = graph;
flow_reaching_defs (graph);
dump_dot ("reaching", graph, dump_dot_flow_reaching);
if (options.block_dot.reaching)
dump_dot ("reaching", graph, dump_dot_flow_reaching);
flow_live_vars (graph);
flow_uninitialized (graph);
flow_build_dags (graph);

View file

@ -400,6 +400,8 @@ DecodeArgs (int argc, char **argv)
options.block_dot.expr = flag;
} else if (!(strcasecmp (temp, "flow"))) {
options.block_dot.flow = flag;
} else if (!(strcasecmp (temp, "reaching"))) {
options.block_dot.reaching = flag;
} else if (!(strcasecmp (temp, "post"))) {
options.block_dot.post = flag;
}
@ -414,6 +416,7 @@ DecodeArgs (int argc, char **argv)
options.block_dot.dags = true;
options.block_dot.expr = true;
options.block_dot.flow = true;
options.block_dot.reaching = true;
options.block_dot.post = true;
}
break;