+/** contains the suffix for frame type names */
+static ident *frame_type_suffix = NULL;
+
+/* initialize the IR graph module */
+void init_irgraph(void) {
+ frame_type_suffix = new_id_from_str(FRAME_TP_SUFFIX);
+ forbid_new_data = 1;
+}
+
+/**
+ * Allocate a new IR graph.
+ * This function respects the registered graph data. The only reason for
+ * this function is, that there are two locations, where graphs are
+ * allocated (new_r_ir_graph, new_const_code_irg).
+ * @return Memory for a new graph.
+ */
+static ir_graph *alloc_graph(void) {
+ size_t size = sizeof(ir_graph) + additional_graph_data_size;
+ char *ptr = xmalloc(size);
+ memset(ptr, 0, size);
+
+ return (ir_graph *) (ptr + additional_graph_data_size);
+}
+
+/**
+ * Frees an allocated IR graph
+ */
+static void free_graph(ir_graph *irg) {
+ char *ptr = (char *)irg;
+ free(ptr - additional_graph_data_size);
+}
+
+#if USE_EXPLICIT_PHI_IN_STACK