identifiers starting with _ are reserved; remove this bad practice
[libfirm] / include / libfirm / irsimpletype.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
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.
10  *
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.
14  *
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
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief    Run most simple type analyses.
23  * @author   Goetz Lindenmaier
24  * @date     22.8.2003
25  * @version  $Id$
26  * @brief
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.
31  */
32 #ifndef FIRM_ANA_IRSIMPLETYPE_H
33 #define FIRM_ANA_IRSIMPLETYPE_H
34
35 #include "irgraph.h"
36 #include "irnode.h"
37 #include "typerep.h"
38 #include "begin.h"
39
40 /* ------------ Building and Removing the type information  ----------- */
41
42 /** Computes type information for each node in all ir graphs.
43  *
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.
46  *
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
49  * type information.
50  *
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.
55  *
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? ;-)).
58  */
59 FIRM_API void simple_analyse_types(void);
60
61 /** Frees all type information datastructures.  Sets the flag in irg to "???". */
62 FIRM_API void free_simple_type_information(void);
63
64 #include "end.h"
65
66 #endif