X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firprog.c;h=42d23d7f757e7c8133d0c8639fb2dea41201f695;hb=6642d975ccbd1984001893eba54b5e0a0e3104c6;hp=09e3226cc579fa32aa40d3f3d8146730cb0f35dc;hpb=b75f6949aa4b8e5bacf4013549b82d0d05f60d0a;p=libfirm diff --git a/ir/ir/irprog.c b/ir/ir/irprog.c index 09e3226cc..42d23d7f7 100644 --- a/ir/ir/irprog.c +++ b/ir/ir/irprog.c @@ -6,7 +6,7 @@ * Modified by: * Created: 2000 * CVS-ID: $Id$ - * Copyright: (c) 2000-2003 Universität Karlsruhe + * Copyright: (c) 2000-2007 Universität Karlsruhe * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. */ @@ -25,6 +25,7 @@ #include "obst.h" #include "typegmod.h" #include "irop_t.h" +#include "irmemory.h" /** The name of the Global Type. */ #define GLOBAL_TYPE_NAME "GlobalType" @@ -73,10 +74,14 @@ static ir_prog *complete_ir_prog(ir_prog *irp) { 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; @@ -84,6 +89,7 @@ static ir_prog *complete_ir_prog(ir_prog *irp) { 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; }