ir_graph *get_current_ir_graph(void);
void set_current_ir_graph(ir_graph *graph);
+#ifdef INTERPROCEDURAL_VIEW
/** This flag indicate the current view. The behavior of some methods
* (get_irn_*, set_irn_*) is influenced by this flag. */
int get_interprocedural_view(void);
void set_interprocedural_view(int state);
+#else
+#define get_interprocedural_view() 0
+#endif
/**
* Create a new ir graph to build ir for a procedure.
/** Returns the number of value numbers of a graph. */
int get_irg_n_locs (ir_graph *irg);
+#ifdef DEBUG_libfirm
/** Returns the graph number. */
-long get_irg_graph_nr(ir_graph *irg);
+long get_irg_graph_nr(const ir_graph *irg);
+#endif
+
+/**
+ * Returns the graph number. This is a unique number for the graph and is
+ * smaller than get_irp_last_idx()
+ * Note: you cannot use this number for get_irp_irg
+ */
+int get_irg_idx(const ir_graph *irg);
/********************************************************************************/
/* States of an ir_graph. */