+/* Return the floating point model of this graph. */
+static INLINE unsigned
+_get_irg_fp_model(const ir_graph *irg) {
+ return irg->fp_model;
+}
+
+/**
+ * Allocates a new idx in the irg for the node and adds the irn to the idx -> irn map.
+ * @param irg The graph.
+ * @param irn The node.
+ * @return The index allocated for the node.
+ */
+static INLINE unsigned
+irg_register_node_idx(ir_graph *irg, ir_node *irn)
+{
+ unsigned idx = irg->last_node_idx++;
+ if(idx >= (unsigned) ARR_LEN(irg->idx_irn_map))
+ ARR_RESIZE(ir_node *, irg->idx_irn_map, idx + 1);
+
+ irg->idx_irn_map[idx] = irn;
+ return idx;
+}
+
+/**
+ * Kill a node from the irg. BEWARE: this kills
+ * all later created nodes.
+ */
+static INLINE void
+irg_kill_node(ir_graph *irg, ir_node *n) {
+ unsigned idx = get_irn_idx(n);
+ if (idx + 1 == irg->last_node_idx)
+ --irg->last_node_idx;
+ irg->idx_irn_map[idx] = NULL;
+ obstack_free(irg->obst, n);
+}
+
+/**
+ * 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.
+ */
+static INLINE ir_node *
+get_idx_irn(ir_graph *irg, unsigned idx) {
+ assert(idx < (unsigned) ARR_LEN(irg->idx_irn_map));
+ return irg->idx_irn_map[idx];
+}
+