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
1b21df92
Commit
1b21df92
authored
Dec 25, 2008
by
Moritz Kroll
Browse files
Make get_idx_irn(irg, idx) public (useful for debugging purposes)
[r24894]
parent
f2e9c62b
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/libfirm/irgraph.h
View file @
1b21df92
...
...
@@ -287,6 +287,16 @@ long get_irg_graph_nr(const ir_graph *irg);
*/
int
get_irg_idx
(
const
ir_graph
*
irg
);
/**
* Get the node for an index.
* @param irg The graph.
* @param idx The index you want the node for.
* @return The node with that index or NULL, if there is no node with that index.
* @note The node you got might be dead.
*/
ir_node
*
get_idx_irn
(
ir_graph
*
irg
,
unsigned
idx
);
/********************************************************************************/
/* States of an ir_graph. */
/********************************************************************************/
...
...
ir/ir/irgraph.c
View file @
1b21df92
...
...
@@ -584,6 +584,10 @@ int get_irg_idx(const ir_graph *irg) {
return
irg
->
index
;
}
ir_node
*
(
get_idx_irn
)(
ir_graph
*
irg
,
unsigned
idx
)
{
return
_get_idx_irn
(
irg
,
idx
);
}
ir_node
*
(
get_irg_start_block
)(
const
ir_graph
*
irg
)
{
return
_get_irg_start_block
(
irg
);
...
...
ir/ir/irgraph_t.h
View file @
1b21df92
...
...
@@ -494,7 +494,7 @@ irg_kill_node(ir_graph *irg, ir_node *n) {
* @note The node you got might be dead.
*/
static
inline
ir_node
*
get_idx_irn
(
ir_graph
*
irg
,
unsigned
idx
)
{
_
get_idx_irn
(
ir_graph
*
irg
,
unsigned
idx
)
{
assert
(
idx
<
(
unsigned
)
ARR_LEN
(
irg
->
idx_irn_map
));
return
irg
->
idx_irn_map
[
idx
];
}
...
...
@@ -600,5 +600,6 @@ _get_interprocedural_view(void) {
#define dec_irg_block_visited(irg) _dec_irg_block_visited(irg)
#define get_irg_estimated_node_cnt(irg) _get_irg_estimated_node_cnt(irg)
#define get_irg_fp_model(irg) _get_irg_fp_model(irg)
#define get_idx_irn(irg, idx) _get_idx_irn(irg, idx)
#endif
Write
Preview
Markdown
is supported
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