6 * File name: ir/ana/irsimpletype.h
7 * Purpose: Run most simple type analyses.
8 * Author: Goetz Lindenmaier
12 * Copyright: (c) 2003 Universität Karlsruhe
13 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
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.
24 # ifndef _IRSIMPLETYPE_H_
25 # define _IRSIMPLETYPE_H_
33 /* ------------ Building and Removing the type information ----------- */
35 /** Computes type information for each node in all ir graphs.
37 * Computes type information for each node. Stores the information in the
38 * field defined in irtypeinfo.h. Sets typestate in irg to irg_typeinfo_consistent.
40 * Derives the information from nodes/pattarns that give hints about the
41 * type, as projecting an argument from the Start node. Deletes all previous
44 * If a non-pointer type is specified for a pointer value (as the Alloc node does:
45 * it contains the type allocated, but to type the result we need the type that
46 * describes a pointer to the allocated type) searches for a corresponding pointer
47 * type. If several exist, uses one of them. If none exists, uses unknown_type.
49 * Uses the link field of types. Sets this field of each type to point to a
50 * pointer type that points to the type (Got it? ;-)).
52 void simple_analyse_types(void);
54 /** Frees all type information datastructures. Sets the flag in irg to "???". */
55 void free_simple_type_information(void);
57 /** Computes type information for a node.
59 * Computes type information for a node. Does not remark this type information
60 * in the ir. Computes the type information by analysing the predecessors.
61 * Calls the same basic analyses routine for a node as simple_analyse_types,
62 * but returns unknown_type for Phi nodes.
63 * Each call is theoretically O(n).
65 * Not yet implemented, but I guess we want this for iropt, to find the
66 * type for newly allocated constants.
68 //type *analyse_irn_type(ir_node *node);
70 #endif /* _IRSIMPLETYPE_H_ */