+ * @note Think of the irp as the "handle" of a program.
+ */
+FIRM_API ir_prog *irp;
+
+/**
+ * Resources usable by algorithms modifying the program
+ */
+typedef enum irp_resources_t {
+ IRP_RESOURCE_NONE = 0, /**< no resource */
+ /** irg link field @see set_irg_link(), get_irg_link() */
+ IRP_RESOURCE_IRG_LINK = 1 << 0,
+ /** entity link field @see set_entity_link(), get_entity_link() */
+ IRP_RESOURCE_ENTITY_LINK = 1 << 1,
+ /** type visited field @see type_visited(), mark_type_visited(),
+ * inc_master_type_visited() */
+ IRP_RESOURCE_TYPE_VISITED = 1 << 2,
+ /** type link field @see set_type_link(), get_type_link() */
+ IRP_RESOURCE_TYPE_LINK = 1 << 3,
+} irp_resources_t;
+ENUM_BITSET(irp_resources_t)
+
+#ifndef NDEBUG
+/**
+ * Reserve resources available for a whole program.
+ *
+ * This is a debug tool: All code should properly allocate the resources it uses
+ * so if two interlocked algorithms use the same resources that bug will get
+ * detected.