Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
04319dfd
Commit
04319dfd
authored
Jun 26, 2014
by
Matthias Braun
Browse files
make more dump helper functions accessible for other modules
parent
3ea09378
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/ir/irdump.c
View file @
04319dfd
...
...
@@ -1146,7 +1146,7 @@ static void print_edge_vcgattr(FILE *F, const ir_node *from, int to)
}
/** dump edges to our inputs */
static
void
dump_ir_data_edges
(
FILE
*
F
,
const
ir_node
*
n
)
void
dump_ir_data_edges
(
FILE
*
F
,
const
ir_node
*
n
)
{
if
(
dump_node_edge_hook
)
dump_node_edge_hook
(
F
,
n
);
...
...
@@ -1265,12 +1265,7 @@ static void dump_const_expression(FILE *F, ir_node *value)
ir_set_dump_flags
(
old_flags
);
}
/** Dump a block as graph containing its nodes.
*
* Expects to find nodes belonging to the block as list in its
* link field.
* Dumps the edges of all nodes including itself. */
static
void
dump_whole_block
(
FILE
*
F
,
const
ir_node
*
block
)
void
dump_begin_block_subgraph
(
FILE
*
F
,
const
ir_node
*
block
)
{
assert
(
is_Block
(
block
));
...
...
@@ -1290,12 +1285,34 @@ static void dump_whole_block(FILE *F, const ir_node *block)
/* yComp can show attributes for blocks, XVCG parses but ignores them */
dump_node_info
(
F
,
block
);
print_dbg_info
(
F
,
get_irn_dbg_info
(
block
));
}
void
dump_end_block_subgraph
(
FILE
*
F
,
const
ir_node
*
block
)
{
(
void
)
block
;
/* Close the vcg information for the block */
fprintf
(
F
,
"}
\n
"
);
dump_const_node_local
(
F
,
block
);
fprintf
(
F
,
"
\n
"
);
}
void
dump_block_edges
(
FILE
*
F
,
const
ir_node
*
block
)
{
/* dump the blocks edges */
dump_ir_data_edges
(
F
,
block
);
if
(
dump_block_edge_hook
)
dump_block_edge_hook
(
F
,
block
);
}
/** Dump a block as graph containing its nodes.
*
* Expects to find nodes belonging to the block as list in its
* link field.
* Dumps the edges of all nodes including itself. */
static
void
dump_whole_block
(
FILE
*
F
,
const
ir_node
*
block
)
{
dump_begin_block_subgraph
(
F
,
block
);
/* dump the nodes that go into the block */
for
(
ir_node
*
node
=
(
ir_node
*
)
ird_get_irn_link
(
block
);
node
!=
NULL
;
...
...
@@ -1305,9 +1322,8 @@ static void dump_whole_block(FILE *F, const ir_node *block)
}
/* Close the vcg information for the block */
fprintf
(
F
,
"}
\n
"
);
dump_const_node_local
(
F
,
block
);
fprintf
(
F
,
"
\n
"
);
dump_end_block_subgraph
(
F
,
block
);
dump_block_edges
(
F
,
block
);
}
/** dumps a graph block-wise. Expects all blockless nodes in arr in irgs link.
...
...
ir/ir/irdump_t.h
View file @
04319dfd
...
...
@@ -36,6 +36,10 @@ void dump_vcg_footer(FILE *out);
void
dump_vcg_header_colors
(
FILE
*
out
);
void
dump_vcg_infonames
(
FILE
*
out
);
void
dump_node
(
FILE
*
out
,
const
ir_node
*
node
);
void
dump_ir_data_edges
(
FILE
*
F
,
const
ir_node
*
n
);
void
dump_begin_block_subgraph
(
FILE
*
F
,
const
ir_node
*
block
);
void
dump_end_block_subgraph
(
FILE
*
F
,
const
ir_node
*
block
);
void
dump_block_edges
(
FILE
*
F
,
const
ir_node
*
block
);
/** Write the irnode and all its attributes to the file passed.
* (plain text format) */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment