*/
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. */
/********************************************************************************/
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);
* @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];
}
#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