- add support for statistics and merge debug info
[libfirm] / include / libfirm / irprog.h
index 01aefdb..748030a 100644 (file)
@@ -47,8 +47,9 @@
 #include "irgraph.h"
 
 typedef enum ir_segment_t {
+       IR_SEGMENT_FIRST,
        /** "normal" global data */
-       IR_SEGMENT_GLOBAL,
+       IR_SEGMENT_GLOBAL = IR_SEGMENT_FIRST,
        /** thread local storage segment */
        IR_SEGMENT_THREAD_LOCAL,
        /**
@@ -92,6 +93,16 @@ typedef struct ir_prog ir_prog;
  */
 extern ir_prog *irp;
 
+#ifndef NDEBUG
+void irp_reserve_resources(ir_prog *irp, ir_resources_t resources);
+void irp_free_resources(ir_prog *irp, ir_resources_t resources);
+ir_resources_t irp_resources_reserved(const ir_prog *irp);
+#else
+#define irp_reserve_resources(irp, resources)
+#define irp_free_resources(irp, resources)
+#define irp_resources_reserved(irp)   0
+#endif
+
 /**
  * Returns the access points from where everything in the ir can be accessed.
  *