3 * File name: ir/ana/irsimpletype.h
4 * Purpose: Run most simple type analyses.
5 * Author: Goetz Lindenmaier
9 * Copyright: (c) 2003 Universität Karlsruhe
10 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
14 * @file irsimpletype.h
16 * We compute type information for each node. It is derived from the
17 * types of the origines of values, e.g. parameter types can be derived
18 * from the method type.
19 * The type information so far is saved in the link field.
21 * @author Goetz Lindenmaier
23 # ifndef _IRSIMPLETYPE_H_
24 # define _IRSIMPLETYPE_H_
32 /* ------------ Building and Removing the type information ----------- */
34 /** Computes type information for each node in all ir graphs.
36 * Computes type information for each node. Stores the information in the
37 * field defined in irtypeinfo.h. Sets typestate in irg to irg_typeinfo_consistent.
39 * Derives the information from nodes/patterns that give hints about the
40 * type, as projecting an argument from the Start node. Deletes all previous
43 * If a non-pointer type is specified for a pointer value (as the Alloc node does:
44 * it contains the type allocated, but to type the result we need the type that
45 * describes a pointer to the allocated type) searches for a corresponding pointer
46 * type. If several exist, uses one of them. If none exists, uses unknown_type.
48 * Uses the link field of types. Sets this field of each type to point to a
49 * pointer type that points to the type (Got it? ;-)).
51 void simple_analyse_types(void);
53 /** Frees all type information datastructures. Sets the flag in irg to "???". */
54 void free_simple_type_information(void);
56 /** Computes type information for a node.
58 * Computes type information for a node. Does not remark this type information
59 * in the ir. Computes the type information by analysing the predecessors.
60 * Calls the same basic analyses routine for a node as simple_analyse_types,
61 * but returns unknown_type for Phi nodes.
62 * Each call is theoretically O(n).
64 * Not yet implemented, but I guess we want this for iropt, to find the
65 * type for newly allocated constants.
67 /* type *analyse_irn_type(ir_node *node); */
69 #endif /* _IRSIMPLETYPE_H_ */