/*
- * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
/**
* @file
* @brief Entry point to the representation of a whole program.
- * @author Goetz Lindenmaier
+ * @author Goetz Lindenmaier, Michael Beck
* @date 2000
* @version $Id$
*/
res->modes = NEW_ARR_F(ir_mode *, 0);
res->opcodes = NEW_ARR_F(ir_op *, 0);
res->last_region_nr = 0;
+ res->last_label_nr = 1; /* 0 is reserved as non-label */
+ res->max_irg_idx = 0;
#ifdef DEBUG_libfirm
res->max_node_nr = 0;
return _get_irp_irg(pos);
}
+int get_irp_last_idx(void) {
+ return irp->max_irg_idx;
+}
+
void set_irp_irg(int pos, ir_graph *irg) {
assert(irp && irg);
assert(pos < (ARR_LEN(irp->graphs)));
ir_exc_region_t (get_irp_next_region_nr)(void) {
return _get_irp_next_region_nr();
}
+
+/* Returns a new, unique label number. */
+ir_label_t (get_irp_next_label_nr)(void) {
+ return _get_irp_next_label_nr();
+}