Rename dot_flow.c and print_flow.

They're now dot_sblock.c and print_sblock. The new names both better
reflect their purpose and free up "flow" for outputting the real flow
analysis graphs.
This commit is contained in:
Bill Currie 2012-11-01 12:19:38 +09:00
parent c483770121
commit 8b374305d2
5 changed files with 9 additions and 9 deletions

View file

@ -85,7 +85,7 @@ struct expr_s;
sblock_t *make_statements (struct expr_s *expr);
void print_statement (statement_t *s);
void print_flow (sblock_t *sblock, const char *filename);
void print_sblock (sblock_t *sblock, const char *filename);
const char *operand_string (operand_t *op);
#endif//statement_h

View file

@ -40,7 +40,7 @@ bin_SCRIPTS= qfpreqcc
common_src=\
class.c codespace.c constfold.c cpp.c dags.c debug.c def.c defspace.c \
diagnostic.c dot_dag.c dot_expr.c dot_flow.c emit.c expr.c \
diagnostic.c dot_dag.c dot_expr.c dot_sblock.c emit.c expr.c \
flow.c function.c grab.c idstuff.c linker.c method.c obj_file.c \
obj_type.c opcodes.c options.c qfcc.c reloc.c set.c shared.c statements.c \
strpool.c struct.c switch.c symtab.c type.c value.c

View file

@ -1,7 +1,7 @@
/*
dot_flow.c
dot_sblock.c
"emit" flow graphs to dot (graphvis).
"emit" sblock graphs to dot (graphvis).
Copyright (C) 2011 Bill Currie <bill@taniwha.org>
@ -103,12 +103,12 @@ flow_sblock (dstring_t *dstr, sblock_t *sblock, int blockno)
}
void
print_flow (sblock_t *sblock, const char *filename)
print_sblock (sblock_t *sblock, const char *filename)
{
int i;
dstring_t *dstr = dstring_newstr();
dasprintf (dstr, "digraph flow_%p {\n", sblock);
dasprintf (dstr, "digraph sblock_%p {\n", sblock);
dasprintf (dstr, " layout=dot; rankdir=TB;\n");
for (i = 0; sblock; sblock = sblock->next, i++)
flow_sblock (dstr, sblock, i);

View file

@ -646,8 +646,8 @@ emit_function (function_t *f, expr_t *e)
flow_build_vars (f);
flow_build_graph (f);
if (options.block_dot.flow)
print_flow (f->sblock, nva ("%s.%s.%s.dot", GETSTR (pr.source_file),
f->name, "flow"));
print_sblock (f->sblock, nva ("%s.%s.%s.dot", GETSTR (pr.source_file),
f->name, "flow"));
{
flowloop_t *l;
int n = 0;

View file

@ -1177,7 +1177,7 @@ dump_flow (sblock_t *sblock, const char *stage)
fname = nva ("%s.%s.%s.dot", GETSTR (pr.source_file), current_func->name,
stage);
print_flow (sblock, fname);
print_sblock (sblock, fname);
free (fname);
}