New directory: ana for analyses. Adapted configure/makefiles
[libfirm] / ir / tr / typewalk.h
1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2
3 ** All rights reserved.
4 **
5 ** Author: Goetz Lindenmaier
6 **
7 ** traverse the type information.  The walker walks the whole ir graph
8 ** to find the distinct type trees in the type graph forest.
9 ** - execute the pre function before recursion
10 ** - execute the post function after recursion
11 */
12
13 /* $Id$ */
14
15
16 /* walk over all type information reachable from the ir graph. */
17
18 #ifndef _TYPEWALK_H_
19 #define _TYPEWALK_H_
20
21 # include "type_or_entity.h"
22
23
24 /** Walks over all type information reachable from global roots.
25     Touches every type and entity in unspecified order.  If new
26     types/entities are created during the traversal these will
27     be visited, too. **/
28 void type_walk(void (pre)(type_or_ent*, void*),
29                void (post)(type_or_ent*, void*),
30                void *env);
31
32 /** walks over all type information reachable from irg **/
33 void type_walk_irg(ir_graph *irg,
34                    void (pre)(type_or_ent*, void*),
35                    void (post)(type_or_ent*, void*),
36                    void *env);
37
38 /** Walks over all classes information reachable from global roots.
39     Touches every class in specified order:
40     - first the super class
41     - second the class itself
42     - third the sub classes.  If new classes are created
43     during the traversal these will be visited, too. **/
44 /** @@@ shoulc be named class-walk **/
45 void type_walk_super2sub(void (pre)(type_or_ent*, void*),
46                          void (post)(type_or_ent*, void*),
47                          void *env);
48
49 #endif /* _TYPEWALK_H_ */