3 * File name: ir/tr/typegmod.h
4 * Purpose: Functionality to modify the type graph.
5 * Author: Goetz Lindenmaier
9 * Copyright: (c) 2001-2003 Universität Karlsruhe
10 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
15 #include "firm_types.h"
20 * This module supplies routines that support changing the type graph.
23 /** Replaces one type by the other.
25 * Old type is replaced by new_type. All references to old_type
26 * now point to new_type. The memory for the old type is destroyed,
27 * but still used. Therefore it is not freed.
28 * All referenced to this memory will be lost after a certain while.
29 * An exception is the list of types in irp (irprog.h).
30 * In the future there might be a routine to recover the memory, but
31 * this will be at considerable runtime cost.
33 * @param old_type - The old type that shall be replaced by the new type.
34 * @param new_type - The new type that will replace old_type.
37 void exchange_types(ir_type *old_type, ir_type *new_type);
39 /** Skip id types until a useful type is reached.
41 * @param tp - A type of arbitrary kind.
44 * tp if it is not an id type.
45 * If tp is an id type returns the real type it stands for.
47 ir_type *skip_tid(ir_type *tp);
49 #endif /*_TYPEGMOD_H_ */