mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Rename dump_flow to dump_sblock and move to dot_sblock.c
This commit is contained in:
parent
d6d03a63b4
commit
8844ac61a2
3 changed files with 19 additions and 16 deletions
|
@ -86,6 +86,7 @@ struct expr_s;
|
|||
sblock_t *make_statements (struct expr_s *expr);
|
||||
void print_statement (statement_t *s);
|
||||
void print_sblock (sblock_t *sblock, const char *filename);
|
||||
void dump_sblock (sblock_t *sblock, const char *stage);
|
||||
const char *operand_string (operand_t *op);
|
||||
|
||||
#endif//statement_h
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
#include "dags.h"
|
||||
#include "flow.h"
|
||||
#include "expr.h"
|
||||
#include "qfcc.h"
|
||||
#include "function.h"
|
||||
#include "statements.h"
|
||||
#include "strpool.h"
|
||||
#include "symtab.h"
|
||||
|
@ -130,3 +132,14 @@ print_sblock (sblock_t *sblock, const char *filename)
|
|||
}
|
||||
dstring_delete (dstr);
|
||||
}
|
||||
|
||||
void
|
||||
dump_sblock (sblock_t *sblock, const char *stage)
|
||||
{
|
||||
char *fname;
|
||||
|
||||
fname = nva ("%s.%s.%s.dot", GETSTR (pr.source_file), current_func->name,
|
||||
stage);
|
||||
print_sblock (sblock, fname);
|
||||
free (fname);
|
||||
}
|
||||
|
|
|
@ -1170,17 +1170,6 @@ unuse_label (ex_label_t *label)
|
|||
remove_label_from_dest (label);
|
||||
}
|
||||
|
||||
static void
|
||||
dump_flow (sblock_t *sblock, const char *stage)
|
||||
{
|
||||
char *fname;
|
||||
|
||||
fname = nva ("%s.%s.%s.dot", GETSTR (pr.source_file), current_func->name,
|
||||
stage);
|
||||
print_sblock (sblock, fname);
|
||||
free (fname);
|
||||
}
|
||||
|
||||
static void
|
||||
thread_jumps (sblock_t *blocks)
|
||||
{
|
||||
|
@ -1401,22 +1390,22 @@ make_statements (expr_t *e)
|
|||
// print_expr (e);
|
||||
statement_slist (sblock, e);
|
||||
if (options.block_dot.initial)
|
||||
dump_flow (sblock, "initial");
|
||||
dump_sblock (sblock, "initial");
|
||||
thread_jumps (sblock);
|
||||
if (options.block_dot.thread)
|
||||
dump_flow (sblock, "thread");
|
||||
dump_sblock (sblock, "thread");
|
||||
do {
|
||||
remove_dead_blocks (sblock);
|
||||
} while (merge_blocks (sblock));
|
||||
if (options.block_dot.dead)
|
||||
dump_flow (sblock, "dead");
|
||||
dump_sblock (sblock, "dead");
|
||||
check_final_block (sblock);
|
||||
if (options.block_dot.final)
|
||||
dump_flow (sblock, "final");
|
||||
dump_sblock (sblock, "final");
|
||||
|
||||
//for (s = sblock; s; s = s->next)
|
||||
// s->dag = make_dag (s);
|
||||
//if (options.block_dot.dags)
|
||||
// dump_flow (sblock, "dags");
|
||||
// dump_sblock (sblock, "dags");
|
||||
return sblock;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue