2 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
6 * This file may be distributed and/or modified under the terms of the
7 * GNU General Public License version 2 as published by the Free Software
8 * Foundation and appearing in the file LICENSE.GPL included in the
9 * packaging of this file.
11 * Licensees holding valid libFirm Professional Edition licenses may use
12 * this file in accordance with the libFirm Commercial License.
13 * Agreement provided with the Software.
15 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * @brief Run most simple type analyses.
23 * @author Goetz Lindenmaier
27 * We compute type information for each node. It is derived from the
28 * types of the origines of values, e.g. parameter types can be derived
29 * from the method type.
30 * The type information so far is saved in the link field.
32 #ifndef FIRM_ANA_IRSIMPLETYPE_H
33 #define FIRM_ANA_IRSIMPLETYPE_H
40 /* ------------ Building and Removing the type information ----------- */
42 /** Computes type information for each node in all ir graphs.
44 * Computes type information for each node. Stores the information in the
45 * field defined in irtypeinfo.h. Sets typestate in irg to irg_typeinfo_consistent.
47 * Derives the information from nodes/patterns that give hints about the
48 * type, as projecting an argument from the Start node. Deletes all previous
51 * If a non-pointer type is specified for a pointer value (as the Alloc node does:
52 * it contains the type allocated, but to type the result we need the type that
53 * describes a pointer to the allocated type) searches for a corresponding pointer
54 * type. If several exist, uses one of them. If none exists, uses unknown_type.
56 * Uses the link field of types. Sets this field of each type to point to a
57 * pointer type that points to the type (Got it? ;-)).
59 FIRM_API void simple_analyse_types(void);
61 /** Frees all type information datastructures. Sets the flag in irg to "???". */
62 FIRM_API void free_simple_type_information(void);