Make the post-optimization sblocks dump optional.

This commit is contained in:
Bill Currie 2012-11-19 15:24:09 +09:00
parent bcde7396a0
commit 1e72e3eb20
3 changed files with 6 additions and 1 deletions

View file

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

View file

@ -435,6 +435,7 @@ flow_generate (flowgraph_t *graph)
// generate new statements from the dag; // generate new statements from the dag;
dag_generate (node->dag, block); dag_generate (node->dag, block);
} }
if (options.block_dot.post)
dump_dot ("post", code, dump_dot_sblock); dump_dot ("post", code, dump_dot_sblock);
return code; return code;
} }

View file

@ -393,6 +393,8 @@ DecodeArgs (int argc, char **argv)
options.block_dot.dags = flag; options.block_dot.dags = flag;
} else if (!(strcasecmp (temp, "flow"))) { } else if (!(strcasecmp (temp, "flow"))) {
options.block_dot.flow = flag; options.block_dot.flow = flag;
} else if (!(strcasecmp (temp, "post"))) {
options.block_dot.post = flag;
} }
temp = strtok (NULL, ","); temp = strtok (NULL, ",");
} }
@ -404,6 +406,7 @@ DecodeArgs (int argc, char **argv)
options.block_dot.final = true; options.block_dot.final = true;
options.block_dot.dags = true; options.block_dot.dags = true;
options.block_dot.flow = true; options.block_dot.flow = true;
options.block_dot.post = true;
} }
break; break;
case 'c': case 'c':