-/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
-* All rights reserved.
-*
-* Authors: Martin Trapp, Christian Schaefer
-*
-*
-*/
-
-/* $Id$ */
+/*
+ * Project: libFIRM
+ * File name: ir/ir/irgraph.c
+ * Purpose: Entry point to the representation of procedure code.
+ * Author: Martin Trapp, Christian Schaefer
+ * Modified by: Goetz Lindenmaier
+ * Created:
+ * CVS-ID: $Id$
+ * Copyright: (c) 1998-2003 Universität Karlsruhe
+ * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ */
#ifdef HAVE_CONFIG_H
# include <config.h>
res->pinned = pinned;
res->outs_state = no_outs;
res->dom_state = no_dom;
+ res->typeinfo_state = irg_typeinfo_none;
/** Type information for the procedure of the graph **/
res->ent = ent;
/* Make a rudimentary ir graph for the constant code.
Must look like a correct irg, spare everything else. */
-ir_graph *new_const_code_irg() {
+ir_graph *new_const_code_irg(void) {
ir_graph *res;
ir_node *projX;
- res = (ir_graph *) malloc (sizeof (ir_graph));
+ res = (ir_graph *) malloc (sizeof(*res));
+ memset(res, 0, sizeof(*res));
+
current_ir_graph = res;
res->n_loc = 1; /* Only the memory. */
res->visited = 0; /* visited flag, for the ir walker */
graph, nor the entity standing for this graph. */
void free_ir_graph (ir_graph *irg) {
set_entity_irg(irg->ent, NULL);
+ irg->kind = k_BAD;
free(irg->obst);
#if USE_EXPLICIT_PHI_IN_STACK
free_Phi_in_stack(irg->Phi_in_stack);