+
+/* Add a new global asm include */
+void add_irp_asm(ident *asm_string) {
+ ARR_APP1(ident *, irp->global_asms, asm_string);
+}
+
+/* Return the number of global asm includes. */
+int get_irp_n_asms(void) {
+ return ARR_LEN(irp->global_asms);
+}
+
+/* Return the global asm include at position pos. */
+ident *get_irp_asm(int pos) {
+ assert(0 <= pos && pos < get_irp_n_asms());
+ return irp->global_asms[pos];
+}
+
+#ifndef NDEBUG
+void irp_reserve_resources(ir_prog *irp, ir_resources_t resources) {
+ assert((resources & ~IR_RESOURCE_GLOBAL_MASK) == 0);
+ assert((irp->reserved_resources & resources) == 0);
+ irp->reserved_resources |= resources;
+}
+
+void irp_free_resources(ir_prog *irp, ir_resources_t resources) {
+ assert((irp->reserved_resources & resources) == resources);
+ irp->reserved_resources &= ~resources;
+}
+
+ir_resources_t irp_resources_reserved(const ir_prog *irp) {
+ return irp->reserved_resources;
+}
+#endif