Commit 1b21df92 authored by Moritz Kroll's avatar Moritz Kroll
Browse files

Make get_idx_irn(irg, idx) public (useful for debugging purposes)

[r24894]
parent f2e9c62b
......@@ -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. */
/********************************************************************************/
......
......@@ -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);
......
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment