- * @file tropt.h
- *
- * Project: libFIRM
- * File name: ir/opt/tropt.h
- * Purpose: Optimize the type representation.
- * Author: Goetz Lindenmaier
- * Modified by:
- * Created: 20.4.2005
- * CVS-ID: $Id$
- * Copyright: (c) 2005 Universität Karlsruhe
- *
- * Perform optimizations of the type representation.
- *
- *
- */
-
-#ifndef _TROPT_H_
-#define _TROPT_H_
-
-#include "firm_types.h"
-
-/** This is the type for a method, that returns a pointer type to
- * tp. This is needed in the normalization. */
-typedef ir_type *(*gen_pointer_type_to_func)(ir_type *tp);
-
-/** Insert Casts so that class type casts conform exactly with the type hierarchy.
- *
- * Formulated in Java, this achieves the following:
- *
- * For a class hierarchy
- * class A {}
- * class B extends A {}
- * class C extends B {}
- * we transforms a cast
- * (A)new C()
- * to
- * (A)((B)new C()).
- *
- * The algorithm works for Casts with class types, but also for Casts
- * with all pointer types that point (over several indirections,
- * i.e. ***A) to a class type. Normalizes all graphs. Computes type
- * information (@see irtypeinfo.h) if not available.
- * Invalidates trout information as new casts are generated.
- *
- * @param gppt_fct A function that returns a pointer type that points
- * to the type given as argument. If this parameter is NULL, a default
- * function is used that either uses trout information or performs a O(n)
- * search to find an existing pointer type. If it can not find a type,
- * generates a pointer type with mode_P_mach and suffix "cc_ptr_tp".