Dump statements during flow analysis.

This commit is contained in:
Bill Currie 2018-08-21 15:56:39 +09:00
parent 5ba13d759b
commit 1b84ea747c
3 changed files with 6 additions and 0 deletions

View file

@ -77,6 +77,7 @@ typedef struct {
qboolean final;
qboolean dags;
qboolean expr;
qboolean statements;
qboolean reaching;
qboolean live;
qboolean flow;

View file

@ -1262,6 +1262,8 @@ flow_data_flow (function_t *func)
flow_build_statements (func);
flow_build_vars (func);
graph = flow_build_graph (func);
if (options.block_dot.statements)
dump_dot ("statements", graph, dump_dot_flow_statements);
flow_reaching_defs (graph);
if (options.block_dot.reaching)
dump_dot ("reaching", graph, dump_dot_flow_reaching);

View file

@ -411,6 +411,8 @@ DecodeArgs (int argc, char **argv)
options.block_dot.flow = flag;
} else if (!(strcasecmp (temp, "reaching"))) {
options.block_dot.reaching = flag;
} else if (!(strcasecmp (temp, "statements"))) {
options.block_dot.statements = flag;
} else if (!(strcasecmp (temp, "live"))) {
options.block_dot.live = flag;
} else if (!(strcasecmp (temp, "post"))) {
@ -428,6 +430,7 @@ DecodeArgs (int argc, char **argv)
options.block_dot.expr = true;
options.block_dot.flow = true;
options.block_dot.reaching = true;
options.block_dot.statements = true;
options.block_dot.live = true;
options.block_dot.post = true;
}