X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Ftropt.c;h=d2bc5eaefadf9c018c965657c0eb54373a4a70a0;hb=fe4dd08ecc09bf5c9e63cc2d2cb756295af7b423;hp=a4226154c4396d5d5b635bd259367eefdefe6d23;hpb=9769cadd5c430154acd9c47fcb9cc601db6d3513;p=libfirm diff --git a/ir/opt/tropt.c b/ir/opt/tropt.c index a4226154c..d2bc5eaef 100644 --- a/ir/opt/tropt.c +++ b/ir/opt/tropt.c @@ -1,17 +1,28 @@ -/** - * @file tropt.c +/* + * 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. * - * Project: libFIRM - * File name: ir/opt/tropt.c - * Purpose: Optimize the type representation. - * Author: Goetz Lindenmaier - * Modified by: - * Created: 20.4.2005 - * CVS-ID: $Id$ - * Copyright: (c) 2005 Universität Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. * - * Perform optimizations of the type representation. + * 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 Perform optimizations of the type representation. + * @date 20.4.2005 + * @author Goetz Lindenmaier + * @version $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -19,19 +30,8 @@ #include -#ifdef HAVE_ALLOCA_H -#include -#endif -#ifdef HAVE_MALLOC_H -#include -#endif - -#include "tropt.h" - +#include "iroptimize.h" #include "irprog.h" -#include "mangle.h" - -#include "tr_inheritance.h" #include "irtypeinfo.h" #include "irgwalk.h" #include "irsimpletype.h" @@ -39,6 +39,7 @@ #include "ircons.h" #include "irgmod.h" #include "irflag_t.h" +#include "xmalloc.h" /* - statistics ---------------------------------------------- */ @@ -289,7 +290,7 @@ static void cancel_out_casts(ir_node *cast) { static void concretize_selected_entity(ir_node *sel) { ir_node *cast, *ptr = get_Sel_ptr(sel); ir_type *orig_tp, *cast_tp; - entity *new_ent, *sel_ent; + ir_entity *new_ent, *sel_ent; sel_ent = get_Sel_entity(sel); cast = get_Sel_ptr(sel);