+
+/**
+ * Register a phase on an irg.
+ * The phase will then be managed by the irg. This means you can easily
+ * access the phase when you only have a graph handle, the memory will be
+ * freed when the graph is freed and some care is taken that the phase data
+ * will be invalidated/preserved on events like dead code elemination and
+ * code selection.
+ */
+void irg_register_phase(ir_graph *irg, ir_phase_id id, ir_phase *phase);
+
+/**
+ * Frees all phase infos attached to an irg
+ */
+void irg_invalidate_phases(ir_graph *irg);
+
+/**
+ * return phase with given id
+ */
+static inline ir_phase *irg_get_phase(const ir_graph *irg, ir_phase_id id)