X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftypegmod.c;h=8b7748b1e220eccf532bda92e82de5cd6c69b495;hb=ff244fb7355c6120cf0f15ba7911b473bb91c64b;hp=5cd16b3875f02cf174978e8b6d155fd65a8fae7e;hpb=e3e22fa6f927847099c0bff62457003aa81f2518;p=libfirm diff --git a/ir/tr/typegmod.c b/ir/tr/typegmod.c index 5cd16b387..8b7748b1e 100644 --- a/ir/tr/typegmod.c +++ b/ir/tr/typegmod.c @@ -1,19 +1,24 @@ -/* Copyright (C) 2001 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Goetz Lindenmaier -** -*/ +/* + * Project: libFIRM + * File name: ir/tr/typegmod.c + * Purpose: Functionality to modify the type graph. + * Author: Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 2001-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -/* $Id$ */ - -# include "typegmod_t.h" +# include "typegmod.h" # include "type_t.h" # include "tpop_t.h" # include "irmode.h" -inline void exchange_types(type *old_type, type *new_type) { - int i; +void exchange_types(ir_type *old_type, ir_type *new_type) { /* Deallocate datastructures not directly contained in the old type. We must do this now as it is the latest point where we know the original kind of type. @@ -27,9 +32,9 @@ inline void exchange_types(type *old_type, type *new_type) { Maybe it's better to remove the id entry and shrink the list. Does this conflict with the walker? Might a type be left out during the walk? - * Deallocation: if the Id is removed from the list it will eventualle + * Deallocation: if the Id is removed from the list it will eventually disappear in a memory leak. When is impossible to determine so we - need to hold it in a seperate list for deallocation. + need to hold it in a separate list for deallocation. */ /* Exchange the types */ @@ -37,8 +42,9 @@ inline void exchange_types(type *old_type, type *new_type) { old_type->mode = (ir_mode *) new_type; } -inline type *skip_tid(type *tp) { +ir_type *skip_tid(ir_type *tp) { + /* @@@ implement the self cycle killing trick of skip_id(ir_node *) */ while (tp->type_op == type_id) - tp = (type *) tp->mode; + tp = (ir_type *) tp->mode; return tp; }