+/**
+ * @file
+ * @brief Phase information handling using node indexes.
+ * @author Sebastian Hack
+ * @version $Id: irphase_t.h 27270 2010-03-07 22:20:43Z matze $
+ */
+#ifndef FIRM_IR_PHASE_H
+#define FIRM_IR_PHASE_H
+
+#include "firm_types.h"
+
+typedef struct ir_phase ir_phase;
+typedef void *(phase_irn_init)(ir_phase *phase, const ir_node *irn);
+typedef void *(phase_irn_reinit)(ir_phase *phase, const ir_node *irn,
+ void *old_data);
+
+/**
+ * Allocate and initialize a new phase object
+ *
+ * @param irg The graph the phase will run on.
+ * @param irn_data_init A callback that is called to initialize newly created
+ * node data. Must be non-null. You could use
+ * phase_irn_init_default
+ * @return A new phase object.
+ */
+ir_phase *new_phase(ir_graph *irg, phase_irn_init *data_init);
+
+/**
+ * Variant for custom memory-management/classes. Just initialize given phase
+ * structure (performs no allocation, you do not need to call this for phases
+ * allocated with new_phase)
+ */
+void phase_init(ir_phase *phase, ir_graph *irg, phase_irn_init *data_init);