+ IR_GRAPH_CONSTRAINT_OPTIMIZE_UNREACHABLE_CODE = 1U << 3,
+ /**
+ * The graph is being constructed: We have a current_block set,
+ * and blocks contain mapping of variable numbers to current
+ * values.
+ */
+ IR_GRAPH_CONSTRAINT_CONSTRUCTION = 1U << 4,
+ /**
+ * Intermediate language constructs not supported by the backend have
+ * been lowered.
+ */
+ IR_GRAPH_CONSTRAINT_TARGET_LOWERED = 1U << 5,
+ /**
+ * We have a backend graph: all data values have register constraints
+ * annotated.
+ */
+ IR_GRAPH_CONSTRAINT_BACKEND = 1U << 6,
+} ir_graph_constraints_t;
+ENUM_BITSET(ir_graph_constraints_t)
+
+/** sets @p constraints on the graph @p irg */
+FIRM_API void add_irg_constraints(ir_graph *irg,
+ ir_graph_constraints_t constraints);
+/** clears some graph constraints */
+FIRM_API void clear_irg_constraints(ir_graph *irg,
+ ir_graph_constraints_t constraints);
+/** queries whether @p irg is at least as constrained as @p constraints. */
+FIRM_API int irg_is_constrained(const ir_graph *irg,
+ ir_graph_constraints_t constraints);
+
+/**
+ * graph state. They properties about a graph.
+ * Graph transformations may destroy these properties and have to explicitely
+ * state when they did not affect some properties and want to keep them.
+ */
+typedef enum ir_graph_properties_t {
+ IR_GRAPH_PROPERTIES_NONE = 0,