/*
- * Project: libFIRM
- * File name: ir/ir/irprog.c
- * Purpose: Entry point to the representation of a whole program.
- * Author: Goetz Lindenmaier
- * Modified by:
- * Created: 2000
- * CVS-ID: $Id$
- * Copyright: (c) 2000-2003 Universität Karlsruhe
- * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
*/
+/**
+ * @file
+ * @brief Entry point to the representation of a whole program.
+ * @author Goetz Lindenmaier
+ * @date 2000
+ * @version $Id$
+ */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "obst.h"
#include "typegmod.h"
#include "irop_t.h"
+#include "irmemory.h"
/** The name of the Global Type. */
#define GLOBAL_TYPE_NAME "GlobalType"
remove_irp_type(irp->glob_type);
remove_irp_type(irp->tls_type);
- /* set these flags for debugging */
+ /* Set these flags for debugging. */
irp->glob_type->flags |= tf_global_type;
irp->tls_type->flags |= tf_tls_type;
+ /* The global type is a class, but we cannot derive from it, so set
+ the final property to assist optimizations that checks for it. */
+ set_class_final(irp->glob_type, 1);
+
irp->const_code_irg = new_const_code_irg();
irp->phase_state = phase_building;
irp->ip_outedges = NULL;
irp->trouts_state = outs_none;
irp->class_cast_state = ir_class_casts_transitive;
+ irp->globals_adr_taken_state = ir_address_taken_not_computed;
return irp;
}