frontend: compile: specify filename of select graph debug output
This commit is contained in:
@@ -229,6 +229,9 @@ static b_result generate_mie_ir(struct compile_ctx *ctx)
|
|||||||
static b_result build_block_isel_graph(
|
static b_result build_block_isel_graph(
|
||||||
struct compile_ctx *ctx, struct mie_func *func, struct mie_block *block)
|
struct compile_ctx *ctx, struct mie_func *func, struct mie_block *block)
|
||||||
{
|
{
|
||||||
|
printf("selecting %s.%s...\n", func->f_base.v_name.n_str,
|
||||||
|
block->b_base.v_name.n_str);
|
||||||
|
|
||||||
b_queue_entry *entry = b_queue_first(&block->b_phi);
|
b_queue_entry *entry = b_queue_first(&block->b_phi);
|
||||||
while (entry) {
|
while (entry) {
|
||||||
struct mie_value *instr_v
|
struct mie_value *instr_v
|
||||||
@@ -254,9 +257,13 @@ static b_result build_block_isel_graph(
|
|||||||
struct mie_select_graph *graph = mie_select_builder_finish(ctx->select);
|
struct mie_select_graph *graph = mie_select_builder_finish(ctx->select);
|
||||||
|
|
||||||
if (ctx->flags & FLAG_SHOW_PRE_SELECT_GRAPH) {
|
if (ctx->flags & FLAG_SHOW_PRE_SELECT_GRAPH) {
|
||||||
|
char name[128];
|
||||||
|
snprintf(
|
||||||
|
name, sizeof name, "%s.%s.dot",
|
||||||
|
func->f_base.v_name.n_str, block->b_base.v_name.n_str);
|
||||||
printf("%s.%s instruction graph:\n", func->f_base.v_name.n_str,
|
printf("%s.%s instruction graph:\n", func->f_base.v_name.n_str,
|
||||||
block->b_base.v_name.n_str);
|
block->b_base.v_name.n_str);
|
||||||
mie_select_graph_dump_dot(graph);
|
mie_select_graph_dump_dot(graph, name);
|
||||||
mie_select_graph_destroy(graph);
|
mie_select_graph_destroy(graph);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user